
8 GCS Commands
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)
Description:
Adds two values and saves the result to a variable (p. 118).
The variable is present in volatile memory (RAM) only.
Format:
ADD <Variable> <FLOAT1> <FLOAT2>
Arguments:
<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.
Response:
None
Notes:
Local variables can be set using ADD in macros only.
Example 1:
Value $B is added to value $A, and the result is saved to
variable C:
ADD C $A $B
Example 2:
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