question about socket messages

lunknowl

Member
Join Date
Oct 2012
Location
vietnam
Posts
37
hi, i try using sample socket messages to send and receive data from another controllogix. in the sample program it have couple msg block that create socket, openconnect, read, delete socket. after i connect and disconnect i need to delete socket to open another connect. is there a bit, or any feedback from openconnect of socket showing that no device connect so i can delete socket? thanks
 
send and receive data from another controllogix

I presume you are testing your logic, rather than using raw sockets to communicate between ControlLogix instead of MSG instructions or Produced/Consumed Tags.

is there a bit, or any feedback from openconnect of socket showing that no device connect so i can delete socket?

Yes. When you use the OpenConnection service, it can fail because the target device is not listening on that port and returns a connection refusal, or because the target device never responds, resulting in a timeout.

Either one of those results in a .ER bit being set for the OpenConnection MSG instruction.

You can experiment with the exact .ERR and .EX_ERR error codes by disconnecting your target device, or targeting a device with a closed port.
 

Similar Topics

Hello again..trying something on an existing poorly written program and just wanted to double check something system is an A-B MicroLogix 1200 In...
Replies
5
Views
129
Good morning! Let me start by saying, I am still learning about this type of HMI programming. I recently watched a video about recipes and how it...
Replies
0
Views
53
I have some logic that I have written within a 5380 series controller that tracks the time an event is started, while the event is running an RTO...
Replies
2
Views
81
I have an HMI 2711R - T4T Series B, and I want to know which PLCs, besides Micro 820, can communicate with it.
Replies
2
Views
80
HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB...
Replies
2
Views
71
Back
Top Bottom