Adapter - Modbus TCP
This page describes version 2.0.6 of the adapter.
Overview
This adapter is used to control communication between Modbus compatible devices and the Workflow Engine. The communication is done via TCP/IP.
Note
Most Modbus devices require 32-bit values be transferred using big-endian order. For example, the 32-bit floating point number 10.0 is typically represented in memory as two 16 bit words 0x4120-0x0000. Before the data can be sent to the Modbus device it must be arranged in big-endian order, if not already, as follows; 0x0000-0x2041 =>. However, some Modbus devices require that the data be sent as two individual big endian 16-bit words with the least significant word being sent first. In this case, the data would need to be arranged and sent as 0x0000-0x4120 =>. Therefore, it is important to consult the Modbus device's documentation before writing values to registers.
Properties
Name | Display | Is Required | Comments | Type | Default Value | Maximum Value | Minimum Value | Maximum Length | Minimum Length |
---|---|---|---|---|---|---|---|---|---|
serviceAddress | ModbusTcp controller service address | False | The host address to connect to the ModbusTcp controller service. | string | 1024 | 1 | |||
servicePort | ModbusTcp controller service port | False | The port to connect to the ModbusTcp controller service. | integer | 502 | 65535 | 1 |
Commands
Read Coils (readCoils)
Reads one or more coils of a device. (Modbus function 1).
Request Properties
Name | Display | Description | Is Required | Type |
---|---|---|---|---|
serviceAddress | Service Address | The host address to connect to the ModbusTcp controller service. | False | string |
servicePort | Service Port | The port to connect to the ModbusTcp controller service. | False | string |
deviceId | Device ID | The id to address the device (slave). (0-255) | False | string |
startAddress | Start Address | The first coil address to read. (0-65535) | True | string |
coilCount | Coil Count | The number of coils to read. (1-2000) | False | string |
Response Properties
Name | Description | Type |
---|---|---|
coil | The array of coils. | array |
coil.address | The address of the coil. | string |
coil.value | The setting value for the coil. | string |
Write Single Coil (writeSingleCoil)
Writes a single coil status to the Modbus device. (Modbus function 5)
Request Properties
Name | Display | Description | Is Required | Type |
---|---|---|---|---|
serviceAddress | Service Address | The host address to connect to the ModbusTcp controller service. | False | string |
servicePort | Service Port | The port to connect to the ModbusTcp controller service. | False | string |
deviceId | Device ID | The id to address the device (slave). (0-255) | False | string |
coilAddress | Coil Address | The coil address to write. (0-65535) | True | string |
coilSetting | Coil Setting | The coil setting to write. (True,False) | True | string |
Write Single Register (writeSingleRegister)
Writes a single coil status to the Modbus device. (Modbus function 6)
Request Properties
Name | Display | Description | Is Required | Type |
---|---|---|---|---|
serviceAddress | Service Address | The host address to connect to the ModbusTcp controller service. | False | string |
servicePort | Service Port | The port to connect to the ModbusTcp controller service. | False | string |
deviceId | Device ID | The id to address the device (slave). (0-255) | False | string |
registerAddress | Register Address | The coil address to write. (0-65535) | True | string |
registerData | Register Data | The register data to write. (0-65535) | True | string |
Write Multiple Registers (writeMultipleRegisters)
Writes a data to multiple registers on Modbus device. (Modbus function 16)
Request Properties
Name | Display | Description | Is Required | Type |
---|---|---|---|---|
serviceAddress | Service Address | The host address to connect to the ModbusTcp controller service. | False | string |
servicePort | Service Port | The port to connect to the ModbusTcp controller service. | False | string |
deviceId | Device ID | The id to address the device (slave). (0-255) | False | string |
startAddress | Start Address | The first address to write. (0-65535) | True | string |
registerValues | Register Values | Comma delimited 16 bit data values to write. | True | string |
Read Holding Registers (readHoldingRegisters)
Reads one or more holding registers of a device. (Modbus function 3).
Request Properties
Name | Display | Description | Is Required | Type |
---|---|---|---|---|
serviceAddress | Service Address | The host address to connect to the ModbusTcp controller service. | False | string |
servicePort | Service Port | The port to connect to the ModbusTcp controller service. | False | string |
deviceId | Device ID | The id to address the device (slave). (0-255) | False | string |
startAddress | Start Address | The first holding register address to read. (0-65535) | True | string |
registerCount | Register Count | The number of registers to read. (1-125) | False | string |
Response Properties
Name | Description | Type |
---|---|---|
holdingRegisters | The array of holding registers. | array |
holdingRegisters.address | The address of the Register. | string |
holdingRegisters.value | The value for the register. | string |
Release History
Version | Type | Description | Tracking # | Date |
---|---|---|---|---|
2.0.1 | Initial | First release in the Adapter Type store. | ||
2.0.5 | Maintenance | Updated third-party components and improved maintainability. | NAP-11518 | |
2.0.6 | Maintenance | Updated third-party components and improved maintainability. | NAP-23945 | 2022-11-29 |