Allen-Bradley MicroLogix 1400 Instruction Manual page 492

Programmable controllers
Hide thumbs Also See for MicroLogix 1400:
Table of Contents

Advertisement

efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive
490
Socket Interface Using CIP Generic Messaging
Publication 1766-RM001A-EN-P - October 2008
Change Controller Mode Between Executing and Non-Executing
Executing mode includes Run, Remote Run, Test Continuous Scan, and
Test Single Scan modes. Any others are Non-Executing modes.
If the MicroLogix controller transitions from Executing to Non-executing
mode while socket requests are active, all connections are closed and all
instances are deleted. This is forced by the controller. You can experience
the error code NO_SOCKET from MSG instructions. See Possible Error
Codes for Socket Services on page 508.
In RSLogix500, you can also set the MGx:y.TO bit for any outstanding
socket-related MSG instruction. This causes the MSG instruction to
timeout and set the MGx:y.ER bit.
Application Messages and TCP
A TCP connection is a byte stream between two application entities. The
application protocol determines the message formats. Messages can be
fixed size or variable size.
If an application sends variable size messages, a common strategy is to
first send a fixed size 'header' containing the size of the message,
followed by the message. The receiving device can first issue a Read of
the fixed size header to determine the remaining size, and then issue a
subsequent Read to receive the remaining data.
Partial Reads
It is possible for a Read service to return a BufLen that is less than the
requested amount of data. For example, your program may request 100
bytes of data. Because TCP is a byte stream and not a datagram protocol,
you can receive less than 100 bytes when the Read service returns.
Depending on the application protocol, you can issue additional Read
requests to receive all the data. If the application protocol dictates that all
messages are 100 bytes, then you must issue additional Reads until you
receive 100 bytes. If the application protocol uses variable size messages,
your program needs additional logic to handle variable message sizes as
defined by the application protocol.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents