EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 199

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
166
Sequence Control Instructions Section 3-4
2. JME(005)-JMP(004) Loop
Program a loop with JME(005) before JMP(004). The instructions between
JME(005) and JMP(004) will be executed repeatedly as long as the execu-
tion condition for JMP(004) is OFF. (A Cycle Time Too Long error will occur
if the execution condition is not turned ON or END(001) is not executed
within the maximum cycle time.)
Flags
Precautions Program FOR(512) and NEXT(513) in the same task. Execution will not be
repeated if these instructions are not in the same task.
A jump instruction such as JMP(004) may be executed within a FOR-NEXT
loop, but do not jump beyond the FOR-NEXT loop.
The following instructions cannot be used within FOR-NEXT loops:
Block programming instructions
MULTIPLE JUMP and JUMP END: JMP(515) and JME(516)
STEP DEFINE and STEP START: STEP(008)/SNXT(009)
Note If a loop repeats in one cycle and a differentiated bit is used in the FOR-NEXT
loop, that bit will be always ON or always OFF within that loop.
Example In the following example, the looped program section transfers the content of
D100 to the address indicated in D200 and then increments the content of
D200 by 1.
3-4-10 BREAK LOOP: BREAK(514)
Purpose Programmed in a FOR-NEXT loop to cancel the execution of the loop for a
given execution condition. The remaining instructions in the loop are pro-
cessed as NOP(000) instructions.
Ladder Symbol
Name Label Operation
Error Flag ER ON if more than 15 loops are nested.
OFF in all other cases.
Equals Flag = OFF
Negative Flag N OFF
#0000
D200
@D200
D100
&3
D100
D200
D0
D1
D2
Repeated 3 times.
BREAK(514)

Table of Contents

Related product manuals