# Unable to get gauge readings via Modbus Read / Response

**URL:** <https://discourse.nodered.org/t/unable-to-get-gauge-readings-via-modbus-read-response/20095>\
**Category:** Dashboard\
**Created:** [9 January 2020 06:30 UTC](https://discourse.nodered.org/t/unable-to-get-gauge-readings-via-modbus-read-response/20095 "2020-01-09T06:30:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Unikumet](https://avatars.discourse-cdn.com/v4/letter/u/7ea924/32.png) [@Unikumet](https://discourse.nodered.org/u/Unikumet)\
**Post date:** [9 January 2020 06:31 UTC](https://discourse.nodered.org/t/unable-to-get-gauge-readings-via-modbus-read-response/20095/1 "2020-01-09T06:31:00Z")

</div>

Hi all,

I am currently working on a project where I have connected a Brainbox ED-008 to receive pulses from an engine with regards to RPM counting.  
Using a Modbus Read, Modbus Response and a Gauge node here.

The engine sends out a pulse two times for every revolution, and is from there converted from a Hz signal to a 24V signal.  
My issue is that even thou the Modbus Response node receives counts, it only shows up a total amount of counts received, and not displaying current values as counts per minute:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/226bcde19e8fb7f186e2c6b7ca0909405775997b.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/039beafee6d2cbd7a017c62a20b866f21f33a4ff.png)

Does anyone know how I can change it from displaying as total counts over to counts / minute?

Best regards,  
Alexander

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [9 January 2020 06:43 UTC](https://discourse.nodered.org/t/unable-to-get-gauge-readings-via-modbus-read-response/20095/2 "2020-01-09T06:43:46Z")

</div>

You will need to filter a specific value that you want to use, currently you inject an object.  
What does the output of a debug node show ?

---

<div class="post-metadata">

**Author:** ![Unikumet](https://avatars.discourse-cdn.com/v4/letter/u/7ea924/32.png) [@Unikumet](https://discourse.nodered.org/u/Unikumet)\
**Post date:** [9 January 2020 07:38 UTC](https://discourse.nodered.org/t/unable-to-get-gauge-readings-via-modbus-read-response/20095/3 "2020-01-09T07:38:51Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/1a3c24f74bbc2527226af3edb0de7d98622775c8.png)

The debug node receives a msg payload with constantly increasing values due to registering the ticks. So it is able to receive the information, I'm just uncertain on how I am supposed to specify which values I want to get up on the gauge display.

The engine on which I am working on is counting two pulses per revolution, so I also have to scale it down by 2 to get the actual reading. Say for instance that the engine has a max capacity of 4500 RPM, I would receive 9000 pulses. Also stuck on how to get the true readings instead of the pulses received.

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [9 January 2020 07:53 UTC](https://discourse.nodered.org/t/unable-to-get-gauge-readings-via-modbus-read-response/20095/4 "2020-01-09T07:53:01Z")

</div>

You payload is array where value (2 pulses per revolution) is at first position.  
Feed this payload to change node to grab the value from array and divide it by 2  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/8c133ad99a1f978757a08a2c124786be1056877f.png)  
Then feed it to the gauge node.

---

<div class="post-metadata">

**Author:** ![Unikumet](https://avatars.discourse-cdn.com/v4/letter/u/7ea924/32.png) [@Unikumet](https://discourse.nodered.org/u/Unikumet)\
**Post date:** [9 January 2020 08:02 UTC](https://discourse.nodered.org/t/unable-to-get-gauge-readings-via-modbus-read-response/20095/5 "2020-01-09T08:02:13Z")

</div>

Tried adding a change node with a JSON expression as suggested, but receive this message in debug:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/ff6e5102285c440006b13818e46a00efbde5b953.png)

Tried changing the payload to [1], then i receive this:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/6f89c53fb8508e2d2a55351769d22a11acac6137.png)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [9 January 2020 08:02 UTC](https://discourse.nodered.org/t/unable-to-get-gauge-readings-via-modbus-read-response/20095/6 "2020-01-09T08:02:48Z")

</div>

~~I think~~ you can even use

`{{msg.payload[0]/2}}`

in the value field of the gauge node

---

<div class="post-metadata">

**Author:** ![Unikumet](https://avatars.discourse-cdn.com/v4/letter/u/7ea924/32.png) [@Unikumet](https://discourse.nodered.org/u/Unikumet)\
**Post date:** [9 January 2020 08:19 UTC](https://discourse.nodered.org/t/unable-to-get-gauge-readings-via-modbus-read-response/20095/7 "2020-01-09T08:19:55Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/fdd432a12f1fcae1744f4c4bead59f87fadd191d.png)

Values undefined. Any suggestions for what nodes to use to be able to define the value of the input?

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [9 January 2020 08:24 UTC](https://discourse.nodered.org/t/unable-to-get-gauge-readings-via-modbus-read-response/20095/8 "2020-01-09T08:24:19Z")

</div>

Sorry, my bad. I didn't read the first post carefully. You are working with modbus so these are buffers, not the numbers.  
I think you'll need to start with get some knowledge from here : [https://github.com/BiancoRoyal/node-red-contrib-modbus/wiki](https://github.com/BiancoRoyal/node-red-contrib-modbus/wiki)
