User manual

3–4
Module Programming
Publication
17946.5.2 - May 1996
PLC5 Programming
The PLC-5 program is very similar to the PLC-3 program with the
following exceptions:
block transfer enable bits are used instead of done bits as the
conditions on each rung.
separate block transfer control files are used for the block transfer
instructions.
Figure 3.4
PLC5 Family Sample Program Structure for the 1794IE8
BTR Enable Bit
EN
DN
BTW Enable Bit
1
2
ER
EN
DN
ER
BTR
BLOCK TRANSFER READ
RACK:
GROUP:
MODULE:
DATA FILE:
LENGTH:
CONTINUOUS: N
BTW
BLOCK TRANSFER WRITE
RACK:
GROUP:
MODULE:
LENGTH:
CONTINUOUS: N
2
1
0
N13:0
9
2
1
0
1
Program
Action
CONTROL:
N12:0
DATA FILE:
N13:20
CONTROL:
N12:5
N12:5
15
N12:0
15
Thereafter, the program continuously
performs read block transfers to configure
the module.
Pushbutton
The pushbutton allows the user to
manually request a block transfer write.
N13:8
15
Powerup
Bit
1
At powerup in RUN mode, or when the
processor is switched from PROG to RUN,
the user program enables a block transfer
read. Then it initiates a block transfer write
to configure the module if the powerup bit
is set.
1
Powerup bit included in Series B modules only.
BTR Enable Bit
N12:0
15
BTW Enable Bit
N12:5
15
Figure 3.5
PLC5 Family Sample Program Structure for the 1794OE4
BTR Enable Bit
EN
DN
BTW Enable Bit
1
2
ER
EN
DN
ER
BTR
BLOCK TRANSFER READ
RACK:
GROUP:
MODULE:
DATA FILE:
LENGTH:
CONTINUOUS: N
BTW
BLOCK TRANSFER WRITE
RACK:
GROUP:
MODULE:
LENGTH:
CONTINUOUS: N
2
2
0
N15:0
1
2
2
0
14
Program
Action
CONTROL:
N14:0
DATA FILE:
N15:5
CONTROL:
N14:5
N14:5
15
N14:0
15
Thereafter, the program continuously
performs read block transfers and write block
transfers.
At powerup in RUN mode, or when the
processor is switched from PROG to RUN,
the user program enables a block transfer
read. Then it initiates a block transfer write
to configure the module and send data val
ues.
BTW Enable Bit
N14:5
15
BTR Enable Bit
N14:0
15