Buffer parser support - to get the correct 32bit float value

Hello.
Not able to manage the correct setting for the buffer parser.

Reading following addresses from my device:

grafik

Message from the debug node when I am reading the device.

{"topic":"c32e7007f4323d53","messageId":"63cbe33d636baba37fb145a2","payload":[11031,16858,62415,16870,26372,16900],"unitId":1,"modbusRequest":{"value":true,"unitid":"1","fc":3,"address":"689","quantity":"6","messageId":"63cbe33d636baba37fb145a2"},"responseBuffer":{"data":[11031,16858,62415,16870,26372,16900],"buffer":[23,43,218,65,207,243,230,65,4,103,4,66]},"_msgid":"b322c62d7cafd758"}

Created a flow to test - Was not able to config the buffer parser to deliver all 3 values correct within 1 setup. If I spilt the message i get the correct value.. :frowning:
Attached the flow:

[{"id":"c454cc2a06e55e7e","type":"tab","label":"Flow 5","disabled":false,"info":"","env":[]},{"id":"3f925c4448f287ab","type":"buffer-parser","z":"c454cc2a06e55e7e","name":"Temp1_Temp2_Temp3","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"temp1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"temp2","offset":2,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"temp3","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"swap16","swap3":"swap16","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":640,"y":680,"wires":[["22a63dc08a6db91c"]]},{"id":"23fe42f9727ff16c","type":"inject","z":"c454cc2a06e55e7e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[11031,16858,62415,16870,26372,16900]","payloadType":"json","x":390,"y":680,"wires":[["3f925c4448f287ab"]]},{"id":"22a63dc08a6db91c","type":"debug","z":"c454cc2a06e55e7e","name":"Temp1_Temp2_Temp3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":900,"y":680,"wires":[]},{"id":"56552dc460ddbf00","type":"debug","z":"c454cc2a06e55e7e","name":"[11031,16858,62415,16870,26372,16900]","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":540,"y":580,"wires":[]},{"id":"223e54b784a9b06f","type":"debug","z":"c454cc2a06e55e7e","name":"Temp1 ","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":910,"y":800,"wires":[]},{"id":"5743f6cbc3df61bc","type":"buffer-parser","z":"c454cc2a06e55e7e","name":"Temp1  - float (le) - Swap16","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"temp1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","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":660,"y":800,"wires":[["223e54b784a9b06f"]]},{"id":"a5b6f16888d9d6fd","type":"inject","z":"c454cc2a06e55e7e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[11031,16858]","payloadType":"json","x":390,"y":800,"wires":[["5743f6cbc3df61bc"]]},{"id":"9a10c4d75789f70a","type":"debug","z":"c454cc2a06e55e7e","name":"Temp2","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":910,"y":880,"wires":[]},{"id":"f90b8b875ab40aef","type":"buffer-parser","z":"c454cc2a06e55e7e","name":"Temp2 - float (le) - Swap16","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"temp2","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","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":660,"y":880,"wires":[["9a10c4d75789f70a"]]},{"id":"2fda119bdbce8cde","type":"inject","z":"c454cc2a06e55e7e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[62415,16870]","payloadType":"json","x":390,"y":880,"wires":[["f90b8b875ab40aef"]]},{"id":"c045bd7746b75a1b","type":"debug","z":"c454cc2a06e55e7e","name":"Temp3","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":910,"y":960,"wires":[]},{"id":"cec69d1d31657830","type":"buffer-parser","z":"c454cc2a06e55e7e","name":"Temp3 - float (le) - Swap16","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"temp3","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","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":660,"y":960,"wires":[["c045bd7746b75a1b"]]},{"id":"27a22480b8fe67d5","type":"inject","z":"c454cc2a06e55e7e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[26372,16900]","payloadType":"json","x":390,"y":960,"wires":[["cec69d1d31657830"]]}]

I added the same config as I am reading the single vales - ... must be something with the offset or Swap? What I am doing wrong ?

Thx for some support.
BR

Thank you.
Get the correct values.

Another question please.
Flow export to test:

