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 never had the pleasure of working with a "Thermistor" until now and have a question. The Thermistor is a 10KOhm 4-20mA 2-wire device and I...
Replies
3
Views
74
Hi All, So I have a main routine with an instruction that's executed by XIC "Run" I have a JSR located on a rung below it. In the logic for that...
Replies
6
Views
170
I have a 120V relay, 120V DI card and a analog input. I was wanting to know if i could put a 24V DI and well as a 120V DI card on the same plc...
Replies
1
Views
90
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
197
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
4
Views
198
Back
Top Bottom