Yaskawa J50M Instructions User Manual

Page 116

Advertising
background image

2.11.5 VARIABLES (Cent’d)

2

3

Item

Concept of “#O”

Variable <blank>
is commanded in
the replacement

(1)

Variable

is commanded

in

the part program

(2) On F commands

Variable

is commanded in
the condition of

and

Others

Blanks in
conditions
except EQ and
NE are

treated

as O.

Meaning of (Blank)

. #O defined as variables

of

blank>

. Commanding #O at the

left-hand side of the

causes

. Where #2 is blank>

command #3=#2; means
#3= <blank>.

. Where #2 is

command

GOO X #2: equivalent to COO

is ignored.)

F figure 1, F

2:

Numeral 1

and numeral 2 include

Indirect

#2

Blank Full

- Blank

Blank Blank - Numeral 2
Full

Blank - Numeral 1

Full

Full

- Numeral 2.. . Note

. Where #2 is

#3 is O

Condition “IF #3

#2”

is not established.

Condition “IF #3 EQ

#2 is established,

#3=#[

. .

is blank.

#3=#2 * #O:

#3=#o +

I

#3=#o/#o;

#3=5*#o ;

mands, #3=0,

#3=2-#O; means #3=2

#0: causes alarm.

Blank” in the replacement
other than described above
is treated as “O. ”

. Condition

is

established

when #2 and #3

are <blank>, or #2 is O
and #3 is <blank>.

. Condition IF #3LT #2 is

not established when #2 and
#3 are <blank>, or #2 is

and #3=0.

Note:

Parameter setting can be made to select whether to

cause double address error to enable numeral 2, when both
numeral 1 and numeral 2 are full.

Setting parameter

#6073 D3 1:

Numeral 2 is effective

o:

Double address error

2.11.6 OPERATION COMMANDS

Various

operations can be performed between

variables and between variables and constants .
The operation expression is represented in the

form of #i

<expression> , in which <expression>

is a general arithmetic operational expression pro-

duced by combining variables and constants with

and functions. The available

and functions are as follows.

Instead of

and #k, constants may be used.

Note:

must be commanded at the

right-hand side of the equation,

(1) Variable

Definition and Replacement

Definition, replacement.

Indirect specification

(2)

A d d -

T y p e O p e r a t i o n s

. . .

#i = -

#k . .

Difference.

Logical sum (for each of

32 bits) .

Exclusive

logical sum

(for each of

32 bits) .

(3)

M u l t i p l y - T y p e O p e r a t i o n s

#i =

*#k . . .

Product.

#i

#k . . . Quotient.

#i

AND #k . . . Logical product

(for each of 32 bits) .

Note: In

OR, XOR, or AND operation, the

variable value (or constant) is converted into
the binarv 32-bit equivalent and the operation
is performed on

(4)

#i

,SIN [#j]

bit.

. . .

Sine (in degrees) .

. . .

(in degrees) .

. . .

Tangent (in degrees) .

#i

A T A N [ # j ] / [ # k ]

[#j]

. .

BIN [#j]

. . .

#i

ROUND

. . .

FIX

[#j]

Arctangent

Square root.

Absolute value.

Convert from BCD .

Convert into BCD.

Produce integer by rounding

Truncate the fractions.

Raise the fractions

to a

unit.

(5) Combinations of operations

The above operations and functions may be used
in combinations.

A functional operation is per-

formed first.

Then, a multiply-type operation is

p e r f o r m e d .

An add-type operation is performed

last.

Sample #i =

+ #k * SIN

(6)

C h a n g e o f o p e r a t i o n a l o r d e r b y [

1

Priority can be given to an operation by enclosing it in
brackets [ ]. Up to quintuple (five-hold) nesting of
brackets is permitted including those of functional
operations.

108

Advertising