Getting data from the motion controller – Rockwell Automation GMLC Reference Manual User Manual
Page 742

Publication GMLC-5.2 - November 1999
Using Block Transfers
705
Getting Data from the Motion Controller
A block transfer write (BTW), followed immediately by a block transfer
read (BTR), is used to get (read) data from the motion controller. The
BTW specifies the data to be read; the BTR reads the current values and
stores them in a data file in the PLC. Every BTR must be preceded with a
BTW to set up the values to be read.
For example, the PLC rungs below execute a BTW to request the data
specified in PLC data file N14 from the motion controller, and a BTR to
read the data from the motion controller and store it in PLC data file N7
when a switch (I:002/01) is closed. The specified data is read
continuously while the switch is closed.
Program Listing Report
PLC-5/30
Rung 2:0
EXAMPLE OF GETTING DATA FROM THE MOTION CONTROLLER.
| BLOCK
BLOCK
|
| TRANSFER
S CLASS
TRANSFER
|
| GET DATA
BTW
BTR
PROGRAM
WRITE
|
| CONDITION
ENABLE
ENABLE
RUNNING
CONTROL
|
|
I:002
N10:0
N10:5
I:011
+BTW-----------------+
|
+----] [------]/[-------]/[-------] [------+BLOCK TRNSFR WRITE
+-(EN)-+
|
01
15
15
10
|Rack
01|
|
|
|Group
0+-(DN) |
|
|Module
0|
|
|
|Control Block
N10:0+-(ER) |
|
|Data file
N14:0|
|
|
|Length
0|
|
|
|Continuous
N|
|
|
+--------------------+
|
Rung 2:1
ONCE THE BTW HAS REQUESTED THE DATA, A BTR IS PERFORMED TO READ IT.
| BLOCK
|
| TRANSFER
S CLASS
|
| GET DATA
BTW
BTR
PROGRAM
|
| CONDITION
ENABLE
ENABLE
RUNNING
|
|
I:002
N10:0
N10:5
I:011
+BTR-----------------+
|
+----] [------]/[-------]/[-------] [------+BLOCK TRNSFR READ
+-(EN)-+
|
01
15
15
10
|Rack
01|
|
|
|Group
0+-(DN) |
|
|Module
0|
|
|
|Control Block
N10:5+-(ER) |
|
|Data file
N7:0|
|
|
|Length
0|
|
|
|Continuous
N|
|
|
+--------------------+
|