130 Version: 1.2.1 MS249E C-863.12 Mercury Controller
<float> is the acceleration value set with ACC, in physical
units/s
2
.
ADD (Add and Save to Variable)
Adds two values and saves the result to a variable (p. 118).
The variable is present in volatile memory (RAM) only.
ADD <Variable> <FLOAT1> <FLOAT2>
<Variable> is the name of the variable to which the result is
to be saved.
<FLOAT1> is the first summand.
<FLOAT2> is the second summand.
Floating point numbers are expected for the summands.
They can be specified directly or via the value of a variable.
Local variables can be set using ADD in macros only.
Value $B is added to value $A, and the result is saved to
variable C:
ADD C $A $B
The name of the variable where the result is to be copied is
specified via the value of another variable:
Send: VAR?
Receive:
A=468
B=123
3Z=WORKS
Send: ADD A${3Z} $A $B
Send: VAR?
Receive:
A=468
B=123
AWORKS=591
3Z=WORKS