Elfstone Posted January 25, 2011 Report Share Posted January 25, 2011 Hi, I want to add compatibility with PLC (Vision 350) in our SCADA. SCADA will be the Master for a maximum of ten V350. Ideally I wished use Modbus TCP to interact with PLC but, I think it's impossible to read SD card .udt files directly in modbus TCP. So I decided to use the ComDriveDll. But Could I know, when the socket used in this dll is actualy opened and closed : Is the Ethernet class corresponds to a socket? (and so The fact declaring a new ethernet channel will create a new socket ?) and the fact getting a PLC objet will connect the socket ? Because in my code, I don't know If I must declare several Ethernet objects for each of my V350 or only one is sufficient, idem for the PLC object In normal condition my software will read the current values off each V350 (wich each of them will be a master of a ModbusRTU net) every 5 seconds. For all other modules of other brands, I use Modbus TCP and connect and disconnect the socket every 5 seconds for each modules (So as to give the module the capacity to respond to another master) Thanks Quote Link to comment Share on other sites More sharing options...
Saragani Posted January 26, 2011 Report Share Posted January 26, 2011 If PC is Ethernet Master (The PLC is in Listen Mode) then: 1) Each Ethernet class corresponds to a socket. The socket is being created only after you are trying to establish a connection. 2) When you get a PLC Object then the socket should be opened. 3) If socket is being closed for some reason, when trying to communicate with the PLC again, the PLC object will try to reopen the socket and communicate with the PLC. 4) if socket could not be opened or communication failed, you will get ab exception. 5) Since each of the PLCs has a different IP address, you will need to declare an ethernet channel for each of them. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.