Overview
This node enables interaction with MODBUS devices by reading from or writing to memory addresses (registers or coils). It is useful in industrial automation, building management systems, and IoT scenarios where MODBUS protocol is used to communicate with hardware devices such as sensors, actuators, or controllers.
Typical use cases include:
- Reading sensor data or device status from MODBUS registers.
- Writing control commands or configuration values to MODBUS registers or coils.
- Turning devices on/off by toggling coil states.
For example, you can read temperature values stored in holding registers or switch a relay on/off by writing to a coil.
Properties
Name | Meaning |
---|---|
Memory Address | The memory address (register index) to read from or write to. |
Write Target | The type of target to write to: either a "Register" or a "Coil". |
Value | The numeric value to write to the specified register (range: -32768 to 32767). |
Coil Value | The value to write to the coil: "On" (65280) or "Off" (0). |
Output
The node outputs a JSON array containing an object with a data
field:
- For read operations,
data
is an array of integers representing the values read from the requested MODBUS registers. - For write operations,
data
contains the response object returned by the MODBUS device confirming the write action.
No binary data output is produced by this node.
Dependencies
- Requires connection credentials for accessing a MODBUS device via an API client.
- The node depends on an external MODBUS client library (imported internally) to perform read/write operations.
- Proper network access and correct MODBUS device configuration are necessary.
Troubleshooting
- MODBUS Error: If the node throws errors prefixed with "MODBUS Error:", it indicates communication issues or invalid parameters sent to the device.
- Verify that the memory address and quantity are within valid ranges supported by your MODBUS device.
- Ensure the device is reachable over the network and credentials/API keys are correctly configured.
- Confirm that the write target matches the device's capabilities (e.g., writing coils vs registers).
- Value Range Errors: Writing values outside the allowed range (-32768 to 32767 for registers) may cause failures.
- Timeouts or Connection Failures: Check network connectivity and firewall settings.