Creating a socket to listen to UDP packets. (RSLogix)

RetiQlum

Member
Join Date
Feb 2017
Location
Arkansas
Posts
30
I am attempting to open a UDP socket to list for heartbeat packet from a device.

I created a data type with 12 bytes.

Type DINT (2 for UDP)
Addr
Family INT (2 for IPv4)
Port INT (4001)
Addr DINT (0 because I wanted to use the local address.) I also tried #C0 A8000A for the local address.)

The message is set to CIP Generic, Socket Create and the path is to the EN2T card.

There is a DINT to return the instance value.

What Am I doing wrong?
 
Are you sure you're using a 1756-EN2T, not an older -ENBT ?

What firmware revision does the Ethernet module have ?

What are the exact codes that indicate that the object isn't supported by the ENBT ?

If you can post the *.ACD file or at least a screenshot, folks might be able to make some suggestions.
 
1756-EN2T /A firmware is Rev. 1003 - which I just found out is about 5 major revisions old and could be the cause of Error 16#0005. The message was not very clear.

Thanks though!
 
You wouldn't happen to know what the latest revision I can use do you? I keep getting "unable to communicate with device" from Control Flash for firmware version 5.something.

This would be a lot easier if I had the new one I am supposed to get.
 
Hold the Pony!...

RetiQlum said:
...I keep getting "unable to communicate with device" from Control Flash for firmware version 5.something...

It's possible you may have permanently damaged your EN2T module but we won't know until you attempt the flash again using the correct procedure.

But first, let's clear up what you have and what you need...

RetiQlum said:
You wouldn't happen to know what the latest revision I can use do you?...

To support Open Sockets communication your 1756-EN2T Series A must be using firmware revision 5.x minimum and your Logix processor must be using firmware revision 15.x minimum.

Your 1756-EN2T Series A is currently at firmware revision 1.003 which of course will not work. So you have correctly guessed that this may be the main reason you are here.

Firmware revision 1.003 happens to be the oldest and original revision that these Series A modules support...

1756-EN2T Supported Firmware Revisions:

Rev./Series
1.003 A
1.004 A
2.005 A B C
2.007 A B C
3.004 A B C
3.006 A B C
4.002 A B C
4.003 A B C
5.007 A B C
5.008 A B C
5.028 A B C
10.006 D
10.007 D
10.010 D

Series A support firmware revision 1.x - 5.x, Series B & C support firmware revision 2.x - 5.x whereas Series D support only firmware revision 10.x.

So the latest you can and should flash the Series A module to is revision 5.028 for Open Sockets communication support.

But now the correct procedure...

You cannot flash a Series A at firmware revision 1.x directly to revision 5.x. You must first flash to revision 2.x minimum and then revision 5.x. Attempting to flash from 1.x directly to 5.x may have rendered the module inoperable. You should now attempt a flash to revision 2.x and see if that is successful. If so, then move on to flash to revision 5.x. If it will not successfully flash for you then it is most likely that the module is damaged.

If that all works then you should be good to go. I would also advise you to get the latest Add-On Profile (AOP) and EDS for these modules.

Good luck.

Regards,
George
 
Is there any decent sample code for something like this? It shouldn't be that hard to just listen on a port. Unfortunately the port keeps timing out or stopping with no indication I can find as to why.
 
The Socket has a default inactivity timeout of 5 minutes. This can be increased up to a maximum of 24 days.

Alternatively, if you add a separate Get or Set of any attribute for the Socket then this will count as activity on the Socket and reset the inactivity timer. If you were to configure a GetAttributeSingle say every 60 seconds then this will effectively disable the timer.

That may be of use to you if indeed inactivity timeouts are the issue here. You should be able to see any error codes for the MSG instruction on its configuration window at the bottom. For inactivity timeouts, the 1756-EN2T modules will set their Error bit and display Error Code: 16#00FF with Extended Error: 16#0046.

So far you have only mentioned using a Socket Create service. In your first post you appeared to have had an issue with the Socket Create not populating the Instance DINT tag. Is this still the case?

Regards,
George
 
Here's what I am doing:

DeleteAllSockets on startup (although sometimes I get errors.)
SocketCreate
move the instance from that into the .instance of the next step.
ReadSocket

It works for a while and then just stops. The path for the create and read are 1,1 for the EN2t card. It works for a while and then stops. I am not trying to do anything fancy.

Thanks for all your help so far.
 
I know that there is something simple I am missing, I just don't know what. The "Application Technique" manual isn't very specific on what is returned and when.
 

Similar Topics

The idea here is to provide for a brief rapid influx of message codes while preventing sequentially repeating the same message. i.e. if two...
Replies
23
Views
677
Hello everyone, In a factory where we installed Citect 7.20 the computer began to show the first signs of end of life. They never considered...
Replies
0
Views
73
Hi everyone, I'm a last year student at the university in Ghent, and for my thesis i need to write a TwinCAT program that writes data to a .daq...
Replies
0
Views
141
When I go to create a new module in Studio 5000 I can't enter any information for the IP Address or change any other fields. Is there any fix to...
Replies
1
Views
253
Hello I am kind of new to the Rockwell world, i've mainly worked with Siemens and Schneider untill now. I am to make a HMI application running...
Replies
7
Views
1,064
Back
Top Bottom