![background image](http://html1.mh-extra.com/html/omron/r88a-mcw151-drt-e/r88a-mcw151-drt-e_operation-manual_742243126.webp)
111
Command, function and parameter description
Section 6-3
6-3
Command, function and parameter description
This section describes the commands, functions and parameters which are
used in the BASIC programming language.
!WARNING
It is the responsibility of the programmer to ensure that the motion func-
tions are invoked correctly, with the correct number of parameters and
values. Failure to do so may result in unexpected behavior, loss or dam-
age to the machinery.
6-3-1
Multiply: *
Type:
Arithmetic Operation
Syntax:
expression_1
*
expression_2
Description:
The multiply operator “*” multiplies any two valid expressions.
Arguments:
expression_1
Any valid BASIC expression.
expression_2
Any valid BASIC expression.
Example:
factor = 10*(2.1+9)
The parentheses are evaluated first, and then the result, 11.1, is multiplied by
10. Therefore,
factor
would contain the value 111
6-3-2
Power: ^
Type:
Arithmetic Operation
Syntax:
expression_1
^
expression_2
Description:
The power operator “^” raises expression_1 to the power of expression_2.
!WARNING
This operation uses floating point algorithms and may give small deviations
for integer calculations.
Arguments:
expression_1
Any valid BASIC expression.
expression_2
Any valid BASIC expression.
Example:
thirtytwo = 2^5
This sets the variable thirtytwo to 32.
6-3-3
Add: +
Type:
Arithmetic Operation
Syntax:
expression_1
+
expression_2
Description:
The add operator “+” adds any two valid expressions.
Arguments:
expression_1
Any valid BASIC expression.
expression_2
Any valid BASIC expression.
Example:
result = 10+(2.1*9)
The parentheses are evaluated first, and the result, 18.9, is added to 10.
Therefore,
result
would contain the value 28.9.