beautypg.com

CONTREX CX-1200 User Manual

Page 177

background image

5 - 84

5. OR
The contents (the bit value) of the operand bit is OR’ed with the Result Register (R). The operand is
unaffected. The result is retained in the Result Register. If the operand is “0” (i.e., the "S0" register), then the
stack is dropped.

6. OR NOT
The complement of the operand bit is OR’ed with the Result Register. The operand is unaffected. The result is
retained in the Result Register. If the operand is “0” (i.e., the "S0" register), then the stack is dropped. This is
typically used to “OR” in a normally-closed contact.

7. XOR
The contents (the bit value) of the operand bit is Exclusively OR’ed with the Result Register. The operand is
unaffected. The result is retained in the Result Register. If the operand is “0” (i.e., the "S0" register), then the
stack is dropped.

8. XOR NOT
The complement of the operand bit is Exclusively OR’ed with the Result Register. The operand is unaffected.
The result is retained in the Result Register. If the operand is “0” (i.e., the "S0" register), then the stack is
dropped. This is typically used to XOR in a normally-closed contact.

9. NOT
The contents of the Result Register is complemented. The operand is ignored but must be included in the
program - use one of the temporary coil locations or the NOP Opnd (171). This is typically used to
complement the result before an “OUT” command. This could be the case if the rung is controlling an active-
high output.

10. NOP
This is a No Operation Command. The command is ignored by the compiler. This can be used to temporarily
remove a command.

11. OUT
This copies the contents of the Result Register (R), into the operand location. This terminates the rung.

12.
This ends the PLC program. It signals the compiler that there are no more valid commands to follow. Every
program must be terminated with an “”. The operand is ignored but it must be included in the program.
Use the NOP Opnd (171).

The OPERANDS

The operands are divided into two main areas: the status bits (contacts); and the function bits (coils). The
status bits range from bit 2 through bit 95. Do not use these bits as operands for the “OUT” command, as the
results could be unpredictable. The function bits range from bit 100 to bit 219. These are used in conjunction
with the “OUT” command to activate the indicated function. Activation of the indicated function occurs when
the “OUT” command moves a “1” into the bit location (the Result Register contains a “1” just prior the “OUT”
command). All of the bits that are not defined, are “Reserved” for future expansion. Refer to Appendices:
Appendix L
for a complete list of the PLC Program Operands.