Calculations and functions – Yaskawa MotionSuite Series Machine Controller Programming Manual User Manual

Page 29

Advertising
background image

MotionSuite™ Series Machine Controller Programming Manual

Chapter 1: Motion Programmming Outline

1-20

! Calculations and Functions

Calculations can combine global variables, local variables and constants with
operators and functions. The result can be substituted by a variable. Calculation and
functions use the following commands.

Type

Command

Name

Command Format

Value Calculations

=

Substitution

MW– =MW–;

+

Addition

MW– =MW– +MW–;

Subtraction

MW– =MW– –MW

*

Multiplication

MW– =MW–*MW–;

/

Division

MW– =MW–/MW–;

MOD

Remainder

MW– =MOD;

Logical Calculations

|

OR (Logical OR)

MB– =MB– | MB–;

^

XOR (Exclusive OR)

MB– =MB– ^MB–

&

AND (Logical AND)

MB– =MB– &MB–;

!

NOT (Invert)

MB– =MB– !MB–;

Value Comparisons

= =

Same

IF MW– = =MW–;

< >

Not same

IF MW– < >MW–;

>

Greater

IF MW– >MW–;

<

Less

IF MW– <MW–;

>=

Greater or equal

IF MW– > =MW–;

<=

Less or equal

IF MW– < =MW–;

Data Operations

SFR

Right-shift

SFR MB– N– W–;

SFL

Left-shift

SFL MB– N– W–;

BLK

Block transfer

BLK MW– MW– W–;

CLR

Clear

CLR MB– W–;

Basic Functions

SIN

Sine

SIN (MW–);

COS

Cosine

COS (MW–);

TAN

Tangent

TAN (MF–);

ASN

ARC sine

ASN (MF–);

ACS

ARC cosine

ACS (MF–);

ATN

ARC tangent

ATN (MW–);

SQT

Square root

SQT (MW–);

BIN

BCD

→BIN

BIN (MW–);

BCD

BIN

→BCD

BCD (MW–);

S{}

Designated bit ON

S{MB–}=MB– &MB–;

R{}

Designated bit OFF

R{MB–}=MB– &MB–;

Advertising