Modbus TCP problem - the master does not establish the connection (Vision280)
As mentioned in the topic, my goal is to establish a Modbus TCP communication between two Vision280 but have some problems. I can do the “slave part†- with proper socket initialization and Scan_EX the PLC responds to Modbus TCP requests sent from a PC with TopServer. However, after hours of trying, I cannot start up the Master device. It seems that the Master does not even send a single datagram in order to establish a connection with the slave device.
I would appreciate any kind of help. And this is what I did...
Master PLC program:
“Card init†with proper IP addresses.
“TCP/IP Sock Init†for TCP protocol and “masterâ€.
“Modbus IP config†with one slave defined.
When: “Card Initialized AND Socket Initialized AND NOT Function in Progress AND NOT Socket Connected†I execute the TCP/IP Connect with proper remote IP and port.
Then I have a Modbus IP R.H.R and Close socket but those FBs are never called.
Effect:
- after successful configuration (anyway, it seems so) the master does not send a single frame. I am sure of that as I connected my PC with point-to-point ethernet cable and used Wireshark to monitor the ethernet communication.
Trials:
Both PLCs seems to be in order. Both could operate as slaves with no problem (I tested it with TopServer).
During configuration I tried different Modbus IDs (also the stupid ones from the point of view of modbus communication network), that is: Master as 255 and Slave as 1, Master as 10 and Slave as 1, Master as 10 and Slave 255, Master and Slave 255.
With direct connection of PC and PLC I couldn't detect any kind of PLC activity while invoking the “TCP/IP connect†FB.
Even thought the 3 point, I tried the PLC to PLC communication – of course with no success. (“Ping†between the devices was OK).
System data I checked:
SDW 39 (ethernet general error counters). If I am not very much mistaken (I cannot check it now) the counters were equal 0.
SI 145 and SI 147 (those sockets I tried). After socket initialization the state was 14 (UDP ready). It was strange for me because I surly initialized the sockets for TCP protocol. So that part I do not understand...
I have to add that it is the first time when I use Unitronics so maybe I do not do some crucial initialization of something.
I would appreciate any kind of help of even hints about some more test I could perform. Maybe there are some more status words or error reports which I do not know about.
panel_modbus_tcp.vlp