Yaskawa YASNAC PC NC Programming Manual User Manual
Page 290

4 - 153
YASNAC PCNC Programming Manual
Chapter 4: Enhanced Level Commands
(5) Assigning Variables
A numeric value specified following an address can be replaced with a variable.
By specifying “
#i or – #i”, the value of the specified variable or its neg-ative value (complement) can be taken as the command value of that address.
(Example)
•
For the following addresses, it is not allowed to assign a variable.
(Example)
•
It is not allowed to use a variable to express a variable number.
•
When replacing “10” in #10 with #20, for example, expression of ##20 is not allowed.
This must be written by # [#20].
•
If a variable is used as the address data, values below the minimum input unit are
rounded off.
(Example)
•
It is possible to use
address.
By specifying “
[or negative value (complement) of the
value for that address.
•
The constant used in [ ] without a decimal point is assumed to have a decimal point at
the end.
G#30, #30 = l.0
Equivalent to G01
X#101, #101 = 100.
Equivalent to X100.
Z#101 #103 = 300.
Equivalent to Z300.
F#140, #140 = 0.3
Equivalent to G0.3
/#5
It is not allowed to use a variable for “n” of “/n” (n= 1 to 9).
#100
It is not allowed to use a variable for O number (program number).
N #200
If it not allowed to use a variable for N number (sequence number).
X#l, #l = 45.2346
X45.235 mm (0.001 mm input unit)
F#2, #2 = 0.255
F0.26 m/rev (F32 format)
G04 P#4, #3 = 5.37672
G04 P5.377 sec
M#4, #4 = 2.7236
M03
G#4, #4= 2.7236
G03