MODBUS icon

MODBUS

Read and write to MODBUS devices

Actions2

Overview

This node allows reading from and writing to MODBUS devices, which are commonly used in industrial automation and control systems. It supports reading coils, discrete inputs, holding registers, and input registers, as well as writing a single value to a holding register. This node is useful for scenarios such as monitoring sensor data, controlling actuators, or configuring devices via MODBUS protocol.

Use Case Examples

  1. Reading multiple holding registers to monitor sensor values in a factory automation system.
  2. Writing a value to a holding register to control a device parameter, such as setting a motor speed or valve position.

Properties

Name Meaning
Memory Address The memory address to read from or write to in the MODBUS device.
Value The value to write to the holding register when performing a write operation. It must be between -32768 and 32767.
Unit ID The MODBUS unit/slave ID (0-255). Use 0 for devices that require it.

Output

JSON

  • functionCode - The MODBUS function code used for the operation (e.g., FC1, FC2, FC3, FC4, FC6).
  • address - The memory address involved in the operation.
  • quantity - The number of registers or coils read (only for read operations).
  • data - The raw response data from the MODBUS device after a write operation.
  • value - The value written to the holding register (only for write operations).

Dependencies

  • Requires an API key credential for MODBUS device communication.

Troubleshooting

  • Common issues include connection errors to the MODBUS device, invalid memory addresses, or unsupported function codes.
  • Error messages like 'MODBUS FCx Error' indicate specific function code failures and usually include the underlying error message from the device or network.
  • Ensure the unit ID and memory address are correctly set according to the target MODBUS device documentation.
  • Verify network connectivity and that the MODBUS device is reachable and configured to accept requests from the node.

Links

Discussion