Query on Configuring `node-red-contrib-modbus` 5.43.0 for Specific Modbus Server Behavior

Dear Community,

I am working with an energy meter Modbus server and need to replicate its specific behavior using the node-red-contrib-modbus 5.43.0 library. Below is an excerpt from the Modbus server specification for reference:

Physical Address Length (words) Variable Eng. Unit Data Format Notes
000Ah 2 V L3-L1 INT32 Value weight: Volt*10
000Bh 1 Carlo Gavazzi identification code UINT16 For a valid request, length must be 1; otherwise, the request is forwarded to instantaneous variables.

Objective:
I would like to understand if the node-red-contrib-modbus 5.43.0 library can be configured to achieve the following behavior:

  1. Read Registers: Handle a read request for specific registers (e.g., 000Ah and 000Bh) and correctly process data with specified data formats (INT32 and UINT16 respectively).
  2. Conditional Behavior: Implement conditional logic such that:
    • If a request is made for address 000Bh with a length other than 1, it forwards the request to a different register range (e.g., instantaneous variables).

Questions:

  1. Can the node-red-contrib-modbus library support this behavior through its built-in nodes and configuration?
  2. If additional logic is needed (e.g., for conditional forwarding), is there an example or guidance on how to implement this using Node-RED function nodes or other mechanisms in conjunction with node-red-contrib-modbus?
  3. Are there any specific configurations or node settings that would need to be adjusted to properly parse the data formats (INT32 for register 000Ah and UINT16 for register 000Bh)?

Any advice, examples, or documentation references would be greatly appreciated.

Thank you for your assistance.

The node has built in examples and demos. Press CTRL-I, select examples.

There is a complimentary node you can install node-red-contrib-buffer-parser that can assist with getting data into the necessary format.

1 Like

I would just add that i query 4 x DTSU-666 continually on our network and the nodes work perfectly - i feed the output through the Buffer parser nodes and then output as appropriate.

Craig

Thx so far. It seems to be a strange behaviour of the Carlo Gavazzi. The only thing that currently bothers me in my emulator is that I cannot manage a ‘shadow register’ for the ‘ID value’, which leads to incorrect readings when reading the value for the phase voltage ‘V L3-L1’.
I still need to have a look at the buffer parser node. :hugs: