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

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
61
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
63
I'm working with a project that contains some routines in ST but mostly in ladder. Am I correct in assuming this 'rung': DB1001DO._01AV55_OPEN :=...
Replies
4
Views
100
Is there a way to reset the count on the RS Logix BackUp?? XXXXX PROGRAM IN PROGRESS_BAK445.RSS XXXXX PROGRAM IN PROGRESS_BAK446.RSS XXXXX...
Replies
8
Views
252
I have a few questions about Studio5000. 1. Why is my RA folder so big? its well over 100 GB. 2. How do you delete versions or extra files...
Replies
3
Views
272
Back
Top Bottom