Specifications
Section 9. Program Control Instructions
9-6
Often used with the evaluation of some condition (for
example, If...Then), Exit Do transfers control to the
statement immediately following the Loop. When
Do...Loop statements are nested, control is transferred to the
Do...Loop that is one nested level above the loop in which
the Exit Do occurs.
Loop Ends a Do...Loop.
Do...Loop Statement Example
The example creates an infinite Do...Loop that can be exited only if Volt(1) is
within a range.
Dim Reply 'Declare variable.
Do
Reply = Volt(1)
If Reply > 1 And Reply < 9 Then 'Check range.
Exit Do 'Exit Do Loop.
EndIf
Loop
Alternatively, the same thing can be accomplished by incorporating the range
test in the Do...Loop as follows:
Dim Reply 'Declare variable.
Do
Reply = Volt(1)
Loop Until Reply > 1 And Reply < 9
The next example show the use of Wend.
While X > Y 'Old fashioned way of looping.
.........
.........
Wend
Do While X > Y 'Much better
.........
.........
Loop
FileManage ("Device: FileName", Attribute)
The FileManage instruction is used to manage files from within a running
datalogger program.
Syntax
FileManage( "Device: FileName", Attribute )
Remarks
FileManage is a function that allows the active datalogger program to
manipulate program files that are stored in the datalogger.