# Energymeter Simulation with Modbus/ Slave

**URL:** https://discourse.nodered.org/t/energymeter-simulation-with-modbus-slave/82350
**Category:** General
**Tags:** modbus
**Created:** [26 October 2023 07:15 UTC](https://discourse.nodered.org/t/energymeter-simulation-with-modbus-slave/82350 "2023-10-26T07:15:42Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![chris123](https://avatars.discourse-cdn.com/v4/letter/c/5fc32e/32.png) [@chris123](https://discourse.nodered.org/u/chris123)
#### Post date: [26 October 2023 07:15 UTC](https://discourse.nodered.org/t/energymeter-simulation-with-modbus-slave/82350/1 "2023-10-26T07:15:42Z")

</div>

Hi all,  
I've got an Solis PV Inverter which is normaly connected by Modbus to an Acrel Acr10r Energymeter. I can't use the Acrel Meter for some reason. I've got a Finder Energymeter installed. The Finder Energymeter can measure the equivalent values, but they are stored in different registers and different formats.

I can readout all necessary values of the FinderMeter by Modbus in Node-Red. That's ok. But I'm stucking now how I can supply the new values to the inverter. I know what the Inverter is asking for (register+data). But I can't see how to build it in node-red.

Normaly the Solis Inverter asks ID=1 for a bunch of registers, but how to serve them in Node-Red I could not find a kind of "Slave" Node. I'm working with the "node-red-contrib-modbus" Nodes

My readout of the FinderMeter is this:

 ![finder](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/5/c560ceb3244c3f3c619b9dc456bc6d8d6749664b.jpeg)

Thank you very much in advanced for your help!

---

<div class="post-metadata">

### Author: ![Duncan](https://avatars.discourse-cdn.com/v4/letter/d/ecc23a/32.png) [@Duncan](https://discourse.nodered.org/u/Duncan)
#### Post date: [26 October 2023 07:56 UTC](https://discourse.nodered.org/t/energymeter-simulation-with-modbus-slave/82350/2 "2023-10-26T07:56:10Z")

</div>

Hi Chris,

I'm currently facing the same issue. Essentially, I'm looking to configure an energy meter of one type to function as a Modbus RTU slave for another device. Unfortunately, I'm unsure of how to set it up as a slave.

Fortunately, there are plenty of knowledgeable individuals on the forum who have likely tackled this problem numerous times.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [26 October 2023 08:16 UTC](https://discourse.nodered.org/t/energymeter-simulation-with-modbus-slave/82350/3 "2023-10-26T08:16:28Z")

</div>

> [@chris123](#):
>
> I could not find a kind of "Slave" Node.

The contrib-modbus package includes a modbus-server node which, according to the documentation, looks as if it should do what you want. I have not used it myself though.

---

<div class="post-metadata">

### Author: ![chris123](https://avatars.discourse-cdn.com/v4/letter/c/5fc32e/32.png) [@chris123](https://discourse.nodered.org/u/chris123)
#### Post date: [27 October 2023 07:18 UTC](https://discourse.nodered.org/t/energymeter-simulation-with-modbus-slave/82350/4 "2023-10-27T07:18:21Z")

</div>

Hi,  
thank you, I think I got the principal of the slave function:

You need to place a Modbus-Server-Node. It looks like it just should be here and be configured for IP Adress and so on (not much input/ output).

Then you need to write the values into the registers of the Modbus-Sverver-Node with the FlexWriter Node. But they are not connected with wires like I would have sugested, Its like writing to any other Modbus item.

Now the Modbus-Server-Node is replying the bevore seted values if asked for with FlexGetter for example.

I will try to build this up and give an other reply.

BR!

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [27 October 2023 08:32 UTC](https://discourse.nodered.org/t/energymeter-simulation-with-modbus-slave/82350/5 "2023-10-27T08:32:26Z")

</div>

> [@chris123](#):
>
> Then you need to write the values into the registers of the Modbus-Sverver-Node with the FlexWriter Node

As described in the help text, you can also feed in values by injecting messages directly into the node.

---

<div class="post-metadata">

### Author: ![Duncan](https://avatars.discourse-cdn.com/v4/letter/d/ecc23a/32.png) [@Duncan](https://discourse.nodered.org/u/Duncan)
#### Post date: [27 October 2023 14:29 UTC](https://discourse.nodered.org/t/energymeter-simulation-with-modbus-slave/82350/6 "2023-10-27T14:29:29Z")

</div>

Hi,  
The modbus-server-node is only for Modbus TCP, correct? Or is there a way to act as a Motbus RTU slave?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [27 October 2023 14:45 UTC](https://discourse.nodered.org/t/energymeter-simulation-with-modbus-slave/82350/7 "2023-10-27T14:45:39Z")

</div>

> [@Duncan](#):
>
> The modbus-server-node is only for Modbus TCP, correct?

Apparently so. I don't know of a serial server.

---

<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: [26 December 2023 14:46 UTC](https://discourse.nodered.org/t/energymeter-simulation-with-modbus-slave/82350/8 "2023-12-26T14:46:33Z")

</div>

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