A.5 arithmetic operations, A.6 logical operations, A.5 arithmetic operations a.6 logical operations – Yaskawa MP2000 Series: User's Manual for Motion Programming User Manual
Page 329
Appendices
A.5 Arithmetic Operations
A-8
A.5 Arithmetic Operations
A.6 Logical Operations
Com-
mand
Name
Programming Format
Description
Mo
tion Programs
Seq
uen
ce
Prog
rams
=
Substitute
(Result) = (Math expression)
Substitutes operation results. Performs calcula-
tions from left to right (with no order of prior-
ity).
+
Add
MW
− = MW
− + MW
− ;
Performs integer and real number addition. Cal-
culates combinations of integers and real num-
bers as real numbers.
-
Subtract
MW
− = MW
− - MW
− ;
Performs integer and real number subtraction.
Calculates combinations of integers and real
numbers as real numbers.
*
Multiply
MW
− = MW
− * MW
− ;
Performs integer and real number multiplication.
Calculates combinations of integers and real
numbers as real numbers.
/
Divide
MW
− = MW
−/ MW
− ;
Performs integer and real number division. Cal-
culates combinations of integers and real num-
bers as real numbers.
MOD
Remainder
MW
− = MW
−/ MW
− ;
MW
− = MOD;
When programmed in the next block after a divi-
sion, MOD stores the remainder in the desig-
nated register.
Com-
mand
Name
Programming Format
Description
Mo
tion Programs
Seq
uence
Prog
ra
ms
|
OR (logical OR)
MB
− = MB
− | MB
− ;
MB
− = MB
− | 1;
MW
− = MW
− | MW
− ;
MW
− = MW
− | 00FFH;
Performs bit/integer logical OR.
&
AND
(logical AND)
MB
− = MB
− & MB
− ;
MB
− = MB
− & 1;
MW
− = MW
− & MW
− ;
MW
− = MW
− & 00FFH;
Performs bit/integer logical AND.
^
XOR
(logical exclusive
OR)
MW
− = MW
− ^ MW
− ;
MW
− = MW
− ^ 00FFH;
Performs integer logical exclusive OR.
!
NOT (logical
complement)
MB
− = !MB
− ;
MB
− = !1;
MW
− = !MW
− ;
MW
− = !00FFH;
Performs bit/integer logical complement
(inverts bits).