Example program considerations, Lpbkexampleslcmsgpollrs5, Lpbkexampleplc5msgpollrs5 – Comtrol UP DeviceMaster User Guide User Manual
Page 144: Lpbkexampleplc5msgfilers500

144 -
Chapter 5. Programming the PLC
DeviceMaster UP EtherNet/IP User Guide: 2000424 Rev. L
Example Program Considerations
5.5.3. Example Program Considerations
•
While the RSLogix example programs are simple in nature, they include error counters and transmit
retry mechanisms for timed-out messages. You may or may not want to include the error counters and
transmit retry mechanisms in your own application.
•
The receive and transmit sequence numbers are cleared on the DeviceMaster UP when you start the
programs. However, the sequence numbers must be in sync between the PLC and DeviceMaster UP for
the programs to operate correctly.
•
Statistics retrieval is not included in the example programs, but you can easily add it by inserting a
request statistics message.
•
The socket ports can be accessed the same way as the serial ports and return the data in the same
manner. To access a socket port, just change the associated DeviceMaster UP file addresses.
5.5.4. lpbkExampleSlcMsgPollRS5
This example program demonstrates an RSLogix 5 loopback PLC program using the SLC Typed messages in
the Polling receive method. This program initializes receive and transmit produced data sequence numbers at
startup on the DeviceMaster UP and then loops data through a loopback plug on the serial port. The SLC
Typed Write data messages transmit the data and the SLC Typed Read Data messages receive the data and
the sequence numbers are incremented.
This example program includes the following files:
•
lpbkExampleSlcMsgPollRS5.PC5 - Ladder logic in ASCII format.
•
lpbkExampleSlcMsgPollRS5.SY5 - Symbol definitions for RSLogix 5 Version 5.xx.xx.
•
lpbkExampleSlcMsgPollRS5.SY6 - Symbol definitions for RSLogix 5 Version 6.xx.xx.
5.5.5. lpbkExamplePlc5MsgPollRS5
This example program demonstrates an RSLogix 5 loopback PLC program using the PLC-5 Typed messages
in the Polling receive method. This program initializes receive and transmit produced data sequence numbers
at startup on the DeviceMaster UP and then loops data through a loopback plug on the serial port. The PLC-
5 Typed Write data messages transmit the data and the PLC-5 Typed Read Data messages receive the data
and the sequence numbers are incremented.
This example program includes the following files:
•
lpbkExamplePlc5MsgPollRS5.PC5 - Ladder logic in ASCII format.
•
lpbkExamplePlc5MsgPollRS5.SY5 - Symbol definitions for RSLogix 5 Version 5.xx.xx.
•
lpbkExamplePlc5MsgPollRS5.SY6 - Symbol definitions for RSLogix 5 Version 6.xx.xx.
5.5.6. lpbkExamplePlc5MsgFileRS500
This example program demonstrates a loop-back RSLogix 5 PLC program using PLC-5 Typed messages in the
Write-to-File receive method. This program initializes the produced receive and transmit data sequence
numbers at startup and then loops data via a loop-back plug on the serial port. The data is transmitted via
PLC-5 Typed Write data messages and received automatically via a write to file command from the
DeviceMaster UP. The sequence numbers are incremented with each message.
The following files apply:
•
lpbkExamplePlc5MsgFileRS5.PC5 – ladder logic in ASCII form.
•
lpbkExamplePlc5MsgFileRS5.SY5 – symbol definitions for RSLogix 5 Version 5.xx.xx.
•
lpbkExamplePlc5MsgFileRS5.SY6 – symbol definitions for RSLogix 5 Version 6.xx.xx.