beautypg.com

Receive communication methods, Unsolicited - write to file receive method, Unsolicited - write to file synced receive method – Comtrol UP DeviceMaster User Guide User Manual

Page 63

background image

DeviceMaster UP Modbus/TCP User Guide: 2000447 Rev. I

Chapter 2. Programming Interface - 63

Receive Communication Methods

2.4.7. Receive Communication Methods

There are three methods of transferring received data to the PLC from the DeviceMaster UP.

2.4.7.1. Unsolicited - Write to File Receive Method

Note: This is the recommended receive method.

When a serial/socket packet is received on
the DeviceMaster UP, the data packet is
immediately written to a file data location
on the PLC. The following diagram shows
the data flow.

The following restrictions apply to this
method:

The Receive Data File Name must be the
same file name and offset defined to
receive data on the PLC.

The file on the PLC must be of integer type and must be of sufficient size to contain the sequence number,
length, and data field associated with the maximum sized received data structure. See

2.4.3. Receive Data

Message

on Page 59 for more information.

New data is indicated with an incremented sequence number.

The PLC program must be able to process the new data faster than the data can be received. To
accomplish this, set the Maximum PLC Update Rate to an interval time that allows your PLC to process
the data. The default of 40 milliseconds may or may not need to be increased for your PLC application.

2.4.7.2. Unsolicited - Write to File Synced Receive Method

This method provides a syncing option to allow the PLC to control the data flow by indicating when it is ready
for the next serial data packet.

In this method, the serial/socket packet is not
written into the file on the PLC until the
consumed receive sequence number has been
updated by the PLC to match the produced
receive data sequence number. Then the data
is written into the file data location on the
PLC in the same way as the Write-to-File
method.

The following restrictions apply to this
method:

The Receive Data File Name must be the
same file name and offset defined to receive data on the PLC.

The file on the PLC must be of integer type and must be of sufficient size to contain the sequence number,
length, and data field associated with the maximum sized received data structure. See

2.4.3. Receive Data

Message

on Page 59 for more information.

New data is indicated with an incremented sequence number.

New data is not written to the file on the PLC until the consumed receive sequence number has been
incremented to match the last produced receive sequence number.

While the DeviceMaster UP queues received serial/socket port data, the PLC program must consume the
new data faster than the data can be received on the serial port to ensure the receive buffers on the
DeviceMaster UP do not overflow. (Example: If two packets can be received per second on the serial port,
then the consumption rate would need to be at least one packet every 500 msec.)

Unsolicited - Write to File Receive Data Flow

Unsolicited - Write to File Synced Receive Data Flow