5 control instructions – Yaskawa YASNAC PC NC Programming Manual User Manual

Page 294

Advertising
background image

4 - 157

YASNAC PCNC Programming Manual

Chapter 4: Enhanced Level Commands

(7) Supplements to the Operation Instructions

A constant used in <expression> without a decimal point is assumed to have a decimal
point at the end. The allowable range of the constant is + 99999999.99999999.

Function ROUND converts a value into integer by rounding off processing. This pro-
cessing is executed at the digit indicated below.

If used in an operation instruction, conditional expression IF or WHILE, decimal
fractions are rounded off.

If used in address data, the value is rounded off at the digit one place below the
minimum input unit of the address.

(Example 1)

When #10 = 12.3758,

#1 = ROUND [#10] ? #1 = 12.0

ROUND [#10] in IF [#10 GT ROUND [#10] ‡12.0

(Example 2)

When #10 = 12.3758,

G00X [ROUND [#10] is equivalent to G00X12.376

(minimum input unit: 0.001 mm).

Numerical values treated in microprograms are floating point type values.

M*2

E

M:

One sign bit + 52-bit binary data

E:

One sign bit + 10-bit binary data

With an operation instruction, whether the NC operation stops in the single block
mode or not when the single block input (SKB) is ON is determined by the setting for
parameter pm0007 D 1.

4.4.5

Control Instructions

To control the program flow of microprograms, the following two instructions are provided:
branch instruction and repetition instruction.

Branch instruction

Repetition instruction

pm0007 D1 = 0

Does not stop in the signal block mode

pm0007 D1 = 1

Stops in the single block mode.

Advertising