Overview
This node acts as a trigger that listens for changes in MODBUS TCP registers by periodically polling specified memory addresses. It is useful in industrial automation or IoT scenarios where you want to react to changes in sensor data, device states, or other register values exposed via the MODBUS protocol.
For example, you can use this node to monitor temperature sensors connected to a MODBUS-enabled device and trigger workflows when the temperature crosses a threshold, or track status registers of machinery to automate alerts or maintenance tasks.
Properties
Name | Meaning |
---|---|
Memory Address | The starting memory address (register index) from which to read MODBUS holding registers. |
Quantity | The number of consecutive registers to read starting from the memory address. |
Polling | The interval in milliseconds at which the node polls the MODBUS device for register data. |
Options | Additional optional settings (currently empty, reserved for future options). |
Output
The node outputs JSON data containing an array under the key data
. This array holds integer values read from the specified MODBUS holding registers. Each value corresponds to one register's signed 16-bit integer content.
Example output JSON structure:
{
"data": [123, -45, 678, ...]
}
No binary data output is produced by this node.
Dependencies
- Requires access to a MODBUS TCP device.
- Needs an API key credential configured in n8n to authenticate with the MODBUS service.
- Uses an internal MODBUS client library to perform register reads.
Troubleshooting
Common issues:
- Invalid memory address input (non-numeric) will cause an error.
- Connection errors to the MODBUS device may occur if network or credentials are misconfigured.
- If no changes are detected in the polled registers, the node will not emit new executions.
Error messages:
"Memory address must be a valid number."
— Ensure the memory address property is set to a valid numeric value.- Errors from the MODBUS client (e.g., connection refused, timeout) will be thrown and stop the polling interval. Check device availability and credentials.
Resolution tips:
- Verify the MODBUS device IP and port are reachable.
- Confirm the API key credential is correctly set up.
- Adjust polling interval to balance responsiveness and load on the MODBUS device.