Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

 

    
1DeviceName 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.
2IP Address of Device This defines the IP address of the Modbus device via which the device is reachable.
3Port This defines the port number which is used to open the Modbus TCP connection.
4UnitIdentifier 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.
5Description This attribute can be used to specify a human-readable text that further describes the device.
6Endianess 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.
7Wordswap 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.
8DWordswap 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.
9Bitswap 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.
10Max_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"'.
11Request 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.
12Retry Count This parameter specifies the amount of retries before a Modbus request is declared as failed.
13Retry Delay The Retry Delay specifies the timeout between a failed Modbus request and resending it again.
14Write 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.
15Address 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 (cf. Section 4.3.2.3). Use an address mapping, the name of the mapping that is used in the Address Mapping Definition file has to be specified here.
16Ignore 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.
17Use 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.
18Refresh Interval If "Use Device Identification Request" is set to true, this parameter specifies the interval between two "Read Device Identification" requests.
19Transmission 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.
20Device 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.