AB Generic string communication

The reason that many samples mentioned EWEB is because it was the first module that supported Sockets. It was the only module for many years until Sockets were introduced in EN2T and 5370 complactlogix platforms. While there is a small difference in implementations, most of sample code applications use workarounds to make these differences transparent for users.
 
Here are the AOI after I made a few changes:

Added the length the the write masage, but I can't see what else I am doing wrong, it just returns a general error that doesn't give me much.
 
What exact error?
Did you get the error before you made changes?
This AOI is been out for many year and we used it many times without making any changes.
 
Well I think it has been the source length that has been giving me problems, here is what I used:

Socket Create = 12 Bytes

OpenConnectionMsg = 32 Bytes (8 + length of destination string)
Error Code= 16#0013 (Configuration data size too short)

SocketWriteMsg = = 16 Bytes + length of string
Error Code = 16#00ff, Extended error code = 16#0000_0039 (General Error)

SocketDeleteMsg = 0 Bytes
SocketReadMsg = 8 Bytes
 
https://literature.rockwellautomation.com/idc/groups/literature/documents/at/enet-at002_-en-p.pdf
Page 49 has explains both errors

Error 13 means that your source data calculations are incorrect and UDT has less bytes that you are sending.
If you are using the AOI, it does source length calculations correctly.

Error 39 is related to the instance number that must be copied from Create message. Without seen your code I cant say what you are doing wrong.
AOI does it correctly.

So why you are not using AOI?
 
That is what I am trying to do.

I this copy of the AOI, the only thing I have done is is adding a rung to copy ind my test string.

And change the addressing to the Ethernet port of the CPU and the IP for the port.

PC Socket server: 192.168.0.157, Port 20001

PLC 192.168.0.81
 
The PC I am using at the moment only have version 31 installed.

So my theory is that somethings get lost in translation, I will try installing version 16.4 and change the addressing for the Ethernet port before translating into version 31
 
If you open L5X files then you can see that V2 was provided in v16.04 and V3 in V28.
I never used V3, but V2 should be working just fine in all versions
 
I used this AOI in V30 just a few days ago. Did you copy and past the code or import it? If you copy/pasted it, all the values will be initialised, including the MSG structures and tags, so nothing will work properly. If you import the AOI, the following is all you will need:

1) SKT_MSG_Client_Create.Path is $01$00
2) SKT_DATA_Client.Create_Source.Addr.Port is 20001
3) SKT_DATA_Client.Connect_Source.DestAddr is 192.168.0.157?port=20001
4) Set your Client_Data.Timeout in the AOI Configuration Dialog(e.g. 20ms)
5) Enable the client
6) Write the data


Be careful which program you use to check the comms. I have had mixed results with different programs, and Hercules works well. See how you go (y)
 
I assume that OP read the instructions.
The description in this technote clearly states that you must use Rung Export/Import to preserve Message configurations and other settings. Copy/Paste will not work.
 
I can only say that ACD file that you have attached in post #22 above has nothing to do with sample code that you should be using from Technote 50122.
 

Similar Topics

Not sure if this is even possible but I have an micro 1400 that I would like to connect to HMI. I am using rs232 from PLC to (RS232/ttl converter)...
Replies
5
Views
213
I know, there's tons of resources out there on how to setup generic ethernet devices but I just cannot figure this out, I'm not sure what I'm...
Replies
7
Views
432
Hello Team, I am working on a project utilizing the new implicit communication with the 208-L50E-***** (specifically a 28QWB). this is a two...
Replies
3
Views
670
Hello, We are having trouble setting up a generic ethernet module for a Yaskawa GA80U4168 drive in RSLogix 5000 Version 20.01. All of the...
Replies
1
Views
585
Do you have a recommendation for a low count IO system that you would stand behind for a remote site? It 1.5 hours drive time to the site. I...
Replies
6
Views
950
Back
Top Bottom