Programming examples, 3ć14 – Rockwell Automation 1779-KP3R DATA HIGHWAY II User Manual
Page 49

Programming
Chapter 3
3Ć14
Addressing a Bit Within a Word
This section provides examples of addressing a bit within a word in each
PLC–2, PLC–3, and PLC–5 memory.
To
address a
bit within
a word in:
use this format:
Examples:
PLC-2
memory
$wordaddr/bit
$010/5 (specifies bit 5 of address 010)
PLC-3
memory
$fileaddr:wordaddr/bit
or
$extaddr/bit
$B111:2/3 (specifies bit 3 of word 2 of binary file 111)
$E3.1.8.111.0.2/3 (extended addressing)
PLC-5
memory
$extaddr/bit
$E0.10.2.0/011 (specifies bit 11 of word 2 of file 10)
This section contains examples of programming PLC–2, PLC–3, and
PLC–5 programmable controllers using the MOVE and TMOVE
commands.
The following table contains examples of using the MOVE command to
move a word:
To move data
from:
Command line example:
Explanation:
PLC-3 to PLC-2 MOVE FROM :66$010 TO $B2:3 or
M F :66$010 T $B2:3
Transfers word 010 from node 66 to
word 3 of binary file 2.
PLC-3 to PLC-2 MOVE FROM $B2:3 TO :66$010 or
M F $B2:3 T :66$010
Transfers word 3 of binary file 2 to
word address 010 at node 66.
PLC-3 to PLC-3 MOVE FROM :76$I4:50 TO $B2:3 or
M F :76$I4:50 T $B2:3
Transfers word 50 of input file 4
from node 76 to word 3 of binary file
2.
PLC-3 to PLC-3 MOVE FROM $B2:3 TO :76$I4:50 or
M F $B2:3 T :76$I4:50
Transfers word 3 of binary file 2 to
word address 010 at node 76.
PLC-3 to PLC-5 MOVE FROM $B2:3 TO :40.2$E0.10.2.0
or M F $B2:3 T :40.2$E.0.10.2.0
Transfers word 3 of binary file 2 to
word 2 of file 10 in the PLC-5
address 2 connected to KP5 node
40.
PLC-3 to PLC-5 MOVE FROM :40.2$E0.10.2.0 TO $B2:3
or M F :40.2$E.0.10.2.0 T $B2:3
Transfers from word 2 of file 10 in
the PLC-5 address 2 connected to
KP5 node 40 to word 3 of binary file
2.
Programming Examples