Error: Modbus exception 254 on modbus-tcp

Hello all, i have gateway to read data from modbus device and i use modbus-tcp in node-red to read data form device.
I config listener port 505 in gateway ,when i read modbus it response "Error: Modbus exception 254".
Could you please help me in this regards?


This above image is the setting of gateway.
But when i use modbus-serial (USB-modbus) as the same address, it succes to read data.

Flow

[{"id":"62059c78.4b0de4","type":"modbus-read","z":"7121fe96.cef1e","name":"","topic":"","showStatusActivities":true,"logIOActivities":false,"showErrors":true,"unitid":"1","dataType":"HoldingRegister","adr":"1","quantity":"10","rate":"10","rateUnit":"s","delayOnStart":false,"startDelayTime":"1","server":"20de53c2.01385c","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":170,"y":300,"wires":[["d6c37260.6d189"],[""]]},{"id":"20de53c2.01385c","type":"modbus-client","z":"","name":"","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":true,"tcpHost":"172.20.10.4","tcpPort":"505","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"5000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":true}]

hi,
the port to use by default with modbus tcp / ip is 502, not 505, try it.

using a serial connection would probably require a so called null-modem cable, where RX/TX lines need to be reversed on one side.of the connection.
Edit: Ah, my bad...thought from the pics that you were trying to read via serial.

i change listener port to 502, but it's not working.


...try the TCP-Type from DEFAULT to RTU-BUFFERED in the client settings

it's not working.
i think the problem was my gateway, i'll find another gateway and try again.

ok but if you need help put some more data because without information it is difficult to give you support...

Thank you.

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