Hi all,
I got help here already with a similar problem but now i got stuck again.
I'm reading values from a finder energymeter with modbus into node-red. That's ok.
But now I'm not able to convert the two incomming 16bit register into one signed 24bit value. There is a description out of the manual which says the incomming data need to be transvered into a signed 24bit number. Until now I converted the incomming modbus-data with an buffer-parser. This worked perfekt for unsigned 24bit, because we could use the 32bit one. (Many thanks to Steve-Mcl!)
This ist the description of the manual:
The example of the manual works with 0xFE1DC0. Divided into two 16bit Words ist (FE1D, 00C0). This into decimal is (65053, 192). Thats what I'm injecting into my example:
[{"id":"0a6cee1938af483e","type":"tab","label":"Flow 10","disabled":false,"info":"","env":[]},{"id":"545bde1568fd7ba7","type":"inject","z":"0a6cee1938af483e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[65053, 192]","payloadType":"json","x":150,"y":400,"wires":[["c716d07040b3e1b6"]]},{"id":"c716d07040b3e1b6","type":"buffer-parser","z":"0a6cee1938af483e","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int32be","name":"item1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":"0x0ffffff"},{"type":"int8","name":"item2","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":370,"y":400,"wires":[["e2f9f5f802c0358c"]]},{"id":"e2f9f5f802c0358c","type":"debug","z":"0a6cee1938af483e","name":"debug 321","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":590,"y":400,"wires":[]}]
Thank you!
BR
Chris