Skip to content

Devices & Frames

Device list

A device represents a physical or logical unit over a connection. A single connection can host many devices — for example, multiple slaves on a Modbus TCP link.

Common fields:

FieldTypeRequiredDescription
nameString (≤100)YesDevice name (unique within the connection)
dscString (≤255)NoDescription
protocolProtocolAutoInherited from the parent connection
connectionIdStringYesOwning connection ID
configMapProtocol-dependentProtocol-specific settings (JSONB)

Fields that appear at the top level of the device JSON come from config — inSCADA flattens the DTO. For Modbus the device-level fields are:

FieldTypeDescription
scanTimeInteger (≥100)Read cycle (ms)
scanTypeDeviceScanTypePeriodic or Fixed Delay
stationAddressInteger (≥0)Modbus slave address

The DeviceScanType enum has two values:

ValueBehavior
PeriodicFixed-rate scheduling — the period between cycle starts stays at scanTime
Fixed DelayFixed-delay scheduling — scanTime is inserted after each cycle ends
{
"id": "abc123",
"connectionId": "conn-153",
"protocol": "Modbus TCP",
"name": "slave-1",
"dsc": "Energy meter",
"scanTime": 2000,
"scanType": "Periodic",
"stationAddress": 1
}
ScenarioSuggested scanTime
Fast-changing data (power, current)1000 – 2000 ms
Medium-rate data (temperature, pressure)3000 – 5000 ms
Slow-changing data (energy meter)5000 – 10000 ms
Status bits (on/off)1000 – 3000 ms

A frame is a block of data read from a device. Each frame defines an address range. Variables live inside frames.

Common fields:

FieldTypeRequiredDescription
nameString (≤100)YesFrame name
dscString (≤255)NoDescription
deviceIdStringYesOwning device ID
protocolProtocolAutoInherited from the device
isReadableBooleanYesWhether the frame is polled
isWritableBooleanYesWhether variables in this frame can be written
scanTimeFactorIntegerNoMultiplier on device scanTime (null or 1 → same period)
minutesOffsetIntegerNoSchedule offset in minutes (e.g. on-the-hour alignment)
configMapProtocol-dependentProtocol-specific fields (JSONB)

For Modbus the frame config fields are:

FieldTypeDescription
typeModbusFrameTypeFrame type (Coil, DiscreteInput, HoldingRegister, InputRegister)
startAddressInteger (0-65535)First address to read
quantityInteger (1-1024)Number of registers/coils to read
interFrameDelayIntegerDelay between frames (ms)
{
"id": "frame-703",
"deviceId": "dev-453",
"protocol": "Modbus TCP",
"name": "holding-block",
"dsc": "Holding registers 0-49",
"isReadable": true,
"isWritable": true,
"scanTimeFactor": null,
"minutesOffset": null,
"type": "HoldingRegister",
"startAddress": 0,
"quantity": 50
}
SettingMeaning
isReadable = trueFrame is polled (monitoring)
isWritable = trueVariables in the frame accept writes (control)
Both trueRead + write — the most common case
isReadable = falseWrite-only frame (setpoint dispatch)

Sets the frame’s read period as a multiple of the device scanTime:

  • Device scanTime = 2000 ms, frame scanTimeFactor = 3 → frame is polled every 6000 ms
  • null or 1 → same period as the device

Connection: LOCAL-Energy (LOCAL, 127.0.0.1)
└── Device: Energy-Device (scanTime: 2000 ms, Periodic)
└── Frame: Energy-Frame (readable + writable)
├── ActivePower_kW (Float, kW)
├── ReactivePower_kVAR (Float, kVAR)
├── Voltage_V (Float, V)
├── Current_A (Float, A)
├── Frequency_Hz (Float, Hz)
├── PowerFactor (Float)
├── Energy_kWh (Float, kWh)
├── Temperature_C (Float, °C)
├── Demand_kW (Float, kW)
└── GridStatus (Boolean)

The shape is identical on a Modbus TCP link — the only change is that device- and frame-level protocol-specific fields (stationAddress, type, startAddress, quantity, …) are added.

Reading and updating devices / frames from scripts: Connection API →