3.185
EDH0162En1040 – 06/99
MM4005
YC — Add variables
Usage
IMM
PGM
MIP
Syntax
xxYCnn
Parameters
Description
xx
[int]
— Variable number.
nn
[int]
— Variable number.
Range
xx
—
1
to
100
(integers) and
101
to
120
(floats)
.
nn
—
1
to
100
(integers) and
101
to
120
(floats)
.
Units
xx
— None.
nn
— None.
Defaults
xx
Missing
: Error O.
Out of range: Error O.
Floating point: Error A.
nn
Missing: Error O.
Out of range: Error O.
Floating point: Decimal part truncated.
Description
This command adds the values of two variables. Variable
xx
is added to
variable
nn
and the result placed in variable
xx
. If the result is outside the
-32767 to 32767 variable range, the operation is not performed and error H
is generated.
Returns
None.
Errors
A
—
Unknown message code.
C
—
Parameter out of limits.
H
—
Calculation overflow.
O
—
Variable number out of range.
Rel. Commands
YA
—
Add to variable.
YS
—
Initialize variable.
Example
5YS0 |
Initialize variable #5 to 0.
2YS6 |
Initialize variable #2 to 6.
5WY18 |
While variable #5 is different than 18 repeat next commands.
5YE10,
5YC2
|
If variable #5 is equal to 10, add variable #2 to variable #5; the
value of variable #5 becomes 16.
3PR1.2, WS |
Move axis #3 incremental 1.2 units and wait for stop.
5YA1 |
Add 1 to variable #5.
WE |
End while loop.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com