Publication 1766-RM001A-EN-P - October 2008
492 Socket Interface Using CIP Generic Messaging
The MicroLogix controller assumes that the outgoing data is in CIP byte
order except the application data(data in Buf). The application data is sent
out as it is.
The MicroLogix controller assumes that the incoming data is in CIP byte
order except the application data. For example, if you issue a Write
service with 2 bytes integer, that integer is sent over a TCP connection or
in a UDP datagram in CIP byte order. If you issue a Read service and your
destination data table (for the response) contains an integer, the
MicroLogix controller assumes the incoming data is in CIP byte order.
Depending on the native byte order of the application you are
communicating with, you may have to convert the byte order in
RSLogix500 and/or in the application.
The following is an example for Write service:
So, N file should contain the data in CIP byte order as shown below:
27 10 00 00 02 00 64 00 01 02 03 04 06 00 00 00 41 42 43 44 45 46
So, N file will contain the data in CIP byte order as shown below:
06 00 00 00
Read
Write
DeleteSocket
DeleteAllSockets
Socket Service
N file for sending contains: 22 bytes
Nx:1 Nx:2 Nx:3 Nx:4, Nx:5 Nx:6 Nx:7 Nx:8 …
Timeout
(4 bytes)
ToAddr
Family
(2 bytes)
ToAddr
Port
(2 bytes)
ToAddr
IPAddress
(4 bytes)
BufLen
(2 bytes)
Reserved
(2 bytes)
Buf
(n bytes)
10000 msec 2 : family 100 : port 1.2.3.4 6 0 “ABCEDEF”
27 10 00 00 02 00 64 00 01 02 03 04 06 00 00 00 41 42 43 44 45 46
N file for receiving contains: 4 bytes
Nx:0 Nx:1
BufLen
(2 bytes)
Reserved
(2 bytes)
60
06 00 00 00
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive