Configuring Data Bindings
Data bindings connect DDOs to live data from SAMMI peers. Without bindings, DDOs display default values. This guide explains how to configure the HDA (Host Data Access) properties.
How Data Flows
SAMMI Peer → SAMMI RTE → Gateway (WebSocket) → RuntimeWeb → DDO
- A peer (data source) publishes values to the SAMMI RTE
- The Gateway bridges SAMMI to web clients via WebSocket
- RuntimeWeb subscribes to data keys and routes values to DDOs
- The DDO renders the value visually (meter needle, text, bar height, etc.)
HDA Properties
Select a DDO and open the HDA section in the Property Inspector:
General Tab
| Property | Description | Example |
|---|---|---|
| Data Type | Type of data the DDO expects | real, integer, string |
| Num Values | Number of values from the peer | 1 (scalar), 6 (multirow) |
| Refresh Type | Update mechanism | event (push), polled |
| Poll Rate | Polling interval in ms (if polled) | 1000 |
Key Tab
| Property | Description | Example |
|---|---|---|
| Logical Server | Name of the peer providing data | peer_fast, peer_slow |
| Read Key | Variable name to read from | temperature, pump_speed |
| Write Key | Variable name to write to (for input DDOs) | setpoint |
| Key Type | Key data format | default |
Record Tab
| Property | Description | Example |
|---|---|---|
| Read Record | Record identifier for reading | — |
| Write Record | Record identifier for writing | — |
| Record Type | Record format | default |
Common Configurations
Read-Only Display (Meter, Trend, Bar)
Set only the read-side properties:
Logical Server: peer_fast
Read Key: temperature
Data Type: real
Num Values: 1
Refresh Type: event
Read-Write Input (Real, Integer, Alphanumeric)
Set both read and write keys:
Logical Server: peer_slow
Read Key: setpoint
Write Key: setpoint
Data Type: real
Num Values: 1
Refresh Type: event
Enterable: true (in AFD Input section)
Multirow Display (Real with multiple rows)
Logical Server: peer_fast
Read Key: array_values
Data Type: real
Num Values: 6
The DDO displays all 6 values in rows.
Push Button Command
Push buttons typically don’t read data — they send commands:
Logical Server: $local-cmd (SAMMI internal command)
Read Key: button_state
Write Key: button_state
Logical Server Names
The logical server name must match a logical_server entry in SAMMI’s s2_config.dat:
logical_server peer_fast 0x20000010 1 localhost 40 20
logical_server peer_slow 0x20000020 1 localhost 40 20
Special servers:
$local-cmd— SAMMI internal command processor
Testing Without Live Data
If no Gateway is running, DDOs show default values (typically 0 or empty). This is useful for:
- Layout and positioning work
- Property configuration
- Visual design
Once the Gateway and peers are running, DDOs automatically begin displaying live data.
Tips
- The Read Key is the most important binding — it determines which data the DDO shows
- Write Key is only needed for input DDOs (enterable Real, Integer, etc.)
- Match Data Type to the peer’s actual data type to avoid conversion issues
- Use event refresh for real-time data; polled only when event-driven is unavailable
- Multiple DDOs can share the same Read Key — they’ll all show the same value