Hello.
... trying to find the problem on my test set up.
Using RPI4 with node-red to connect the my Moxa NP5110 with TCP and to get some test data I connected a PC with Modbus Sim to my Moxa.
Followed the moxa driver installation without error and added server.
#=========================================================#
# This configuration file is created by Moxa NPort #
# Administrator Program automatically, please do not #
# modify this file by yourself. #
#=========================================================#
ttymajor=33
calloutmajor=38
#[Minor] [ServerIP] [data] [cmd] [FIFO] [SSL] [ttyName] [coutName] [interface][mode][BackIP]
0 192.168.100.18 4001 966 1 0 ttyr00 cur00 0 0
1 192.168.100.18 4002 967 1 0 ttyr01 cur01 0 0
Created the flow in node-red and trying to connect and read the data.
[{"id":"927518f8421e7727","type":"tab","label":"Flow-MOXA-Test","disabled":false,"info":"","env":[]},{"id":"c1ba493fd008da38","type":"modbus-read","z":"927518f8421e7727","name":"","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":true,"showWarnings":true,"unitid":"1","dataType":"HoldingRegister","adr":"2","quantity":"2","rate":"1","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"48425233340cc44d","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":270,"y":200,"wires":[["cb4b692fa0ce887f"],["2a3449dadc4de02c"]]},{"id":"cb4b692fa0ce887f","type":"modbus-response","z":"927518f8421e7727","name":"","registerShowMax":20,"x":550,"y":160,"wires":[]},{"id":"2a3449dadc4de02c","type":"debug","z":"927518f8421e7727","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":520,"y":220,"wires":[]},{"id":"48425233340cc44d","type":"modbus-client","name":"MOXA","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"failureLogEnabled":true,"tcpHost":"192.168.100.18","tcpPort":"4001","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","serialAsciiResponseStartDelimiter":"0x3A","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":false,"showWarnings":true,"showLogs":true}]
I am not able to connect ? See Error log
Any idea what i'm doing wrong?
Thx for support.
25 Dec 19:45:39 - [warn] [modbus-client:MOXA] Client -> fsm broken state after init Get More About It By Logging TCP@192.168.100.18:4001 default Unit-Id: 1
25 Dec 19:45:39 - [warn] [modbus-client:MOXA] Client -> fsm reconnect state after broken Get More About It By Logging TCP@192.168.100.18:4001 default Unit-Id: 1
modbus-serial TCP port: signal close: true +3ms
25 Dec 19:45:41 - [warn] [modbus-client:MOXA] Client -> fsm init state after reconnecting TCP@192.168.100.18:4001 default Unit-Id: 1
25 Dec 19:45:41 - [warn] [modbus-client:MOXA] Client -> fsm init in 2000 ms TCP@192.168.100.18:4001 default Unit-Id: 1
contribModbus:core:client Client -> connection close sent TCP@192.168.100.18:4001 default Unit-Id: 1 +4s
contribModbus:core:client Client -> TCP port TCP@192.168.100.18:4001 default Unit-Id: 1 +0ms
modbus-serial TCP port: signal error: Error: connect ECONNREFUSED 192.168.100.18:4001 +4s
modbus-serial {
modbus-serial action: 'port open error',
modbus-serial error: Error: connect ECONNREFUSED 192.168.100.18:4001
modbus-serial at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
modbus-serial errno: -111,
modbus-serial code: 'ECONNREFUSED',
modbus-serial syscall: 'connect',
modbus-serial address: '192.168.100.18',
modbus-serial port: 4001
modbus-serial }
modbus-serial } +4s
modbus-serial modbusTcpErrorHandling:connect ECONNREFUSED 192.168.100.18:4001 +4s
25 Dec 19:45:44 - [warn] [modbus-client:MOXA] Client -> fsm broken state after init Get More About It By Logging TCP@192.168.100.18:4001 default Unit-Id: 1
25 Dec 19:45:44 - [warn] [modbus-client:MOXA] Client -> fsm reconnect state after broken Get More About It By Logging TCP@192.168.100.18:4001 default Unit-Id: 1
modbus-serial TCP port: signal close: true +3ms
25 Dec 19:45:46 - [warn] [modbus-client:MOXA] Client -> fsm init state after reconnecting TCP@192.168.100.18:4001 default Unit-Id: 1
25 Dec 19:45:46 - [warn] [modbus-client:MOXA] Client -> fsm init in 2000 ms TCP@192.168.100.18:4001 default Unit-Id: 1
contribModbus:core:client Client -> connection close sent TCP@192.168.100.18:4001 default Unit-Id: 1 +4s
contribModbus:core:client Client -> TCP port TCP@192.168.100.18:4001 default Unit-Id: 1 +0ms
modbus-serial TCP port: signal error: Error: connect ECONNREFUSED 192.168.100.18:4001 +4s
modbus-serial {
modbus-serial action: 'port open error',
modbus-serial error: Error: connect ECONNREFUSED 192.168.100.18:4001
modbus-serial at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
modbus-serial errno: -111,
modbus-serial code: 'ECONNREFUSED',
modbus-serial syscall: 'connect',
modbus-serial address: '192.168.100.18',
modbus-serial port: 4001
modbus-serial }
modbus-serial } +4s
modbus-serial modbusTcpErrorHandling:connect ECONNREFUSED 192.168.100.18:4001 +4s
25 Dec 19:45:48 - [warn] [modbus-client:MOXA] Client -> fsm broken state after init Get More About It By Logging TCP@192.168.100.18:4001 default Unit-Id: 1