Ladder logic program, Figure 5.3 – Rockwell Automation 20-COMM-R Remote I/O Adapter User Manual

Page 66

Advertising
background image

5-8

Using Block Transfer Messaging

20-COMM-R Remote I/O Adapter User Manual

Publication 20COMM-UM004D-EN-P

Ladder Logic Program

Figure 5.3 ControlLogix Example Ladder Logic for Block Transfer Messaging

Tag Name

Type

SendMessageRequest

BOOL

SendMessageRequestOneShot

BOOL

PerformingMessagingRequest

BOOL

MessagingRequestError

BOOL

The20CommR:I

AB:RIO_4IOGROUP:I:0

MsgBlockTransferWrite

MESSAGE

MsgBlockTransferRead

MESSAGE

0

Copy File

Source The20CommR:I.Data[0]

Dest

BlockTransferStatus

Length

1

COP

Make a local copy of the block transfer status word to avoid it changing mid-scan.

1

SendMessageRequest

ONS

SendMessageRequestOneShot

L

PerformMessagingRequest

U

MessagingRequestError

When the user enables the SendMessageRequest tag, start the message logic.

2

PerformMessagingRequest

BlockTransferStatus.9

/

BlockTransferStatus.10

EN

DN

ER

Type - Block Transfer Write

Message Control

MsgBlockTransferWrite

...

MSG

When requested (and the 20-COMM-R is ready), send the messaging request to the drive.

3

PerformMessagingRequest

BlockTransferStatus.10

EN

DN

ER

Type - Block Transfer Read

Message Control

MsgBlockTransferRead ...

MSG

Pick up the messaging response from the drive.

4

PerformMessagingRequest

MsgBlockTransferRead.DN

U

PerformMessagingRequest

Once the response is complete, end the messaging transaction.

5

PerformMessagingRequest

BlockTransferStatus.11

L

MessagingRequestError

U

PerformMessagingRequest

If a messaging error occurs, end the transaction and indicate the error.

(End)

Advertising