EasyManua.ls Logo

FATEK FBs-CB2 - BREAK FROM FOR AND NEXT LOOP (BREAK)

FATEK FBs-CB2
348 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...
Advanced Function Instruction
7-1
FUN22 P
BREAK
BREAK FROM FOR AND NEXT LOOP
BREAK
FUN22 P
BREAK
When execution controlEN=1 orEN↑〞 P instructionchanges from 01it will terminate the FOR
and NEXT program loop
The program within the FOR and NEXT loop will be executed N times (N is assigned by FOR instruction)
successivelybut if it is necessary to terminate the execution loop less than N timesthe BREAK instruction
is necessary to apply
The BREAK instruction must be located within the FOR and NEXT program loop
Sa :
Sb :
a=b
M200
RST
V
M200
R0V
FOR
EN
70
EN
17.CMP
BREAK
EN
(+1)
VEN
NEXT
71
EN
08.MOV
15
D100
a>b
a<b
OVF
S :
D :
D1000
V
D10
DescriptionThe loop count used to execute the FOR and NEXT program loop is assigned by register D10the
program within the FOR and NEXT loop is designed to search the same data storing in D100 from the
register table starting at R0If it findsthe searching loop will be terminated and then it goes to execute
the program after the NEXT instructionIf it doesn't findthe searching loop will be executed N times (N
is the content of D10) and then it goes to execute the program after the NEXT instruction
M200 tells the status and D1000 is the pointer of searching

Other manuals for FATEK FBs-CB2

Related product manuals