beautypg.com

Chapter 5. programming the plc, Programming guidelines – Comtrol UP DeviceMaster User Guide User Manual

Page 99

background image

DeviceMaster UP EtherNet/IP User Guide: 2000424 Rev. L

Chapter 5. Programming the PLC - 99

Chapter 5. Programming the PLC

This chapter provides information to help you configure PLC programs for the DeviceMaster UP. It includes
instructions for modifying the PLC program examples included with the DeviceMaster UP. The PLC program
examples are designed to work with the ControlLogix line of PLCs, PLC-5s or SLCs.

5.1. Programming Guidelines

Choose the receive communication method that best suits your implementation. The following communication
methods are available.

For ControlLogix PLCs: The receive data tags must be large enough to handle the largest packet that can
be received from your serial/socket device.

-

For Polling receive method: Including the sequence number and length parameters, the DeviceMaster
UP can return a received data message up to 444 bytes.

-

For Write-to-Tag and Write-to-Tag-Synced receive methods: If the data is larger than the maximum of
440 bytes (up to 1518 serial bytes and 2048 socket bytes), the DeviceMaster UP sends the data to a
series of tags.

See

2.3.2. Serial Port Data Transfer Object Definition (71 Hex)

on Page 29 and

2.3.5. Socket Port Data

Transfer Definition Object (74 Hex)

on Page 48 for more information.

For PLC-5/SLC PLCs: The receive data file area must be large enough to handle the largest packet that
can be received from your serial/socket device.

-

For Polling receive method: Including the sequence number and length parameters, the DeviceMaster
UP can return a received data message up to approximately 224 bytes.

-

For Write-to-File and Write-to-File-Synced receive methods: If the data size is large (up to 1518 serial
bytes and 2048 socket bytes), the DeviceMaster UP sends the data to a series of files in sequential
order.

See

2.4.3. Receive Data Message

on Page 59 for details.

Only one PLC generated EtherNet/IP message may be active at any one time in a PLC program.

Communications

Methods

Description

Unsolicited - Write-to-
Tag/File (Recommended
Method)

DeviceMaster UP writes the serial/socket data directly into a tag or file on the
PLC. Use this method along with the Maximum PLC Update Rate configuration
setting to ensure the PLC can scan and consume serial/socket data faster than
the DeviceMaster UP can send it

Unsolicited - Write-to-
Tag/File-Synced

DeviceMaster UP writes the serial/socket data into a tag or file on the PLC and
provides a mechanism to synchronize the data flow between the PLC and
DeviceMaster UP. Use this method when you want to ensure that the tag or file is
not overwritten before the PLC can consume the data.

Polling

The PLC requests data on a periodic basis. It provides the ability to control the
received data flow. However, it does require periodic data requests and the
request rate must be fast enough to ensure that the serial/socket port receive
queues on the DeviceMaster UP do not overflow.