Download Selectron LD-007 Programming instructions

Transcript
Section 5-7
Bit Control Instructions
In order to draw ladder diagrams, it is not necessary to use AND LD and OR
LD instructions, nor are they necessary when inputting ladder diagrams directly, as is possible from the GPC. They are required, however, to convert
the program to and input it in mnemonic form. The procedures for these, limitations for different procedures, and examples are provided in 4-6 Inputting,
Modifying, and Checking the Program.
In order to reduce the number of programming instructions required, a basic
understanding of logic block instructions is required. For an introduction to
logic blocks, refer to 4-3-6 Logic Block Instructions. For details and examples, refer to 4-3-6 Logic Block Instructions.
Flags
5-7
There are no flags affected by these instructions.
Bit Control Instructions
There are five instructions that can be used generally to control individual bit
status. These are OUT, OUT NOT, DIFU(13), DIFD(14), and KEEP(11).
These instructions are used to turn bits ON and OFF in different ways.
5-7-1
OUTPUT and OUTPUT NOT – OUT and OUT NOT
OUTPUT – OUT
Ladder Symbol
Operand Data Areas
B: Bit
B
OUTPUT NOT – OUT NOT
Ladder Symbol
IR, SR, AR, HR, TC, LR, TR
Operand Data Areas
B: Bit
B
IR, SR, AR, HR, TC, LR
Limitations
Any output bit can generally be used in only one instruction that controls its
status. Refer to 3-3 IR Area for details.
Description
OUT and OUT NOT are used to control the status of the designated bit according to the execution condition.
OUT turns ON the designated bit for an ON execution condition, and turns
OFF the designated bit for an OFF execution condition. With a TR bit, OUT
appears at a branching point rather than at the end of an instruction line. Refer to 4-6-7 Branching Instruction Lines for details.
OUT NOT turns ON the designated bit for a OFF execution condition, and
turns OFF the designated bit for an ON execution condition.
OUT and OUT NOT can be used to control execution by turning ON and OFF
bits that are assigned to conditions on the ladder diagram, thus determining
execution conditions for other instructions. This is particularly helpful and allows a complex set of conditions to be used to control the status of a single
work bit, and then that work bit can be used to control other instructions.
The length of time that a bit is ON or OFF can be controlled by combining the
OUT or OUT NOT with TIM. Refer to Examples under 5-12-1 TIMER – TIM
for details.
104