Variables, Jmath operations and functions – Yaskawa MP900 Series Motion Programming Manual User Manual

Page 47

Advertising
background image

1.2 Programming Methods

1 -33

Variables

The variables that can be used in motion programs are listed in Table 1.16. Use them as re-
quired.

Table 1.16 Types of Variable and Notation Method

Classification

Variable

Type

Data Type

Type

Bit

Word

Long

Floating

Point

Global Variables

S Registers SB

SW

SL

SF

M Registers MB

MW

ML

MF

I Registers

IB

IW

IL

IF

O Registers OB

OW

OL

OF

C Registers CB

CW

CL

CF

Local Variables

D Registers DB

DW

DL

DF

Bit position: Valid only with bit data

Variable address
Data type: B, W, L, F

Variable name: S, M, I, O, C, D

M

B

1

2

3

4

5

F

MB001001 = 1;
MW00100 = 1234;
ML00100 = 12345678;
MF00100 = 1234.5678

J

Math Operations and Functions

Global variables, local variables, and constants can be used to perform ordinary math operations
in combination with operators and functions, and the results can be substituted in variables. The
commands listed in the following table are provided for the math operations and functions.

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;

1

A

EXAMPLE

"

Advertising
This manual is related to the following products: