对齐 LinuxCNC 解析器覆盖
This commit is contained in:
10
tests/gcode/linuxcnc_arc_distance_modes.ngc
Normal file
10
tests/gcode/linuxcnc_arc_distance_modes.ngc
Normal file
@@ -0,0 +1,10 @@
|
||||
G21 G90 G17
|
||||
G0 X0 Y0 Z0
|
||||
F100
|
||||
G91.1
|
||||
G3 X10 Y0 I5 J0
|
||||
G90.1
|
||||
G3 X20 Y0 I15 J0
|
||||
G91.1
|
||||
G3 X30 Y0 I5 J0
|
||||
M30
|
||||
9
tests/gcode/linuxcnc_arc_planes.ngc
Normal file
9
tests/gcode/linuxcnc_arc_planes.ngc
Normal file
@@ -0,0 +1,9 @@
|
||||
G21 G90 G17
|
||||
G0 X0 Y0 Z0
|
||||
F100
|
||||
G18
|
||||
G2 X10 Z0 I5 K0
|
||||
G0 X0 Y0 Z0
|
||||
G19
|
||||
G3 Y10 Z0 J5 K0
|
||||
M30
|
||||
28
tests/gcode/linuxcnc_canned_cycle_planes.ngc
Normal file
28
tests/gcode/linuxcnc_canned_cycle_planes.ngc
Normal file
@@ -0,0 +1,28 @@
|
||||
G21 G90
|
||||
G18
|
||||
G0 X0 Y5 Z0
|
||||
G99 G81 X1 Y-2 Z4 R3 F100
|
||||
G19
|
||||
G0 X5 Y0 Z0
|
||||
G99 G82 X-2 Y3 Z4 R2 P0.2 F100
|
||||
G18
|
||||
S600 M3
|
||||
G0 X0 Y5 Z0
|
||||
G99 G84 X1 Y-2 Z4 R3 P0.05 F60
|
||||
G19
|
||||
S500 M4
|
||||
G0 X5 Y0 Z0
|
||||
G99 G74 X-2 Y3 Z4 R2 P0.04 F50
|
||||
G18
|
||||
S900 M3
|
||||
G0 X0 Y5 Z0
|
||||
G99 G86 X1 Y-2 Z4 R3 P0.1 F80
|
||||
G19
|
||||
S700 M3
|
||||
G0 X5 Y0 Z0
|
||||
G99 G88 X-2 Y3 Z4 R2 P0.07 F70
|
||||
G19
|
||||
S800 M3
|
||||
G0 X5 Y0 Z0
|
||||
G99 G87 X-4 Y1 Z2 R2 I-2 J0.2 K0.3 F80
|
||||
M30
|
||||
@@ -3,4 +3,13 @@ G0 X0 Y0 Z10
|
||||
G99 G82 X10 Y0 Z-2 R3 P0.25 F100
|
||||
G83 X20 Y0 Z-3 R2 Q1
|
||||
G80
|
||||
S600 M3
|
||||
G99 G84 X30 Y0 Z-2 R2 P0.05 F60
|
||||
S500 M4
|
||||
G99 G74 X40 Y0 Z-2 R2 P0.04 F50
|
||||
S700 M3
|
||||
G99 G88 X50 Y0 Z-2 R2 P0.07 F70
|
||||
G0 X0 Y0 Z5
|
||||
S800 M3
|
||||
G99 G87 X60 Y0 Z-4 R2 I0.2 J0.3 K-2 F80
|
||||
M30
|
||||
|
||||
4
tests/gcode/linuxcnc_coordinate_p0.ngc
Normal file
4
tests/gcode/linuxcnc_coordinate_p0.ngc
Normal file
@@ -0,0 +1,4 @@
|
||||
G21 G90 G17
|
||||
G55
|
||||
G10 L2 P0 X7 Y8 Z9
|
||||
M30
|
||||
20
tests/gcode/linuxcnc_coordinate_select_all.ngc
Normal file
20
tests/gcode/linuxcnc_coordinate_select_all.ngc
Normal file
@@ -0,0 +1,20 @@
|
||||
G21 G90
|
||||
G10 L2 P1 X1
|
||||
G10 L2 P2 X2
|
||||
G10 L2 P3 X3
|
||||
G10 L2 P4 X4
|
||||
G10 L2 P5 X5
|
||||
G10 L2 P6 X6
|
||||
G10 L2 P7 X7
|
||||
G10 L2 P8 X8
|
||||
G10 L2 P9 X9
|
||||
G55
|
||||
G54
|
||||
G56
|
||||
G57
|
||||
G58
|
||||
G59
|
||||
G59.1
|
||||
G59.2
|
||||
G59.3
|
||||
M30
|
||||
6
tests/gcode/linuxcnc_dynamic_tool_length.ngc
Normal file
6
tests/gcode/linuxcnc_dynamic_tool_length.ngc
Normal file
@@ -0,0 +1,6 @@
|
||||
G21 G90 G17
|
||||
G43.1 X1 Z2
|
||||
G43.2 X0.25 Z0.5
|
||||
G43.2 H1
|
||||
G49
|
||||
M30
|
||||
7
tests/gcode/linuxcnc_g52_offset.ngc
Normal file
7
tests/gcode/linuxcnc_g52_offset.ngc
Normal file
@@ -0,0 +1,7 @@
|
||||
G21 G90 G17
|
||||
G52 X1 Y2
|
||||
G52 Y3
|
||||
G92.2
|
||||
G92.3
|
||||
G92.1
|
||||
M30
|
||||
7
tests/gcode/linuxcnc_g92_restore.ngc
Normal file
7
tests/gcode/linuxcnc_g92_restore.ngc
Normal file
@@ -0,0 +1,7 @@
|
||||
G21 G90 G17
|
||||
G92 X1 Y2 Z3
|
||||
G92.2
|
||||
G92.3
|
||||
G92.1
|
||||
G92.3
|
||||
M30
|
||||
22
tests/gcode/linuxcnc_indexed_parameters.ngc
Normal file
22
tests/gcode/linuxcnc_indexed_parameters.ngc
Normal file
@@ -0,0 +1,22 @@
|
||||
G21 G90
|
||||
F100
|
||||
#2 = 3
|
||||
#3 = 11
|
||||
#4 = [#[1 + 2] + ##2]
|
||||
#[1 + 2] = 17
|
||||
G1 X#[1 + 2]
|
||||
G1 Y#4
|
||||
O10 if [##2 EQ 17]
|
||||
G1 Z1
|
||||
O10 endif
|
||||
#5 = 21
|
||||
#5 = 9 G1 A#5
|
||||
G1 B#5
|
||||
#6 = 2
|
||||
#5 = 4 #6 = #5 G1 C#5 U#6
|
||||
G1 V#5 W#6
|
||||
G1 X#5 #5 = 12 #6 = #5
|
||||
G1 Y#5 Z#6
|
||||
#5 = 13 #5 = 14 G1 A#5
|
||||
G1 B#5
|
||||
M30
|
||||
2
tests/gcode/linuxcnc_ini_named_parameter.ini
Normal file
2
tests/gcode/linuxcnc_ini_named_parameter.ini
Normal file
@@ -0,0 +1,2 @@
|
||||
[SETUP]
|
||||
XPOS = 3.25
|
||||
7
tests/gcode/linuxcnc_ini_named_parameter.ngc
Normal file
7
tests/gcode/linuxcnc_ini_named_parameter.ngc
Normal file
@@ -0,0 +1,7 @@
|
||||
G21 G90
|
||||
F100
|
||||
G1 X#<_ini[setup]xpos>
|
||||
O10 if [EXISTS[#<_ini[SETUP]XPOS>]]
|
||||
G1 Y1
|
||||
O10 endif
|
||||
M30
|
||||
10
tests/gcode/linuxcnc_io_controls.ngc
Normal file
10
tests/gcode/linuxcnc_io_controls.ngc
Normal file
@@ -0,0 +1,10 @@
|
||||
G21 G90 G17
|
||||
M62 P1
|
||||
M63 P1
|
||||
M64 P2
|
||||
M65 P2
|
||||
M66 P0 L3 Q5
|
||||
M66 E1 L0
|
||||
M67 E0 Q1.25
|
||||
M68 E1 Q2.5
|
||||
M30
|
||||
7
tests/gcode/linuxcnc_machine_coordinates.ngc
Normal file
7
tests/gcode/linuxcnc_machine_coordinates.ngc
Normal file
@@ -0,0 +1,7 @@
|
||||
G21 G90 G17
|
||||
G0 X5 Y6 Z7
|
||||
G53 G0 X0 Z1
|
||||
G53 X2
|
||||
G1 F100
|
||||
G53 G1 Y3
|
||||
M30
|
||||
10
tests/gcode/linuxcnc_modal_autorestore.ngc
Normal file
10
tests/gcode/linuxcnc_modal_autorestore.ngc
Normal file
@@ -0,0 +1,10 @@
|
||||
G21 G91 G17
|
||||
G0 X0 Y0 Z0
|
||||
O100 call
|
||||
G0 X2
|
||||
M30
|
||||
O100 sub
|
||||
M73
|
||||
G90
|
||||
G0 X10
|
||||
O100 endsub
|
||||
5
tests/gcode/linuxcnc_modal_invalidate.ngc
Normal file
5
tests/gcode/linuxcnc_modal_invalidate.ngc
Normal file
@@ -0,0 +1,5 @@
|
||||
G21 G90 G17
|
||||
M70
|
||||
M71
|
||||
M72
|
||||
M30
|
||||
9
tests/gcode/linuxcnc_modal_state.ngc
Normal file
9
tests/gcode/linuxcnc_modal_state.ngc
Normal file
@@ -0,0 +1,9 @@
|
||||
G21 G90 G17
|
||||
G0 X0 Y0 Z0
|
||||
M70
|
||||
G91 G18 G20
|
||||
G0 X1 Z1
|
||||
M72
|
||||
G0 X2 Y0 Z2
|
||||
F100 G2 X4 Y0 I1 J0
|
||||
M30
|
||||
13
tests/gcode/linuxcnc_named_oword_subprogram.ngc
Normal file
13
tests/gcode/linuxcnc_named_oword_subprogram.ngc
Normal file
@@ -0,0 +1,13 @@
|
||||
G21 G90
|
||||
G0 X0 Y0 Z0
|
||||
F100
|
||||
O<move_plus> call [4] [6]
|
||||
G1 X20
|
||||
M30
|
||||
O<move_plus> sub
|
||||
#<sum> = [#1 + #2]
|
||||
G1 X#<sum>
|
||||
G1 Y#2
|
||||
O<move_plus> return
|
||||
G1 X99
|
||||
O<move_plus> endsub
|
||||
10
tests/gcode/linuxcnc_named_parameter_exists.ngc
Normal file
10
tests/gcode/linuxcnc_named_parameter_exists.ngc
Normal file
@@ -0,0 +1,10 @@
|
||||
G21 G90
|
||||
F100
|
||||
#<present> = 7
|
||||
O10 if [EXISTS[#<present>]]
|
||||
G1 X1
|
||||
O10 endif
|
||||
O20 if [EXISTS[#<missing>] EQ 0]
|
||||
G1 Y1
|
||||
O20 endif
|
||||
M30
|
||||
8
tests/gcode/linuxcnc_named_parameter_normalization.ngc
Normal file
8
tests/gcode/linuxcnc_named_parameter_normalization.ngc
Normal file
@@ -0,0 +1,8 @@
|
||||
G21 G90
|
||||
F100
|
||||
#<P a R am> = 12
|
||||
G1 X#<param>
|
||||
O10 if [EXISTS[#<P A R A M>]]
|
||||
G1 Y1
|
||||
O10 endif
|
||||
M30
|
||||
12
tests/gcode/linuxcnc_override_controls.ngc
Normal file
12
tests/gcode/linuxcnc_override_controls.ngc
Normal file
@@ -0,0 +1,12 @@
|
||||
G21 G90 G17
|
||||
M48
|
||||
M49
|
||||
M50 P1
|
||||
M50 P0
|
||||
M51 P1
|
||||
M51 P0
|
||||
M52 P1
|
||||
M52 P0
|
||||
M53 P1
|
||||
M53 P0
|
||||
M30
|
||||
47
tests/gcode/linuxcnc_oword_control_flow.ngc
Normal file
47
tests/gcode/linuxcnc_oword_control_flow.ngc
Normal file
@@ -0,0 +1,47 @@
|
||||
G21 G90
|
||||
F100
|
||||
#1 = 2
|
||||
O100 if [#1 EQ 1]
|
||||
G1 X99
|
||||
O100 elseif [#1 EQ 2]
|
||||
G1 X2
|
||||
O100 else
|
||||
G1 X98
|
||||
O100 endif
|
||||
#2 = 0
|
||||
O200 while [#2 LT 3]
|
||||
G1 Y#2
|
||||
#2 = [#2 + 1]
|
||||
O200 endwhile
|
||||
#3 = 0
|
||||
O300 repeat [3]
|
||||
#3 = [#3 + 1]
|
||||
G1 Z#3
|
||||
O300 endrepeat
|
||||
#4 = 0
|
||||
O400 do
|
||||
#4 = [#4 + 1]
|
||||
G1 A#4
|
||||
O400 while [#4 LT 3]
|
||||
#5 = 0
|
||||
O410 do
|
||||
#5 = [#5 + 1]
|
||||
O411 if [#5 GE 2]
|
||||
O410 break
|
||||
O411 endif
|
||||
G1 B#5
|
||||
O410 while [#5 LT 4]
|
||||
G1 C#5
|
||||
#6 = 0
|
||||
#7 = 0
|
||||
O420 do
|
||||
#6 = [#6 + 1]
|
||||
O421 if [#6 EQ 1]
|
||||
O420 continue
|
||||
O421 endif
|
||||
#7 = [#7 + 1]
|
||||
G1 U#6
|
||||
O420 while [#6 LT 3]
|
||||
G1 V#6
|
||||
G1 W#7
|
||||
M30
|
||||
10
tests/gcode/linuxcnc_predefined_positions.ngc
Normal file
10
tests/gcode/linuxcnc_predefined_positions.ngc
Normal file
@@ -0,0 +1,10 @@
|
||||
G21 G90 G17
|
||||
G0 X1 Y2 Z3
|
||||
G28.1
|
||||
G0 X10 Y20 Z30
|
||||
G28 Z5
|
||||
G0 X4 Y5 Z6
|
||||
G30.1
|
||||
G0 X40 Y50 Z60
|
||||
G30
|
||||
M30
|
||||
@@ -1,5 +1,16 @@
|
||||
G21 G90 G17
|
||||
G0 X0 Y0 Z5
|
||||
F100
|
||||
G38.2 Z4
|
||||
G0 Z5
|
||||
G38.3 Z3
|
||||
G0 Z5
|
||||
G38.4 Z2
|
||||
G0 Z5
|
||||
G38.5 Z1
|
||||
G0 Z5
|
||||
G38.3 Z0
|
||||
O10 if [#5070 EQ 1]
|
||||
G1 X1
|
||||
O10 endif
|
||||
M30
|
||||
|
||||
5
tests/gcode/linuxcnc_spindle_modes.ngc
Normal file
5
tests/gcode/linuxcnc_spindle_modes.ngc
Normal file
@@ -0,0 +1,5 @@
|
||||
G21 G90 G17
|
||||
G97 S1000
|
||||
G96 S120 D2500
|
||||
G97 S900
|
||||
M30
|
||||
3
tests/gcode/linuxcnc_spindle_orient.ngc
Normal file
3
tests/gcode/linuxcnc_spindle_orient.ngc
Normal file
@@ -0,0 +1,3 @@
|
||||
G21 G90 G17
|
||||
M19 R45 P1 Q2
|
||||
M30
|
||||
5
tests/gcode/linuxcnc_threading_cycle.ngc
Normal file
5
tests/gcode/linuxcnc_threading_cycle.ngc
Normal file
@@ -0,0 +1,5 @@
|
||||
G20 G90 G18
|
||||
S500 M3
|
||||
G0 X1 Z0.1
|
||||
G76 P0.05 Z-1 I-.075 J0.008 K0.045 Q29.5 L2 E0.045
|
||||
M30
|
||||
7
tests/gcode/linuxcnc_threading_sync.ngc
Normal file
7
tests/gcode/linuxcnc_threading_sync.ngc
Normal file
@@ -0,0 +1,7 @@
|
||||
G21 G90 G17
|
||||
S500 M3
|
||||
G0 Z5
|
||||
G33 Z0 K1
|
||||
G0 Z5
|
||||
G33.1 Z0 K1
|
||||
M30
|
||||
Reference in New Issue
Block a user