beautypg.com

Ladder logic programming, Btr ladder rung – ProSoft Technology 5210-DFNT-RIO User Manual

Page 27

background image

Ladder Programming for RIO Module

RIO ♦ ProLinx Gateway

Driver Manual

Rockwell Automation® Remote I/O Adapter


ProSoft Technology, Inc.

Page 27 of 39

February 4, 2010

The output image for the example is stored in data table O0:010 to O0:017. Data
in this table is set in the ladder logic and used for the control of devices attached
to the ProLinx communication module. An example of the file is shown below:

6.3

Ladder Logic Programming

After this initial configuration is performed, it is now time to build the ladder logic.
It is highly recommended that the ladder logic provided by ProLinx be used as a
starting point to make certain the module communicates. Additionally, it provides
a base from which to expand. If you deviate from the ladder logic provided, it will
be difficult for technical support to provide an expedient answer to your problem.

The ladder logic is defined in two rungs: a BTR rung to transfer data from the
module to the processor and a BTW rung to transfer data from the processor to
the module. Each rung is discussed below.

6.3.1 BTR Ladder Rung

The BTR rung transfers data from the module to the PLC. Data is loaded into the
data block by the module in a fixed format. The block contains a header and a
data section as defined below:

Word #

Description

0

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

1

BTW block identification code of block the module wishes to receive from the PLC.
This word is copied to the BTW block by the ladder logic.

2

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.

3 to 62

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

The first word of the header defines the block number being transferred from the
module to the PLC. This block code identifies the data set transferred in the
block. Block numbers less than 0 are used if the module is transferring less than
two blocks of data. If the module transfers only blocks -1 and -2, the module is
configured for no read 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