Overview
This node converts Modbus register or discrete coil/input data into various human-readable formats. It supports quick conversions for common Modbus data types like integers, floats, doubles, BCD, and bitfields, as well as custom conversions with manual configuration. It is useful for processing raw Modbus data from industrial devices, sensors, or PLCs into meaningful values for further automation or analysis.
Use Case Examples
- Converting two Modbus registers into a floating-point temperature value.
- Extracting individual bits from a status register to monitor device flags.
- Counting active coils in discrete data to summarize device states.
- Applying scaling factors to raw register values for engineering units conversion.
Properties
| Name | Meaning |
|---|---|
| Data Type | Type of Modbus data being processed, either numeric registers or discrete coils/inputs. |
| Conversion Mode | Choose between quick conversions for common types or custom manual configuration. |
| Quick Convert Type | Type of quick conversion to apply, such as single INT16, float, long integer, double, BCD, bitfield, or discrete-specific conversions. |
| Byte Order | Byte order for multi-register values (Big Endian or Little Endian). |
| Word Swap | Swap the order of 16-bit words within multi-register values (e.g., ABCD→CDAB). |
| Scale | Whether to apply a scaling factor to the converted value. |
| Scale Factor | Multiply the converted result by this factor (e.g., 0.001 to divide by 1000). |
| Long Integer Value | For 32-bit integers, choose to treat as signed, unsigned, or return both. |
| Include Conversion Metadata | Whether to include details about the conversion such as type, scale factor, and raw registers. |
| Add Timestamp | Whether to add a timestamp to the output. |
| Output Field Name | Name of the field containing the converted values. |
| Metadata Field Name | Name of the field containing conversion metadata if included. |
| Custom Conversions | Manual configuration of multiple conversion rules specifying name, start register, data type, byte order, word swap, scale factor, and offset. |
Output
JSON
output- Field containing the converted Modbus data values.conversion- Optional field containing metadata about the conversion process, such as type, byte order, scaling, and raw registers.timestamp- Optional ISO timestamp of when the conversion was performed.
Dependencies
- An internal utility module for data conversion
Troubleshooting
- Error 'No register/discrete data found in input' indicates the input data does not contain expected Modbus register or coil arrays; ensure the input data structure matches expected formats.
Conversion errors for custom rules may appear as '_error' fields in output; verify the start register and data type settings for each custom conversion. - Incorrect byte order or word swap settings can lead to invalid converted values; verify these settings match the source device's data format.
- Scaling factor set to zero or out of range may cause unexpected results; ensure scaling factor is within allowed range (0.000001 to 1000000).