Arithmetic Operation Function 1 - Okuma OSP-P200L Programming Manual

Hide thumbs Also See for OSP-P200L:
Table of Contents

Advertisement

3-3.

Arithmetic Operation Function 1

This function allows arithmetic operation using variables. The programming can be done in the
same way as for general arithmetic expressions.
[Program format]
Address character, Extended address character, Variable = Expression
The expression on the right-hand side, requesting an arithmetic operation, is made up of constants,
variables, comparison expressions, and operators.
The arithmetic and comparison expressions are described below.
Arithmetic Expression
Operator
+
-
+
-
*
/
Comparison Expression
Operator
LT
(Less than or Equal to,
LE
EQ
NE
GT
(Greater than or Equal,
GE
Meaning
Positive sign
Negative sign
Sum (addition)
Difference (subtraction)
Product (multiplication)
Quotient (division)
Meaning
(Less Than, <)
IF [V1 LT 5] N100
IF [V1 LE 5] N100
≤)
(EQual to, =)
IF [V1 EQ 5] N100
(Not Equal to, ≠)
IF [V1 NE 5] N100
(Greater Than, >)
IF [V1 GT 5] N100
IF [V1 GE 5] N100
≥)
Example
+1234
-1234
X = 12.3 + V1
X = 12.3 - V1
X = V10 * 10
X = V11/10
Example
Contents
Jump to N100 when V1
is less than 5.
Jump to N100 when V1
is less than or equal to 5.
Jump to N100 when V1
is equal to 5.
Jump to N100 when V1
is not equal to 5.
Jump to N100 when V1
is greater than 5.
Jump to N100 when V1
is greater than or equal
to 5.
5238-E P-286
SECTION 12 USER TASK
Rule
Provide a space
on either side of
the operator.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Osp-p20l-rOsp-p20lOsp-p200l-r

Table of Contents