1 overview of sequence commands, 1 math commands – Yaskawa MP900 Series Motion Programming Manual User Manual

Page 136

Advertising
background image

4.1 Overview of Sequence Commands

4 -3

4.1 Overview of Sequence Commands

This section outlines the sequence commands and explains combining commands.

4.1.1 Math Commands

Global variables, local variables, and constants can be used to perform ordinary math opera-
tions in combination with operators and functions, and the results can be substituted in vari-
ables.

Calculations take the basic form of variable = <math_expression>. The math expressions and
functions listed in the following table can be used.

Classification

Command

Name

Programming Format

Arithmetic
Operations

=

SUBSTITUTE

MW− = MW− ;

Operations

+

ADD

MW− = MW− + MW− ;

SUBTRACT

MW− = MW− − MW− ;

*

MULTIPLY

MW− = MW− * MW− ;

/

DIVIDE

MW− = MW− / MW− ;

MOD

REMAINDER

MW− = MOD;

Logic Operations

|

OR (logical OR)

MB− = MB− | MB− ;

^

XOR (logical exclusive
OR)

MW− = MW− ^ MW− ;

&

AND (logical AND)

MB− = MB− & MB− ;

!

NOT (Inversion)

MB− = MB− & ! MB− ;

Comparisons

= =

MATCH

IF MW− = = MW− ;

< >

MISMATCH

IF MW− < > MW− ;

>

GREATER THAN

IF MW− > MW− ;

<

LESS THAN

IF MW− < MW− ;

> =

GREATER THAN OR
EQUAL TO

IF MW− > = MW− ;

< =

LESS THAN OR
EQUAL TO

IF MW− < = MW− ;

Data Operations

SFR

RIGHT SHIFT

SFR MB− N− W− ;

SFL

LEFT SHIFT

SFL MB− N− W− ;

BLK

BLOCK MOVE

BLK MW− MW− W− ;

CLR

CLEAR

CLR MB− W− ;

4

Advertising
This manual is related to the following products: