5. Position Commands
5.3 Decimal Point Input
29
Example of program
(1)
Example of program for decimal point valid address
Decimal point command 1
Specification
division
Program example
When 1 = 1
μ
m
When 1 = 10
μ
m
Decimal point
command 2
1 = 1mm
G0X123.45
(decimal points are all mm
points)
X123.450mm X123.450mm X123.450mm
G0X12345
X12.345mm
(last digit is 1
μ
m
unit)
X123.450mm X12345.000mm
#111 = 123, #112 = 5.55
X#111 Y#112
X123.000mm,
Y5.550mm
X123.000mm,
Y5.550mm
X123.000mm,
Y5.550mm
#113 = #111+#112
(addition)
#113 = 128.550
#113 = 128.550
#113 = 128.550
#114 = #111-#112
(subtraction)
#114 = 117.450
#114 = 117.450
#114 = 117.450
#115 = #111
∗
#112
(multiplication)
#115 = 682.650
#115 = 682.650
#115 = 682.650
#116 = #111/#112
#117 = #112/#111
(division)
#116 = 22.162
#117 = 0.045
#116 = 22.162
#117 = 0.045
#116 = 22.162
#117 = 0.045
Decimal point input I/II and decimal point command valid/invalid
If a command does not use a decimal point at an address where a decimal point command is valid
in the table on the following page, it is handled differently between decimal point input I and II
modes as explained below.
A command using a decimal point is handled the same way in either the decimal point input I or II
mode.
(1)
Decimal point input I
The least significant digit place of command data corresponds to the command unit.
(Example)
Command "X1" in the 1
μ
m system is equivalent to command "X0.001".
(2)
Decimal point input II
The least significant digit place of command data corresponds to the decimal point.
(Example)
Command "X1" in the 1
μ
m system is equivalent to command "X1.".
(Note)
When a four rules operator is contained, the data will be handled as that with a decimal
point.
(Example)
When the min. input command unit is 1
μ
m :
G0 x 123 + 0 ; ... X axis 123mm command. It will not be 123
μ
m.