You dont, you get 60.98316955566406
(you really should be exact when asking for assistance.)
Anyhow, I can see from your function code your data is 32bit, then 16bit swapped then read as a Big Endian value. Which is odd - what writes the values to ModBus registers in the first place?
No-code solution...
Demo flow (use CTRL-I
to import)
[{"id":"d91ff976927ea647","type":"buffer-parser","z":"22bb2f33123bf539","name":"swap 32, swap16, BE","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatbe","name":"temperature","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap32","swap2":"swap16","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":760,"y":260,"wires":[["339f476ae7d0e70e"]]},{"id":"b0d077567a7af96f","type":"inject","z":"22bb2f33123bf539","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[ 61124, 17011 ]","payloadType":"json","x":520,"y":300,"wires":[["d91ff976927ea647","dbccc077e654fd40"]]},{"id":"339f476ae7d0e70e","type":"debug","z":"22bb2f33123bf539","name":"debug 153","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":970,"y":260,"wires":[]},{"id":"dbccc077e654fd40","type":"function","z":"22bb2f33123bf539","name":"function 4","func":"let pay = msg.payload;\n\nconst buf = Buffer.allocUnsafe(4);\nbuf.writeUInt16BE(pay[0], 2);\nbuf.writeUInt16BE(pay[1], 0);\nmsg.payload = buf.readFloatBE(0);\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":340,"wires":[["67a7553fc6f4235f"]]},{"id":"67a7553fc6f4235f","type":"debug","z":"22bb2f33123bf539","name":"debug 155","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":970,"y":340,"wires":[]}]