MODBUS icon

MODBUS

Read and write to MODBUS devices

Actions2

Overview

This node interacts with MODBUS devices to read or write data. It supports reading discrete output coils, discrete input contacts, holding registers, and input registers, as well as writing to holding registers. This is useful in industrial automation, monitoring, and control systems where MODBUS protocol is used to communicate with hardware devices like sensors, actuators, and controllers.

Use Case Examples

  1. Reading the status of discrete output coils to monitor device states.
  2. Reading holding registers to retrieve sensor data or device parameters.
  3. Writing a value to a holding register to control a device setting.

Properties

Name Meaning
Function Code Specifies the MODBUS function code to use for reading data, such as reading coils or registers.
Memory Address The starting memory address in the MODBUS device to read from or write to.
Quantity The number of registers or coils to read from the device.
Unit ID The MODBUS unit/slave ID (0-255) to specify the target device on the MODBUS network.

Output

JSON

  • functionCode - The MODBUS function code used for the operation.
  • address - The memory address accessed in the MODBUS device.
  • quantity - The number of registers or coils read (for read operations).
  • data - The raw response data from the device (for write operations).
  • value - The value written to a holding register (for write operations).

Dependencies

  • An API key credential for MODBUS device access

Troubleshooting

  • Errors with messages like 'MODBUS FC1 Error', 'MODBUS FC3 Error', etc., indicate communication or parameter issues with the MODBUS device. Verify the function code, memory address, quantity, and unit ID are correct.
  • Connection failures may occur if the MODBUS device is unreachable or credentials are invalid. Check network connectivity and credential configuration.
  • Invalid function code errors occur if an unsupported function code is specified. Ensure the function code matches the device capabilities.

Links

Discussion