Jump to content

ComDrive and Sockets


Elfstone

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.