RSLogix 5000 socket

Join Date
Oct 2016
Location
Jylland
Posts
7
Hello

I am working with socket communication, on the RSLogix 5000 platform, with a logix L55 v16 processor and a 1756-EWEB card. I got it up and running, but are experiencing issues with my error handling.
When I reset all communication with a MSG instruction, first time works fine, but if I do it second time fast again, the server part "hangs", and the 5 minute timeout must run out, before any communication is possible again.
I can see the server instance in the web interface, but cant reset it, and the MSG instruction gives error code: 16#001f extended code 16#0000_0204

Hope somebody can help.

Best regards
Jesper
 
You need to use Delete All message to close the sockets.
You can also set inactivity timeout to a lower value
Also, I would recommend you to use a newer module instead (EN2T, EN2TR)
 
Hello

I am using the delete all function (Service code 51, Class 342 instance 0 Attrib 0). It is when I use this 2 times in a row, it fails.
The problem is not HW related, I experience the same with EN2T card, and L7X processors in version 20+.

Regards
Jesper
 
Delete may fail if no instances exists.
Without seen your code it's hard to say what is wrong.

Instead of writing your code, I would recommend to use one the Samples from the knowledge base. Specifically, for learning purposes you can use technote 32962.
For real application you can start with Socket AOI.
 
I haven't worked on sockets for a while so my memory is a bit hazy, but I believe if you try and delete all sockets when no sockets exist, then it will error and wait for the timeout.

First you should check to see if a socket exists, and also you can reduce the MSG timeout value to a more acceptable value (5 secs, 10 secs).
 
Thank you for replying.
When I test it, and start with reset after power up (and no connections exist), the MSG is DN without problems, even if I try to do it over and over, DN every time.
But if I make the external SW run, I power on the EWEB card on the PLC, run the "Create connection" MSG, afterwards run the "Accept connection" MSG, and then reset, then it errors out.
 
What is the service timeout set in the Source UDT of the "Accept" message?
You may need to reduce it and use a logic to re-trigger it with a shorter timeout.
Again, my recommendation is to use AOI code instead of trying to invent your own.
 
Hello again

Service timeout is set to 10000 (10 sec??), but what bothers me, that it works first time to delete all, but not 2 times in a row. It appears, that if no remote client connects to the created server instance, it works every time, no problem. If a remote client "get in", but not up and running correctly, it hangs for 5 minutes, when I try to delete all.

The code I am using, is not my own invention, but example code from Rockwell Homepage, just tested and found unstable. I do not use AddOn Instructions on unstable code, because when used IRL, I cant do anything about it, when it breaks down. When I test it to be stable, I would also prefer AOI for future use.

Regards
Jesper
 

Similar Topics

I would like to communication with application installation in my printer server via TCP port 5450. i.e ., 71.16.40.200:5450 . How can i write...
Replies
1
Views
402
If you click help and then click Vendor Sample Projects while in RSLogix 5000, a PDF will pop up with some neat examples. One example shows how to...
Replies
5
Views
3,837
I am completely stuck on building a ladder program that requires a start button to be pressed 3 times to turn on motor 1. Then motor 2 starts...
Replies
20
Views
525
First off, I'm a hobbyist-level programmer, and this program isn't controlling anything anything that could even remotely be considered "life...
Replies
18
Views
505
Back
Top Bottom