Connecting Modbus RTU devices to the SNMP-based monitoring system
The Ethernet‑based measurement and monitoring systems of the new generation support Modbus RTU. Please note that the special Didactum USB‑RS485 adapter is required and that the current firmware (from 05/2019 onwards) must be installed on the monitoring system.
With the special Modbus RTU settings you can create virtual sensors. The following “addvirtual” settings and options can be configured in the Didactum monitoring system:
- k – user session ID;
- id – element identifier; if no identifier is specified, a new element is created, otherwise the existing element is modified.
- name – element name (maximum length 63 characters).
- virtual_type – type of the virtual sensor: "Modbus RTU".
- vmax – maximum value for the measurement range.
- vmin – minimum value for the measurement range.
- low_alarm – low alarm threshold for notification.
- low_warning – low warning threshold for notification.
- high_warning – high warning threshold for notification.
- high_alarm – high alarm threshold for notification.
- hyst_type – algorithm type used for hysteresis calculation.
- disable – hysteresis disabled.
- value – hysteresis of the sensor’s measured value.
- time – hysteresis time (used by default).
- hyst_value – deviation value of the sensor reading for hysteresis calculation, floating‑point number (minimum 0, maximum 10.000, default 0.3).
- hyst_low_alarm – time in seconds for the sensor to switch into a new alarm state (minimum 0, maximum 1000, default 1).
- hyst_low_warning – as above (default 1).
- hyst_normal – as above (default 1).
- hyst_high_warning – as above (default 1).
- hyst_high_alarm – as above (default 1).
- expr – formula used to calculate the output value, standard: "x".
- um – unit of measurement for this element.
- utype – user‑defined type that defines the sensor symbol: current, factor, frequency, humidity, power, temperature, vibration, or voltage.
- mb_addr – Modbus slave device address (decimal 1–255).
- mb_reg – register index for the Modbus function, as a hexadecimal string.
- mb_func – Modbus function code:
- Read Coil Status (0x01);
- Read Input Status (0x02);
- Read Holding Register (0x03);
- Read Input Register (0x04).
- mb_type – data type:
- 16 bits signed int;
- 16 bits unsigned int;
- 32 bits signed int;
- 32 bits unsigned int;
- 32 bits IEEE 754 floating point;
- mb_order – byte and word order of the data:
- low byte first, low word first;
- low byte first, high word first;
- high byte first, low word first;
- high byte first, high word first.
If the new element is created successfully, the response is:
<error type="no error" id="213002" />
When creating a new sensor (no ID specified), the following parameters must be provided:
name, virtual_type, vmax, vmin, mb_addr, mb_reg, mb_func, mb_type, mb_order.
The remaining query parameters are optional. If not set, they are initialized to the default values.
When editing an element you can change individual fields:
- delvirtual – deletes the virtual sensor. Additional options:
- k – user session ID;
- id – element ID.
- getelement – reads the element. Additional options:
- k – user session ID;
- id – element ID.
As of 04/2019