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

**URL:** <https://discourse.nodered.org/t/query-on-configuring-node-red-contrib-modbus-5-43-0-for-specific-modbus-server-behavior/94842>\
**Category:** General\
**Tags:** modbus, home-assistant, server\
**Created:** [23 January 2025 13:35 UTC](https://discourse.nodered.org/t/query-on-configuring-node-red-contrib-modbus-5-43-0-for-specific-modbus-server-behavior/94842 "2025-01-23T13:35:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fkroepfl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fkroepfl/32/98291_2.png) [@fkroepfl](https://discourse.nodered.org/u/fkroepfl)\
**Post date:** [23 January 2025 13:35 UTC](https://discourse.nodered.org/t/query-on-configuring-node-red-contrib-modbus-5-43-0-for-specific-modbus-server-behavior/94842/1 "2025-01-23T13:35:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [23 January 2025 19:56 UTC](https://discourse.nodered.org/t/query-on-configuring-node-red-contrib-modbus-5-43-0-for-specific-modbus-server-behavior/94842/2 "2025-01-23T19:56:49Z")

</div>

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

> [@fkroepfl](#):
>
> 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`)?

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

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [24 January 2025 00:40 UTC](https://discourse.nodered.org/t/query-on-configuring-node-red-contrib-modbus-5-43-0-for-specific-modbus-server-behavior/94842/3 "2025-01-24T00:40:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fkroepfl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fkroepfl/32/98291_2.png) [@fkroepfl](https://discourse.nodered.org/u/fkroepfl)\
**Post date:** [25 January 2025 16:56 UTC](https://discourse.nodered.org/t/query-on-configuring-node-red-contrib-modbus-5-43-0-for-specific-modbus-server-behavior/94842/4 "2025-01-25T16:56:24Z")

</div>

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. 🤗

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 April 2025 16:56 UTC](https://discourse.nodered.org/t/query-on-configuring-node-red-contrib-modbus-5-43-0-for-specific-modbus-server-behavior/94842/5 "2025-04-25T16:56:34Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
