Summary: This is a tutorial on using while loops in LabVIEW MathScript.
while expression
% LABVIEW MATHSCRIPT command 1
% LABVIEW MATHSCRIPT command 2
% More commands to execute repeatedly until expression is not true
end
where expression is a logical expression that is either true or false. (Information about logical expressions is available in Programming in LABVIEW MATHSCRIPT-Logical Expressions.)
For example, consider the following while loop:
n = 1
while n < 3
n = n+1
end
This code creates the following output:
n =
1
n =
2
n =
3
while and end statements. This is not required by LABVIEW MATHSCRIPT but is common practice and makes the code much more readable.
"This course provides a brief introduction to LabVIEW MathScript, the textual math componenet of LabVIEW. The modules for this course include typical syntax and programming methods commonly used […]"