![Danaher Motion B8961 Operator'S Manual Download Page 81](http://html1.mh-extra.com/html/danaher-motion/b8961/b8961_operators-manual_504870081.webp)
Chapter 6 - IDeal
™
Command Reference
79
Example #2: (A)=10 LU(A)<20 DI10 GO EB
In this example,the loop is executed once since the (A)<20 condition is true on
the first iteration.
Example #3: LUXX1X1 MS1,”Inputs 3 & 5 are off” EB GT[Inputs On]
In this example,the loop will continue to execute as long as inputs #3 and #5 are
off.
Example #4: LU4,1 MS1,”Input 4 is off” EB GT[Input On]
In this example,the loop will continue to execute as long as input #4 is off.
LW
Loop While Condition True
syntax - LW (See Below)
Units:
n/a
Range:
n/a
Default:
n/a
The Loop While (LW) command defines a loop block in which loop iterations are
based on a conditional result.The syntax for LW, 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 LW command.
LW will continue to iterate while the specified condition is true. LW checks the
condition at the
beginning
of the loop block,therefore if the condition is false on
the first iteration,the block is immediately skipped.Loop Until (LU) defines loops
where the condition is checked at the
end
of the loop block.
The
standar d
software allows up to 16 nested loops (one inside the other).A GT
command within an LW loop will terminate the loop, clear the loop stack,and
jump to the new program. Following are examples of programs using LW:
Example #1: (A)=0 LW(A)<=10 DI10 GO (A)=(A)+1 EB
In this example,the loop is executed
11
times with a final position 110 distance
units.
Example #2: (A)=10 LW(A)>20 DI10 GO EB
In this example,the loop is immediately skipped since the (A)>20 condition is
false.
Example #3: LWXX1X1 MS1,”Inputs 3 & 5 are on”EB GT[Inputs Off]
In this example,the loop will continue to execute as long as inputs #3 and #5 are
on.
Example #4: LW4,1 MS1,”Input 4 is on”EB GT[Input Off]
In this example,the loop will continue to execute as long as input #4 is on
Summary of Contents for B8961
Page 111: ...109 Chapter 7 Programming with Serial Communication...
Page 132: ...B8961 and B8962 User Manual 130...
Page 136: ...B8961 and B8962 User Manual 134 B8961 and B8962 Hardware Connections...
Page 137: ...135 Chapter 8 Hardware Reference B8961 and B8962 Input and Output Schematics...
Page 138: ...B8961 and B8962 User Manual 136 Connecting IDC Limit Switches to the B8961 2...
Page 156: ...B8961 and B8962 User Manual 154...