Sample Programs For Analog Block; Plc 3 Family Processors - AB Quality ALLEN-BRADLEY 1791 User Manual

Analog block i/o input/output modules
Table of Contents

Advertisement

Chapter 6
Programming Your Analog Module
Sample Programs for
Analog Block

PLC 3 Family Processors

6-4
The following are sample programs for using your modules more
efficiently when operating with the PLC-3 or PLC-5 family processors.
These programs show you how to:
configure the module
read data from the module
update the output channels
Refer to the proper PLC-3 or PLC-5 documentation for additional
information on processor programming and data entry.
An analog block requires BTWs or discrete data to configure it and update
its output data. BTRs or discrete data are required to send back input data
and module status.
The following PLC-3 program can be altered to effectively address analog
block modules.
Figure 6.3
PLC 3 Family Sample Program Structure
Block Transfer
Read Done Bit
1
Block Transfer
Write Done Bit
Pushbutton
2
Power-up
Bit
Power-up
Bit
Pushbutton
3
Block Transfer
Write Done Bit
4
BTR
BLOCK XFER READ
RACK:
GROUP:
MODULE:
X = XXXX
DATA:
XXXX:XXXX
LENGTH:
CNTL:
XXXX:XXXX
MOV
SOURCE:
DESTINATION:
Block Transfer
MOV
Write Done Bit
SOURCE:
DESTINATION:
BTW
BLOCK XFER WRITE
RACK:
GROUP:
MODULE:
X = XXXX
DATA:
XXXX:XXXX
LENGTH:
CNTL:
XXXX:XXXX
Enable
EN
XXX
12
X
Done
DN
15
0
Error
ER
13
XXX
27
XXX
(BTW LENGTH)
XXX
(OUTPUTS + 1)
XXX
(BTW LENGTH)
Enable
EN
02
XXX
Done
X
DN
05
Error
0
ER
03

Advertisement

Table of Contents
loading

Table of Contents