CONTREX CX-1200 User Manual

Page 175

Advertising
background image

5 - 82

6. Misc. functions: Block Select A,B,C decoded to select current block, PLC bits FrzIngrl, OpenLoop,

FrzRamp, Negate SR are OR’ed in with the Cntrl Latch (CP-340). The result will be used in the next
Scaled and Ramped Reference determination, or Control Loop calculation.

The Data Trace enable is maintained.

The Timers are maintained (status bits set/reset if necessary). This ends the 2

nd

1 millisecond part of

the scan.

The PLC mimics the operation of Relay Logic. In this context, the relay “Coils” can be either energized (ON)
or inactive (OFF). Likewise, the relay contacts, whether “open” or “closed”, assume only one of the two
states at any given time. Therefore, relays are binary devices. The state of a coil or contact can be
represented as a “1” (ON”) or a “0” (OFF). This is the basis for the PLC; it treats everything as binary
entities with each assigned a particular function and it realizes only one state at any given time. The virtual
“contacts” and “coils” that are available to the PLC program are defined in the PLC bit map. The PLC bit
map assigns the function of the contacts and coils to a bit (single binary digit) memory location. The PLC
program has access to the PLC bit map to logically combine the “contacts” (status) bits to activate
(or deactivate), a “coil” bit. For example; the Block Selection default program routes the Digital Inputs
DI_8, DI_9 and DI_10 to the Blk Sel A, B, C PLC Bits (coils) respectively. Note that the Digital Inputs are
active low - so a closed contact to common (which would be “0” voltage on the input) would produce a “1 ”
(true = active) in the corresponding Bit in the PLC bit map. Refer to the PLC Program Operands in
Appendices: Appendix L.

The status bits can be based on a binary condition (e.g., the DrvEnable /PLC bit 51) or they can be based on
the result of a comparison between two nonbinary numbers (e.g., the MaxFI1Hz /PLC Bit 49). The
MaxFI1Hz bit (49) is set (active = normally-open contact closed) when the value of the Feedback signal is
greater than the value that you entered into Max Fb Alm (CP-371). Most of the numerical comparisons that
are associated with the PLC status bits involve one (or more) Control Parameters. Some of the Control
Parameters are used to setup the PLC operation. In addition, there are Monitor Parameters to monitor the
state of the PLC bits.

The PLC uses a stack-based environment for moving bit data and computing boolean expressions. Your PLC
program must conform to this format. Each rung of your ladder-logic program would be programmed as a
group of commands (along with their operands) starting with a “LOAD” (or “LD NOT”) command and
ending with an “OUT” command. The stack allows you to enter a complicated logical combination (rung)
without having to separate it into smaller groups (rungs) with temporary coils.

These are the commands:

LOAD
LD NOT (Load Not)
AND
AND NOT
OR
OR NOT
XOR (Exclusive OR)
XOR NOT
NOT
OUT
<END>

Advertising