EDH0162En1040 – 06/99
3.158
MM4005
WH — While I/O input is equal
Usage
IMM
PGM
MIP
Syntax
xxWHnn
Parameters
Description
xx
[int]
— I/O input bit number.
nn
[int]
— I/O input bit or byte state.
Range
xx
—
0
to
8.
nn
—
0
to
1
or
0
to
255.
Units
xx
— None.
nn
— None.
Defaults
xx
Missing: Error E.
Out of range: Error E.
Floating point: Error A.
nn
Missing: 0.
Out of range: 1 for a bit, error C for a byte.
Description
This command starts a WHILE loop based on the state of an I/O input bit or
byte. While the state of the selected I/O input bit
xx
is equal to
nn
, all fol-
lowing commands up to the corresponding WE are executed. The loop is
repeated until the test becomes false. At that point, the program executed
continues with the line immediately following the WE command.
If
xx
is set to 0 or missing, the test is performed on the entire I/O input byte
and then
nn
could have a value from 0 to 255, representing the byte value
to compare it with.
NOTE
If the command is set to look for a bit by specifying xx between 1 and 8,
a non-zero value for the nn parameter will be considered as a 1 and the
while loop will execute until the I/O bit becomes Low.
Returns
None.
Errors
A
—
Unknown message code.
C
—
Parameter out of limits.
E
—
Incorrect I/O channel number.
J
—
Command authorized only in programming mode.
L
—
Command not at the beginning of a line.
Rel. Commands
WE
—
End While loop.
WG
—
While variable greater than value.
WL
—
While variable is less.
WY
—
While variable is different.
Example 5WH1
|
While I/O input bit #5 is high, repeat next commands
.
3PR1.2, WS |
Move axis #3 incremental 1.2 units and wait for stop.
WE |
End while loop.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Содержание MM4005
Страница 360: ...Section 7 Servo Tuning Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 368: ...Section 8 Appendices Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 405: ...EDH0162En1040 06 99 8 36 Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 406: ...Section 9 Index Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...