B8961 and B8962 User Manual
78
LP
Loop
syntax - LPi
Units:
n/a
R a n ge :
n / a
D e fa u l t :
0
LP will cause all commands between LP and EB to be repeated “ i ”t i m e s . If LP is fo l-
l owed by a 0 or no nu m b e r, the loop will repeat continu o u s ly.
Note: An End of Block (EB) command must be used with every LP command.
The
s t a n d a r d
s o f t wa re allows up to 16 nested loops (one inside the other). E a ch LP
command must have a corresponding EB command to end the bl o ck (loop).A GT
command within a loop will terminate the loop, clear the loop stack , and jump to a
n ew pro gra m .
E x a m p l e :
AC.09 DE.09 L P 3 VE30 DI1 GO EB VE7 DI-3 GO EN
The motor will perfo rm an incremental 1 unit move at speed 30 three times and then
a 3 unit move at speed 7 in the other dire c t i o n .
LU
Loop Until Condition True
syntax - LU (See Below)
Units:
n/a
Range:
n/a
Default:
n/a
The Loop Until (LU) command defines a loop block in which loop iterations are
based on a conditional result.The syntax for LU, which is identical to the IF com-
mand,is as follows:
Syntax:
LUi,xx…
LUxx…
LU(Mathematical expression) or expressions (2)
where,
i = starting input number, 1-8 (SmartStep),1-16 (SmartDrive)
x = 0,(Input Off)
x = 1 (Input On)
x =
anything else
(Input level Don’t Care)
Mathematical expression = Any valid conditional or logical
expression
Note: An End of Block (EB) command must be used with every LU com-
mand.
The LU loop will continue to iterate until the specified conditional result is true.
LU checks the conditional at the end of the loop block,therefore,the block is
always executed at least once, even if the condition is true on the first iteration.
Loop While (LW) defines loops where the conditional is checked at the
beginning
of the loop.
The
standar d
software allows up to 16 nested loops (one inside the other).A GT
command within a LU loop will terminate the loop, clear the loop stack and jump
to the new program. Following are examples of programs using LU:
Example #1: (A)=0 LU(A)=10 DI10 GO (A)=(A)+1 EB
In this example,the loop is executed
10
times with a final position 110 distance
units.
Содержание B8961
Страница 111: ...109 Chapter 7 Programming with Serial Communication...
Страница 132: ...B8961 and B8962 User Manual 130...
Страница 136: ...B8961 and B8962 User Manual 134 B8961 and B8962 Hardware Connections...
Страница 137: ...135 Chapter 8 Hardware Reference B8961 and B8962 Input and Output Schematics...
Страница 138: ...B8961 and B8962 User Manual 136 Connecting IDC Limit Switches to the B8961 2...
Страница 156: ...B8961 and B8962 User Manual 154...