beautypg.com

Btw ladder rung – ProSoft Technology 5210-DFNT-RIO User Manual

Page 29

background image

Ladder Programming for RIO Module

RIO ♦ ProLinx Gateway

Driver Manual

Rockwell Automation® Remote I/O Adapter


ProSoft Technology, Inc.

Page 29 of 39

February 4, 2010

6.3.2 BTW Ladder Rung

The BTW rung transfers data from the PLC to the ProLinx communication
module. Data is loaded into the data block by the user defined ladder logic in the
PLC. The block contains a header and a data section as defined below:

Word #

Description

0

BTW block identification code to indicate data set being transferred in the data block.

1

This word specifies the number of valid data values in the block. The range of values
contained in this field is from 0 to 60.

2 to 61

These words in the block contain the data being transferred from the PLC to the
module.

The first word of the header defines the block number being transferred from the
PLC to the module. This block code identifies the data set transferred in the
block.

This block number is normally copied from the BTW identification code field in
the BTR block received by the PLC. Block numbers less than 0 are used if the
module is requesting less than two blocks of data. If the module transfers only
blocks -1 and -2, the module is configured for no write data transfers. If the
module transfers blocks -1 and 0, the module is configured for one data block (1
to 60 words of data) and only the data in block 0 is valid. The data set transferred
is identified by the block as follows:

Data Start Address = Block ID * 60

Therefore, the first word of data received in block 0 will be stored at the BTW
Start Register address specified in the user configuration of the module. The first
word of data received in block 1 will be stored at data word offset 60 from the
BTW Start Register parameter in the module.

The last word of header information defines the number of valid words of data in
the block. The simplest way to handle the ladder logic is to configure the data
write area to be an even multiple of 60 words. This prevents the ladder logic from
having to handle short block messages. The BTW operations that interface with
the RIO module always transfer the same block sizes, therefore, there is no
optimization by setting the data area to a smaller size. In fact, the added code in
the ladder logic may slow the data transfer operation.