Modbus device definitions
Location:
<WorkspaceDirectory>\DataFiles\xio.Modbus.DeviceDefinitions.dat
The Modbus device manager checks the availability of Modbus TCP devices. It tries to connect to the defined devices and verifies whether they can be reached or not. If a connection to a Modbus device fails, the value of the corresponding Server Item that represents the device within the server is set to false. After having successfully established a connection to the Modbus device, this connection is continuously monitored by using a heart-beating mechanism. If a Modbus device is not reachable anymore, the corresponding Server Item is set to false and all Modbus datapoint that are assigned to this device are set to invalid.
The structure of the Modbus device definition file is as follows:
' Modbus device configuration file
'DeviceName;IPAddress;Port;UnitIdentifier;Description;Endianess;Wordswap;DWordSwap;BitSwap;Max_parallel;Tasktimeout
ModbusController1;192.168.1.20;502;250;59122_104_401;B;T;T;F;1;5000
Each line – except comment lines that start with ' – defines a single Modbus device.
Â
 |  Parameter |  | Description |
---|---|---|---|
1 | DeviceName | Â | The name of the device. For all Modbus devices, this name has to be unique since it is used as unique identifier for the Modbus device. |
2 | IP Address of Device | Â | This defines the IP address of the Modbus device via which the device is reachable. |
3 | Port | Â | This defines the port number which is used to open the Modbus TCP connection. |
4 | UnitIdentifier (Slave ID) | Â | This identifier addressed the Modbus unit within the controller. This identifier is used to communicate via devices such as Modbus bridges, routers, and gateways that use a single IP address to support multiple independent Modbus end units. For setting this parameter, please refer to the data sheet of the Modbus device. |
5 | Description | Â | This attribute can be used to specify a human-readable text that further describes the device. |
6 | Endianess | Â | This vendor-specific parameter defines the endianess of the memory blocks that are used within the device. If this parameter is set to "S", little(small) endian is used within the Modbus device. Otherwise, big endian is used which is also the default in Modbus. For setting this parameter, please refer to the data sheet of the Modbus device. |
7 | Wordswap |  | This vendor-specific parameter defines whether Words are swapped (set to "T" – default in Modbus) or not (set to "F"). For setting this parameter, please refer to the data sheet of the Modbus device. |
8 | DWordswap |  | This vendor-specific parameter defines whether Double Words are swapped (set to "T" – default in Modbus) or not (set to "F"). For setting this parameter, please refer to the data sheet of the Modbus device. |
9 | Bitswap |  | This vendor-specific parameter defines whether the bits are swapped (set to "T") or not (set to "F" – default in Modbus). For setting this parameter, please refer to the data sheet of the Modbus device. |
10 | Max_parallel | Â | This attribute specifies the maximum amount of requests that are sent to the device in parallel. The default value is "1". For non Modbus/TCP devices, this value has to be always "'1"'. |
11 | Request Timeout | Â | This attribute specifies the timeout interval in milliseconds that is used to determine whether a Modbus request failed or not. The default is 5000 ms. |
12 | Retry Count | Â | This parameter specifies the amount of retries before a Modbus request is declared as failed. |
13 | Retry Delay | Â | The Retry Delay specifies the timeout between a failed Modbus request and resending it again. |
14 | Write Mode | Â | This parameter specifies how the NETx BMS Core Server writes Modbus data. Valid values are "Multi" (default), "Single", and "SingleReverse". "Multi" means that the Modbus driver tries to combine write requests with subsequent addresses into one request (when it is possibel). "Multi" uses the Modbus function codes 15 and 16. "Single" means that each Modbus coil or register is written separately using function code 5 and 6. "SingleReverse" also uses single requests but writes datapoints that contains multiple coils or registers in reverse order. |
15 | Address Mapping | Â | To use an addressing scheme different to the standard memory addresses starting with address 0, an address mapping is possible. The address mapping itself is specified in the Address Mapping Definition file . Use an address mapping, the name of the mapping that is used in the Address Mapping Definition file has to be specified here. |
16 | Ignore Quality For Datapoints | Â | If set to true, the quality of datapoints are not set to "BAD" if the connection to the devices fails or timed-out. The default value is false. |
17 | Use Device Identification Request | Â | If set to true, the Modbus interface sends "Read Device Identification" requests (function code 43) in order to check the availability of the Modbus device. The default value is false. |
18 | Refresh Interval | Â | If "Use Device Identification Request" is set to true, this parameter specifies the interval between two "Read Device Identification" requests. |
19 | Transmission gap |  | This parameter defines a transmission gap between receiving a response and sending the next request. The interval is specified in milliseconds. For Modbus/TCP devices, the default value is 0 – for all other device types, the default and minimum gap is 20ms. |
20 | Device type | Â | Here the device type is defined. Valid values are "'Modbus/TCP"', "'Modbus RTU over TCP"' and "'Mobbus RTU over UDP"'. "'Modbus/TCP"' is used for native Modbus/TCP devices and RTU devices that are connected via Modbus/TCP to Modbus/RTU gateways. "'Modbus RTU over TCP"' and "'Mobbus RTU over UDP"' are used for Modbus/RTU devices that are connected via simple IP to RS485 converters. |
Â
Â