[{"id":"c454cc2a06e55e7e","type":"tab","label":"Flow 5","disabled":false,"info":"","env":[]},{"id":"274e13bba251675b","type":"modbus-getter","z":"c454cc2a06e55e7e","name":"Tiefenbohrung_EIN_AUS","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"529","quantity":"4","server":"82be51f24ff6f9e9","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":570,"y":300,"wires":[["9b270f249a1b8710","a9a45e600e66e895"],[]]},{"id":"9b270f249a1b8710","type":"buffer-parser","z":"c454cc2a06e55e7e","name":"","data":"responseBuffer.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"Tiefenbohrung_Ein","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"Tiefenbohrung_Aus","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"swap16","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":true,"fanOutMultipleResult":true,"setTopic":true,"outputs":2,"x":850,"y":300,"wires":[["464cd0b82b692821"],["82fbea35a3dc3956"]]},{"id":"464cd0b82b692821","type":"debug","z":"c454cc2a06e55e7e","name":"Tiefenbohrung_AUS","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1100,"y":300,"wires":[]},{"id":"82fbea35a3dc3956","type":"debug","z":"c454cc2a06e55e7e","name":"Tiefenbohrung_EIN","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1090,"y":360,"wires":[]},{"id":"045a807823e854ef","type":"modbus-getter","z":"c454cc2a06e55e7e","name":"Tiefenbohrung_EIN_AUS","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"529","quantity":"2","server":"82be51f24ff6f9e9","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":570,"y":560,"wires":[["ca30247bb93f33a5","c2b7462321c1c3c2"],[]]},{"id":"ca30247bb93f33a5","type":"buffer-parser","z":"c454cc2a06e55e7e","name":"","data":"responseBuffer.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"Tiefenbohrung_Ein","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":true,"setTopic":true,"outputs":1,"x":850,"y":560,"wires":[["111603f0ee1a9bef"]]},{"id":"111603f0ee1a9bef","type":"debug","z":"c454cc2a06e55e7e","name":"Tiefenbohrung_EIN","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1090,"y":560,"wires":[]},{"id":"8ab651c0374d35df","type":"modbus-getter","z":"c454cc2a06e55e7e","name":"Tiefenbohrung_EIN_AUS","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"561","quantity":"2","server":"82be51f24ff6f9e9","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":570,"y":720,"wires":[["0cbafe16795a54d5","eac3a49dd5dec32a"],[]]},{"id":"0cbafe16795a54d5","type":"buffer-parser","z":"c454cc2a06e55e7e","name":"","data":"responseBuffer.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"Tiefenbohrung_Ein","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":true,"setTopic":true,"outputs":1,"x":850,"y":720,"wires":[["ef872d0b19b395c3"]]},{"id":"ef872d0b19b395c3","type":"debug","z":"c454cc2a06e55e7e","name":"Tiefenbohrung_AUS","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1100,"y":720,"wires":[]},{"id":"873dae5d1671b021","type":"inject","z":"c454cc2a06e55e7e","name":"AbfrageStart","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":290,"y":720,"wires":[["8ab651c0374d35df"]]},{"id":"92e7ba084b53644a","type":"inject","z":"c454cc2a06e55e7e","name":"AbfrageStart","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":290,"y":560,"wires":[["045a807823e854ef"]]},{"id":"a9a45e600e66e895","type":"debug","z":"c454cc2a06e55e7e","name":"debug 164","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":810,"y":360,"wires":[]},{"id":"c2b7462321c1c3c2","type":"debug","z":"c454cc2a06e55e7e","name":"debug 165","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":830,"y":500,"wires":[]},{"id":"eac3a49dd5dec32a","type":"debug","z":"c454cc2a06e55e7e","name":"debug 166","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":830,"y":660,"wires":[]},{"id":"edcd0ad7d0ceeb9d","type":"inject","z":"c454cc2a06e55e7e","name":"AbfrageStart","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":290,"y":300,"wires":[["274e13bba251675b"]]},{"id":"82be51f24ff6f9e9","type":"modbus-client","name":"RS232_MOXA_NP5110","clienttype":"serial","bufferCommands":false,"stateLogEnabled":false,"queueLogEnabled":false,"failureLogEnabled":true,"tcpHost":"192.168.100.18","tcpPort":"950","tcpType":"TCP-RTU-BUFFERED","serialPort":"/dev/ttyr00","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","serialAsciiResponseStartDelimiter":"0x3A","unit_id":"1","commandDelay":"50","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":false}]

I dont get it.
1 row: I am reading to read 2 values -> starting with FC3 / addr 529 / amount 4
debug show different buffer values compared to row 2 and 3

In row 2 and 3 I splited the reading (the values from the device are correct)
row 2 started with FC3 / addr 529 / amount 2
row 3 started with FC3 / addr 561 / amount 2

WHY is there a difference - what i am doing wrong ?
Thx a lot for your help.

Requesting four values from start address 529 will only return addresses 529, 530, 531 and 532.

If you want to access the values in address 529 and address 561 in one go, then you will need to request 34 items. This will give you values for address 529 through to 562. Then you can access the first floating point value in byte offset 0 and you can access the value for address 561 at byte offset 64

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