Yaskawa J50M Instructions User Manual

Page 117

Advertising
background image

Sample #i = SIN

I

(7) Considerations for Operational Commands

The constant without decimal point used in

> is assumed to have a decimal point

at its enc?.

B .

When used in conditional expression IF

o r

WHILE, function ROUND truncates the fractions.

c.

When used in address data,

ROUND

rounds the part below the least significant
digit.

Sample

#10 = 12.3758

When the least significant digit of address

X is 0.001 mm, the following command

Goo x [

ROUND

[

means

GOO x12.376 ;
because 8 of 12.3758 is rounded.

This command is also equivalent to

GOO

;

Usually, ROUND is not used as mentioned above;
it is used as shown below:

Sample (b)

When ROUND is used as follows, the program re-

turns to the start point correctly:

#10 = 12.3758 ;

#11 = 13.1236 ;

G91 GOO

;

R E T R A C T I O N

;

GOO

x-

[

ROUND

[#lo] +

ROUND

[ # n ] ] ;

This is because the data of #10 and #11 in
and

blocks are substantially rounded before

being executed.

If

block is

GOO X- [#10 +

;

then, the movement is made by the following

amount:

X- [ #10 + #n] = X - [12.3758 + 13. 1236]

= X -

- X -

[25.499]

On

the other hand, block movement of

+

= x12.376 + x13.124

= x25.500

The program of@ is not correct.

(8)

O p e r a t i o n a l E r r o r s

The data format and the operational errors in the

user macros are as follows:

A.

Data Format

The numeric data handled in user macros are of
the floating point format.

where, is sign + data 52-bit binary,

E is sign + data 10-bit binary.

B.

operational Errors

Each time an operation is performed, the follow-
ing error is caused and is accumulated. The num-
ber of significant digits is 15 to

which com-

pensates the error sufficiently.

2.11.7

CONTROL COMMANDS

The commands which control the flow of micro-
program are of the following two types:

A .

Branch Command . . .

expression>] GOTO n ;

B .

Repeat Command . . .

expression>] DO m ;

( 1 )

Branch Command

IF [<conditional

WHITE [<conditional

A. IF [ <conditional expression> ] GOTO n ;

If <conditional expression> of this command is
established, a branch is made to the block of sequence
number n within the same program. When a variable
or an expression is used for n, the branch destination
can be changed. If the condition is not satisfied, the
program proceeds to the next block.

109

Advertising