beautypg.com

Yaskawa MP940 User Manual

Page 33

background image

Specifications and Functions

2.3.3 Motion Command Descriptions

2-10

Se-
quence
Com-
mands

=

SUBSTITUTE

(Result) = (Arithmetic expression) Substitutes operation results. Performs

calculations from left to right (with no
order of priority).

+

ADD

MW - = MW - + MW - ;
MW - = MW - + 123456;
MW - = 123456 + MW - ;

Performs integer and real number addi-
tion. Calculates combinations of integers
and real numbers as real numbers.

-

SUBTRACT

MW - = MW - - MW - ;
MW - = MW - - 123456;
MW - = 123456 - MW - ;

Performs integer and real number sub-
traction. Calculates combinations of inte-
gers and real numbers as real numbers.

*

MULTIPLY

MW - = MW -

∗ MW - ;

MW - = MW -

∗ 123456;

MW - = 123456

∗ MW - ;

Performs integer and real number multi-
plication. Calculates combinations of
integers and real numbers as real num-
bers.

/

DIVIDE

MW - = MW - /MW - ;
MW - = MW - /123456;
MW - = 123456 /MW - ;

Performs integer and real number divi-
sion. Calculates combinations of integers
and real numbers as real numbers.

MOD

REMAINDER

MW - = MW - /MW - ;
MW - = MOD;

When programmed in the next block
after a division, MOD stores the remain-
der in the designated register.

|

OR (logical OR)

MB - = MB - | MB - ;
MB - = MB - | 1;
MW - = MW - | MW - ;
MW - = MW - | H00FF;

Performs bit/integer logical OR.

^

XOR (logical ex-
clusive OR)

MW - = MW - ^ MW - ;
MW - = MW - ^ H00FF;

Performs integer logical exclusive OR.

&

AND (logical
AND)

MB - = MB - & MB - ;
MB - = MB - & 1;
MW - = MW - & MW - ;
MW - = MW - & H00FF;

Performs bit/integer logical AND.

!

NOT (logical
complement)

MB - = !MB - ;
MB - = !1;
MW - = !MW - ;
MW - = !H00FF;

Performs bit/integer logical complement
(inverts bits).

()

PARENTHESES

MW - = MW― &
(MW― | MW―);

The logical arithmetic expression inside
parentheses is calculated first.

S{}

SET BIT

S{MB - } = MB - & MB - ;

If the logical operation result is “true,"
the designated bit turns ON. The desig-
nated bit does not turn OFF, even if the
logical operation result is “false."

R{}

RESET BIT

R{MB - } = MB - & MB - ;

If the logical operation result is “true,"
the designated bit turns OFF. The desig-
nated bit does not turn ON, even if the
logical operation result is “false."

SIN

SINE

SIN(MW - );
SIN(90);

Obtains the sine of the integer or real
number (deg), and returns a real value.

COS

COSINE

COS(MW - );
COS(90);

Obtains the cosine of the integer or real
number (deg), and returns a real value.

Classifi-

cation

Command

Name

Programming Format

Function/Meaning