EDH0162En1040 – 06/99 3.200
MM4005 YW — Wait and read key
Usage IMM PGM MIP
Syntax xxYW
Parameters
Description xx
[int] — Variable number.
Range xx — 1 to 100 (integers) and 101 to 120 (floats).
Units xx — None.
Defaults xx Missing: Error O.
Out of range: Error O.
Floating point: Error A.
Description This command waits for a front panel key to be pressed and places its
ASCII code in variable xx. The following table lists all possible values
returned.
Key ASCII Variable
pressed code value
None None 0
048
149
250
351
452
553
654
755
856
957
-45
.46
1
st
(Left) A 65
2
nd
B66
3
rd
C67
4
th
(Right) D 68
Returns None.
Errors A — Unknown message code.
J — Command authorized only in programming mode.
O — Variable number out of range.
Rel. Commands YK — Read key to variable.
Example 5YS0 | Initialize variable #5 to 0.
5WL1 | While variable #5 is less than 1, repeat next commands.
4YW | Wait for any key and place its code in variable #4.
4YE49, 1PR-0.1 | If key “1” is pressed, move axis #1 -0.1 units incrementally.
4YE51, 1PR0.1 |
If key “3” is pressed, move axis #1 0.1 units incrementally.
4YE48, 5YS1 |
If key “0” is pressed, set variable #5 to 1 to end loop.
WS, WE | Wait for all motion to stop; end while loop.
.
–
9
8
7
6
5
4
3
2
1
0
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com