HI all, i need of a modbus server and im using Modbus-flex server.
the server is configured as figure below
and i write the data in to the holding register
msg.pv=msg.payload.PV
msg.SP=msg.payload.SP
msg.PV_BK=msg.payload.PV_BACK
msg.payload = {
'value': [Math.round(msg.pv),Math.round(msg.SP),Math.round(msg.PV_BK)],
'register': 'holding',
'address': 0 ,
'disableMsgOutput' : 0
};
return msg;
and i see it from the debug of server
{"type":"holding","message":{"payload":{"value":[464,465,455],"register":"holding","address":0,"disableMsgOutput":0},"topic":"","_msgid":"b5e2ad2aeca32b6c","pv":464,"SP":464.99957275390625,"PV_BK":454.79998779296875,"bufferAddress":0,"bufferPayload":{"0":208,"1":209,"2":199},"bufferData":[208,209,199],"wasMultipleWrite":true},"payload":[208,209,199,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"_msgid":"b58c502bce7a1edb"}
but when i read the value from it the result is not the same
[51200,0,0,0,0,0]
Why ?
Maybe the problem is the datatype of number that i put in to the register?
Anyone know the flex modbus server how it work?
thanks in advantage!