Command, Function And Parameter Description; Multiply; Power; Add - Omron R88A-MCW151-DRT-E Operation Manual

Mcw151 series motion control option board
Table of Contents

Advertisement

Command, function and parameter description

6-3

Command, function and parameter description

! W A R N I N G
6-3-1

Multiply: *

Type:
Syntax:
Description:
Arguments:
Example:
6-3-2

Power: ^

Type:
Syntax:
Description:
! W A R N I N G
Arguments:
Example:
6-3-3

Add: +

Type:
Syntax:
Description:
Arguments:
Example:
This section describes the commands, functions and parameters which are
used in the BASIC programming language.
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.
Arithmetic Operation
expression_1 * expression_2
The multiply operator "*" multiplies any two valid expressions.
expression_1
Any valid BASIC expression.
expression_2
Any valid BASIC expression.
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
Arithmetic Operation
expression_1 ^ expression_2
The power operator "^" raises expression_1 to the power of expression_2.
This operation uses floating point algorithms and may give small deviations
for integer calculations.
expression_1
Any valid BASIC expression.
expression_2
Any valid BASIC expression.
thirtytwo = 2^5
This sets the variable thirtytwo to 32.
Arithmetic Operation
expression_1 + expression_2
The add operator "+" adds any two valid expressions.
expression_1
Any valid BASIC expression.
expression_2
Any valid BASIC expression.
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.
Section 6-3
111

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

R88a-mcw151-e

Table of Contents