Modbus TCP variable split function code

one method - try this [Announce] node-red-contrib-buffer-parser - V2.0.2

The buffer parser takes your array of data & turns it into named items of any format you need (float, signed integer, byte revered if necessary (often necessary with modbus))...

then you can access each named items value like this

image

then paste that into the dashboard items like this...
image

image

demo flow...

[{"id":"68dcb361.27d5bc","type":"buffer-parser","z":"284fa9c6.f473c6","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int16be","name":"item1","offset":"0","length":"1","offsetbit":"0","mask":""},{"type":"int16be","name":"item2","offset":"2","length":"1","offsetbit":"0","mask":""},{"type":"int16be","name":"item3","offset":"4","length":"1","offsetbit":"0","mask":""},{"type":"int16be","name":"item4","offset":"6","length":"1","offsetbit":"0","mask":""},{"type":"int16be","name":"item5","offset":"8","length":"1","offsetbit":"0","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"object","resultTypeType":"output","multipleResult":false,"setTopic":true,"x":700,"y":540,"wires":[["ad8c8500.89fdd8","801b9f08.c2dcd","fa47c578.c6fdd8"]]},{"id":"5ad37cbb.990974","type":"inject","z":"284fa9c6.f473c6","name":"fake data","topic":"fake data","payload":"[12345,543321,31314,44444,71111,15243,43434,999]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":520,"y":540,"wires":[["68dcb361.27d5bc"]]},{"id":"ad8c8500.89fdd8","type":"debug","z":"284fa9c6.f473c6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":870,"y":540,"wires":[]},{"id":"801b9f08.c2dcd","type":"ui_text","z":"284fa9c6.f473c6","group":"9ff3d14a.12719","order":0,"width":0,"height":0,"name":"","label":"text","format":"{{payload.item1.value}}","layout":"row-spread","x":830,"y":640,"wires":[]},{"id":"fa47c578.c6fdd8","type":"ui_text","z":"284fa9c6.f473c6","group":"9ff3d14a.12719","order":1,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload.item2.value}}","layout":"row-spread","x":830,"y":680,"wires":[]},{"id":"9ff3d14a.12719","type":"ui_group","z":"","name":"Default","tab":"93ef5e6b.7382d","order":1,"disp":true,"width":"6","collapse":false},{"id":"93ef5e6b.7382d","type":"ui_tab","z":"","name":"STUFF","icon":"dashboard","disabled":false,"hidden":false}]