Modbus TCP read data

Hello,
I have no success for reading data from a davice by using Modbus TCP:

[{"id":"a15ab1d7.fa063","type":"tab","label":"NETIO AN32a (Modbus/TCP)","disabled":false,"info":""},{"id":"fa8953c2.b8e12","type":"function","z":"a15ab1d7.fa063","name":"Voltage request","func":"msg.payload = { value: msg.payload,\n'fc': 3,\n'unitid': 255, \n'address': 50520 , \n'quantity': 2 }; \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":304,"y":188,"wires":[["4655e9ec.33a088"]]},{"id":"4655e9ec.33a088","type":"modbus-flex-getter","z":"a15ab1d7.fa063","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"d91e649d.344078","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":518,"y":188,"wires":[["cba84f1b.676f28"],[]]},{"id":"397df8c7.ed4e68","type":"inject","z":"a15ab1d7.fa063","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":192,"wires":[["fa8953c2.b8e12"]]},{"id":"cba84f1b.676f28","type":"debug","z":"a15ab1d7.fa063","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":699.25,"y":186.66665649414062,"wires":[]},{"id":"d91e649d.344078","type":"modbus-client","d":true,"name":"Diris A30 HV linkes Feld","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"192.168.130.161","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":255,"commandDelay":1,"clientTimeout":500,"reconnectOnTimeout":false,"reconnectTimeout":500,"parallelUnitIdsAllowed":false}]

With "Modbus Doctor", my request is successful:

What going wrong, please?

Node red v1.2.3
node-red-contrib-modbus 5.13.3

thanks for any help, Frank

Hi Frank, more questions than answers (but hopefully lead you to an answer)

Do you get any errors in the sidebar?

Is there anything coming out of the modbus node?

Is the node-red server on the same network as the modbus device?

Why are you adding a payload to the msg in the function? Look at the examples littered around the forum and the readme for that flex node

Error Found, the Server which should get the request was set as INACTIVE.
But the Icon shows active, I guess there was meaning that the node is active.

Problem sovled, getting requests and values,
Sorry for the trouble,

Frank

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