3.183
EDH0162En1040 – 06/99
MM4005
YA — Add to variable
Usage
IMM
PGM
MIP
Syntax
xxYAnn
Parameters
Description
xx
[int]
— Variable number.
nn
[int]
— Value to add.
Range
xx
—
1
to
100
(integers) and
101
to
120
(floats).
nn
—
-32767
to
32767.
Units
xx
— None.
nn
— None.
Defaults
xx
Missing: Error O.
Out of range: Error O.
Floating point: Error A.
nn
Missing: 0.
Out of range: Error C.
Floating point: Decimal part truncated.
Description
This command adds a value to a variable. It is useful for creating loops in a
program. The value may be positive or negative.
NOTE
If, at any time the operation will cause the variable value to go out of
range, error H (unauthorized execution) is generated.
Returns
None.
Errors
A
—
Unknown message code.
C
—
Parameter out of limits.
H
—
Calculation overflow.
J
—
Command authorized only in programming mode.
O
—
Variable number out of range.
Rel. Commands
TY
—
Read a variable.
YS
—
Initialize variable.
Example
5YS30 |
Initialize variable #5 to 30.
5WG18 |
While variable #5 is greater than 18 repeat next commands.
3PR1.2, WS |
Move axis #3 incremental 1.2 units and wait for stop.
5YA-1
|
Subtract 1 from variable #5.
WE |
End while loop.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com