对齐 LinuxCNC 解释器行为覆盖
This commit is contained in:
9
tests/gcode/linuxcnc_abort_hot_comment.ngc
Normal file
9
tests/gcode/linuxcnc_abort_hot_comment.ngc
Normal file
@@ -0,0 +1,9 @@
|
||||
#42 = 0
|
||||
#<named> = 4711
|
||||
O100 while [#42 LT 100]
|
||||
O200 if [#42 EQ 20]
|
||||
(abort, MixedCase param42=#42 named=#<named>)
|
||||
O200 endif
|
||||
#42 = [#42 + 1]
|
||||
O100 endwhile
|
||||
M2
|
||||
4
tests/gcode/linuxcnc_arc_center_tolerance_bad_metric.ngc
Normal file
4
tests/gcode/linuxcnc_arc_center_tolerance_bad_metric.ngc
Normal file
@@ -0,0 +1,4 @@
|
||||
G21
|
||||
F1
|
||||
G0 X0 Y0 Z0
|
||||
G2 X50.00 Y0 I[25.00 - [0.0101 * SQRT[2]]]
|
||||
@@ -0,0 +1,5 @@
|
||||
G20
|
||||
F1
|
||||
G0 X0 Y0 Z0
|
||||
G2 X5.000 Y0 I[2.500 - [0.00099 * SQRT[2]]]
|
||||
M2
|
||||
18
tests/gcode/linuxcnc_call_level.ngc
Normal file
18
tests/gcode/linuxcnc_call_level.ngc
Normal file
@@ -0,0 +1,18 @@
|
||||
O<inner> sub
|
||||
O10 if [#<_call_level> EQ 2 AND #<_remap_level> EQ 0]
|
||||
G1 Z1
|
||||
O10 endif
|
||||
O<inner> endsub
|
||||
O<outer> sub
|
||||
O20 if [#<_call_level> EQ 1 AND #<_remap_level> EQ 0]
|
||||
G1 Y1
|
||||
O20 endif
|
||||
O<inner> call
|
||||
O<outer> endsub
|
||||
G21 G90
|
||||
F100
|
||||
O30 if [#<_call_level> EQ 0 AND #<_remap_level> EQ 0]
|
||||
G1 X1
|
||||
O30 endif
|
||||
O<outer> call
|
||||
M30
|
||||
@@ -0,0 +1,2 @@
|
||||
G81 X0 Y0 Z-1 R0 F12
|
||||
A90
|
||||
6
tests/gcode/linuxcnc_ccomp_arcexit_error.ngc
Normal file
6
tests/gcode/linuxcnc_ccomp_arcexit_error.ngc
Normal file
@@ -0,0 +1,6 @@
|
||||
G0 X0 Y0 Z0
|
||||
G41.1 D.25
|
||||
G1 X1 F1
|
||||
G1 X2
|
||||
G40
|
||||
G2 I1
|
||||
8
tests/gcode/linuxcnc_ccomp_gouging_error.ngc
Normal file
8
tests/gcode/linuxcnc_ccomp_gouging_error.ngc
Normal file
@@ -0,0 +1,8 @@
|
||||
G0 X0 Y0 Z0
|
||||
G41.1 D.25
|
||||
G1 X1 F1
|
||||
G1 X2
|
||||
G1 Y.1
|
||||
G1 X1
|
||||
G40
|
||||
G1 X2
|
||||
@@ -0,0 +1,7 @@
|
||||
G21 G90 G17
|
||||
F100
|
||||
G1 X1 Y2 Z3 A4 B5 C6 U7 V8 W9
|
||||
O10 if [[#5420 EQ 1] AND [#5421 EQ 2] AND [#5422 EQ 3] AND [#5423 EQ 4] AND [#5424 EQ 5] AND [#5425 EQ 6] AND [#5426 EQ 7] AND [#5427 EQ 8] AND [#5428 EQ 9]]
|
||||
G1 X10
|
||||
O10 endif
|
||||
M30
|
||||
11
tests/gcode/linuxcnc_debug_level_parameter.ngc
Normal file
11
tests/gcode/linuxcnc_debug_level_parameter.ngc
Normal file
@@ -0,0 +1,11 @@
|
||||
#5599 = 1
|
||||
O10 if [#5599 EQ 1]
|
||||
G1 X1 F100
|
||||
O10 endif
|
||||
(DEBUG,one)
|
||||
#5599 = 0
|
||||
O20 if [#5599 EQ 0]
|
||||
G1 Y1
|
||||
O20 endif
|
||||
(DEBUG,two)
|
||||
M30
|
||||
6
tests/gcode/linuxcnc_exists_word_value.ngc
Normal file
6
tests/gcode/linuxcnc_exists_word_value.ngc
Normal file
@@ -0,0 +1,6 @@
|
||||
#<a> = 999
|
||||
G0 X EXISTS[#1] Y EXISTS[#99999] Z EXISTS[#<a>] A EXISTS[#<b>]
|
||||
#1 = 2
|
||||
#2 = 99999
|
||||
G0 X EXISTS[##1] Y EXISTS[##2] Z EXISTS[###1]
|
||||
M30
|
||||
3
tests/gcode/linuxcnc_extended_plane_arc_error.ngc
Normal file
3
tests/gcode/linuxcnc_extended_plane_arc_error.ngc
Normal file
@@ -0,0 +1,3 @@
|
||||
G21 G90 G17.1
|
||||
F100
|
||||
G2 U1 V0 R1
|
||||
9
tests/gcode/linuxcnc_extended_plane_cycle.ngc
Normal file
9
tests/gcode/linuxcnc_extended_plane_cycle.ngc
Normal file
@@ -0,0 +1,9 @@
|
||||
G21 G90 G17.1
|
||||
F100
|
||||
G81 U1 V2 W-1 R1
|
||||
G80
|
||||
G17
|
||||
G41.1 D0.25
|
||||
G17.1
|
||||
G40
|
||||
M2
|
||||
9
tests/gcode/linuxcnc_g28_g30_numbered_parameters.ngc
Normal file
9
tests/gcode/linuxcnc_g28_g30_numbered_parameters.ngc
Normal file
@@ -0,0 +1,9 @@
|
||||
G21 G90 G17
|
||||
G0 X1 Y2 Z3
|
||||
G28.1
|
||||
G0 X4 Y5 Z6
|
||||
G30.1
|
||||
O10 if [[#5161 EQ 1] AND [#5162 EQ 2] AND [#5163 EQ 3] AND [#5181 EQ 4] AND [#5182 EQ 5] AND [#5183 EQ 6]]
|
||||
G1 X10 F100
|
||||
O10 endif
|
||||
M30
|
||||
8
tests/gcode/linuxcnc_g52_g92_numbered_interaction.ngc
Normal file
8
tests/gcode/linuxcnc_g52_g92_numbered_interaction.ngc
Normal file
@@ -0,0 +1,8 @@
|
||||
G20
|
||||
F100
|
||||
G52 X2 Y3
|
||||
G52 X0 Y0
|
||||
O10 if [[#5210 EQ 1] AND [#5211 EQ 0] AND [#5212 EQ 0]]
|
||||
G1 X1
|
||||
O10 endif
|
||||
M30
|
||||
6
tests/gcode/linuxcnc_g54_persistent_parameters_check.ngc
Normal file
6
tests/gcode/linuxcnc_g54_persistent_parameters_check.ngc
Normal file
@@ -0,0 +1,6 @@
|
||||
G21 G90 G17
|
||||
F100
|
||||
O10 if [[#5220 EQ 1] AND [#5221 EQ 1] AND [#5222 EQ 2] AND [#5223 EQ 3] AND [#5224 EQ 4] AND [#5225 EQ 5] AND [#5226 EQ 6] AND [#5227 EQ 7] AND [#5228 EQ 8] AND [#5229 EQ 9] AND [#5230 EQ 11]]
|
||||
G1 X1
|
||||
O10 endif
|
||||
M30
|
||||
3
tests/gcode/linuxcnc_g54_persistent_parameters_set.ngc
Normal file
3
tests/gcode/linuxcnc_g54_persistent_parameters_set.ngc
Normal file
@@ -0,0 +1,3 @@
|
||||
G21 G90 G17
|
||||
G10 L2 P1 X1 Y2 Z3 A4 B5 C6 U7 V8 W9 R11
|
||||
M30
|
||||
6
tests/gcode/linuxcnc_g54_rotary_numbered_parameters.ngc
Normal file
6
tests/gcode/linuxcnc_g54_rotary_numbered_parameters.ngc
Normal file
@@ -0,0 +1,6 @@
|
||||
G21 G90 G17
|
||||
G10 L2 P1 X7 Y8 Z9 A1 B2 C3 U4 V5 W6 R20
|
||||
O10 if [[#5220 EQ 1] AND [#5221 EQ 7] AND [#5222 EQ 8] AND [#5223 EQ 9] AND [#5224 EQ 1] AND [#5225 EQ 2] AND [#5226 EQ 3] AND [#5227 EQ 4] AND [#5228 EQ 5] AND [#5229 EQ 6] AND [#5230 EQ 20]]
|
||||
G1 X1 F100
|
||||
O10 endif
|
||||
M30
|
||||
7
tests/gcode/linuxcnc_g59_3_numbered_parameters.ngc
Normal file
7
tests/gcode/linuxcnc_g59_3_numbered_parameters.ngc
Normal file
@@ -0,0 +1,7 @@
|
||||
G21 G90 G17
|
||||
G10 L2 P9 X7 Y8 Z9 R15
|
||||
G59.3
|
||||
O10 if [[#5220 EQ 9] AND [#5381 EQ 7] AND [#5382 EQ 8] AND [#5383 EQ 9] AND [#5390 EQ 15]]
|
||||
G1 X1 F100
|
||||
O10 endif
|
||||
M30
|
||||
@@ -0,0 +1,7 @@
|
||||
G21 G90 G17
|
||||
G10 L2 P9 A1 B2 C3 U4 V5 W6 R15
|
||||
G59.3
|
||||
O10 if [[#5384 EQ 1] AND [#5385 EQ 2] AND [#5386 EQ 3] AND [#5387 EQ 4] AND [#5388 EQ 5] AND [#5389 EQ 6] AND [#5390 EQ 15]]
|
||||
G1 X1 F100
|
||||
O10 endif
|
||||
M30
|
||||
7
tests/gcode/linuxcnc_g5x_numbered_parameters.ngc
Normal file
7
tests/gcode/linuxcnc_g5x_numbered_parameters.ngc
Normal file
@@ -0,0 +1,7 @@
|
||||
G21 G90 G17
|
||||
G10 L2 P2 X12.5 Y-3 Z4 R30
|
||||
G55
|
||||
O10 if [[#5220 EQ 2] AND [#5241 EQ 12.5] AND [#5242 EQ -3] AND [#5243 EQ 4] AND [#5250 EQ 30]]
|
||||
G1 X1 F100
|
||||
O10 endif
|
||||
M30
|
||||
7
tests/gcode/linuxcnc_g5x_rotary_numbered_parameters.ngc
Normal file
7
tests/gcode/linuxcnc_g5x_rotary_numbered_parameters.ngc
Normal file
@@ -0,0 +1,7 @@
|
||||
G21 G90 G17
|
||||
G10 L2 P2 A1 B2 C3 U4 V5 W6 R30
|
||||
G55
|
||||
O10 if [[#5244 EQ 1] AND [#5245 EQ 2] AND [#5246 EQ 3] AND [#5247 EQ 4] AND [#5248 EQ 5] AND [#5249 EQ 6] AND [#5250 EQ 30]]
|
||||
G1 X1 F100
|
||||
O10 endif
|
||||
M30
|
||||
3
tests/gcode/linuxcnc_g62_extended_plane_error.ngc
Normal file
3
tests/gcode/linuxcnc_g62_extended_plane_error.ngc
Normal file
@@ -0,0 +1,3 @@
|
||||
G21 G90 G17.1
|
||||
F100
|
||||
G6.2 U1 V1 P3 Q1
|
||||
13
tests/gcode/linuxcnc_g76only.ngc
Normal file
13
tests/gcode/linuxcnc_g76only.ngc
Normal file
@@ -0,0 +1,13 @@
|
||||
G20 G64 G18
|
||||
|
||||
T4 M6
|
||||
G43
|
||||
S800 M3
|
||||
G4 P1
|
||||
G0 Z.2 X.2
|
||||
G76 P.05 Z-.5 I-.075 J.008 K.045 H3 R2.0 Q29.5 E.05 L2
|
||||
G0 X.5
|
||||
G0 Z0
|
||||
M5
|
||||
|
||||
M2
|
||||
6
tests/gcode/linuxcnc_g92_numbered_parameters.ngc
Normal file
6
tests/gcode/linuxcnc_g92_numbered_parameters.ngc
Normal file
@@ -0,0 +1,6 @@
|
||||
G21 G90 G17
|
||||
G92 X1 Y2 Z3
|
||||
O10 if [[#5210 EQ 1] AND [#5211 EQ -1] AND [#5212 EQ -2] AND [#5213 EQ -3]]
|
||||
G1 X1 F100
|
||||
O10 endif
|
||||
M30
|
||||
2
tests/gcode/linuxcnc_infinite_expression_error.ngc
Normal file
2
tests/gcode/linuxcnc_infinite_expression_error.ngc
Normal file
@@ -0,0 +1,2 @@
|
||||
#1 = EXP[1000]
|
||||
G1 X#1 F100
|
||||
12
tests/gcode/linuxcnc_lowercase_numeric_oword.ngc
Normal file
12
tests/gcode/linuxcnc_lowercase_numeric_oword.ngc
Normal file
@@ -0,0 +1,12 @@
|
||||
o100 sub
|
||||
o10 if [#1 GT 0]
|
||||
o10 return [#1 * 2]
|
||||
o10 endif
|
||||
o100 endsub [7]
|
||||
g21 g90
|
||||
f100
|
||||
o100 call [3]
|
||||
g1 x#<_value>
|
||||
o100 call [0]
|
||||
g1 y#<_value>
|
||||
m30
|
||||
11
tests/gcode/linuxcnc_m66_result_parameter.ngc
Normal file
11
tests/gcode/linuxcnc_m66_result_parameter.ngc
Normal file
@@ -0,0 +1,11 @@
|
||||
#5399 = 1
|
||||
M66 P0 L0
|
||||
O10 if [#5399 EQ 1]
|
||||
G1 X1 F100
|
||||
O10 endif
|
||||
#5399 = 42.13
|
||||
M66 E0 L0
|
||||
O20 if [#5399 EQ 42.13]
|
||||
G1 Y1
|
||||
O20 endif
|
||||
M30
|
||||
23
tests/gcode/linuxcnc_m98_mixed_styles_variables.ngc
Normal file
23
tests/gcode/linuxcnc_m98_mixed_styles_variables.ngc
Normal file
@@ -0,0 +1,23 @@
|
||||
#1 = 42.01
|
||||
#30 = 42.30
|
||||
#31 = 42.31
|
||||
M98 P1
|
||||
G1 X#1 Y#30 Z#31 F100
|
||||
#1 = 42.01
|
||||
#30 = 42.30
|
||||
#31 = 42.31
|
||||
O2 call
|
||||
G1 A#1 B#30 C#31
|
||||
M30
|
||||
|
||||
O1
|
||||
#1 = 13.01
|
||||
#30 = 13.30
|
||||
#31 = 13.31
|
||||
M99
|
||||
|
||||
O2 sub
|
||||
#1 = 13.01
|
||||
#30 = 13.30
|
||||
#31 = 13.31
|
||||
O2 endsub
|
||||
@@ -0,0 +1,7 @@
|
||||
G21 G90 G17
|
||||
F100
|
||||
G38.2 A5 B6 C7 U8 V9 W10
|
||||
O10 if [[#5064 EQ 5] AND [#5065 EQ 6] AND [#5066 EQ 7] AND [#5067 EQ 8] AND [#5068 EQ 9] AND [#5069 EQ 10] AND [#5070 EQ 1]]
|
||||
G1 X1
|
||||
O10 endif
|
||||
M30
|
||||
2
tests/gcode/linuxcnc_negative_sqrt_error.ngc
Normal file
2
tests/gcode/linuxcnc_negative_sqrt_error.ngc
Normal file
@@ -0,0 +1,2 @@
|
||||
#1 = SQRT[-1]
|
||||
G1 X#1 F100
|
||||
@@ -0,0 +1,5 @@
|
||||
O<nested> sub
|
||||
O100 sub
|
||||
O100 endsub
|
||||
O<nested> endsub
|
||||
M2
|
||||
12
tests/gcode/linuxcnc_numbered_parameters.ngc
Normal file
12
tests/gcode/linuxcnc_numbered_parameters.ngc
Normal file
@@ -0,0 +1,12 @@
|
||||
G21 G90 G17
|
||||
T1 M6
|
||||
G43 H1
|
||||
F100
|
||||
O10 if [[#5400 EQ 0] AND [#5403 EQ 12.5] AND [#5410 EQ 0] AND [#5411 EQ 0] AND [#5412 EQ 0] AND [#5413 EQ 0] AND [#5422 EQ -12.5]]
|
||||
G1 X1
|
||||
O10 endif
|
||||
G38.2 X5 Y0 Z-1
|
||||
O20 if [[#5061 EQ 5] AND [#5062 EQ 0] AND [#5063 EQ -1] AND [#5064 EQ 0] AND [#5065 EQ 0] AND [#5066 EQ 0] AND [#5067 EQ 0] AND [#5068 EQ 0] AND [#5069 EQ 0] AND [#5070 EQ 1]]
|
||||
G1 Y1
|
||||
O20 endif
|
||||
M30
|
||||
7
tests/gcode/linuxcnc_numeric_oword_main_eof_error.ngc
Normal file
7
tests/gcode/linuxcnc_numeric_oword_main_eof_error.ngc
Normal file
@@ -0,0 +1,7 @@
|
||||
O2 sub
|
||||
G0 Z3
|
||||
O2 endsub
|
||||
|
||||
O1
|
||||
G0 X1 Y2
|
||||
O2 call
|
||||
@@ -0,0 +1,7 @@
|
||||
O1
|
||||
G0 X1 Y2
|
||||
O2 call
|
||||
|
||||
O2 sub
|
||||
G0 Z3
|
||||
O2 endsub
|
||||
16
tests/gcode/linuxcnc_parameter_expression_assignment.ngc
Normal file
16
tests/gcode/linuxcnc_parameter_expression_assignment.ngc
Normal file
@@ -0,0 +1,16 @@
|
||||
G20
|
||||
#<a> = 2
|
||||
#atan[1]/[1] = 3
|
||||
#3 = 4
|
||||
G0 X#<a> Y#45 Z#3
|
||||
#1 = 5
|
||||
#6 = [#ABS[-1] + 2]
|
||||
G0 A#6
|
||||
G0 B#ABS[-1]
|
||||
#2 = -1
|
||||
G0 C#-#2
|
||||
#-#2 = 6
|
||||
G0 U#1
|
||||
G0 V# ABS[-1]
|
||||
G 0 W 3
|
||||
M2
|
||||
8
tests/gcode/linuxcnc_persistent_parameters_check.ngc
Normal file
8
tests/gcode/linuxcnc_persistent_parameters_check.ngc
Normal file
@@ -0,0 +1,8 @@
|
||||
G21 G90 G17
|
||||
F100
|
||||
O10 if [[#5161 EQ 1] AND [#5162 EQ 2] AND [#5163 EQ 3] AND [#5210 EQ 1] AND [#5211 LT -12.1] AND [#5211 GT -12.3] AND [#5212 LT -7.1] AND [#5212 GT -7.3] AND [#5213 EQ -12] AND [#5220 EQ 1]]
|
||||
O11 if [[#5241 EQ 7] AND [#5242 EQ 8] AND [#5243 EQ 9] AND [#5250 EQ 30]]
|
||||
G1 X1
|
||||
O11 endif
|
||||
O10 endif
|
||||
M30
|
||||
8
tests/gcode/linuxcnc_persistent_parameters_set.ngc
Normal file
8
tests/gcode/linuxcnc_persistent_parameters_set.ngc
Normal file
@@ -0,0 +1,8 @@
|
||||
G21 G90 G17
|
||||
#5001 = 23
|
||||
G0 X1 Y2 Z3
|
||||
G28.1
|
||||
G10 L2 P2 X7 Y8 Z9 R30
|
||||
G55
|
||||
G92 X4 Y5 Z6
|
||||
M30
|
||||
@@ -0,0 +1 @@
|
||||
#<_line> = 7
|
||||
20
tests/gcode/linuxcnc_readonly_named_parameters_extra.ngc
Normal file
20
tests/gcode/linuxcnc_readonly_named_parameters_extra.ngc
Normal file
@@ -0,0 +1,20 @@
|
||||
G21 G90 G17
|
||||
G97 S1000
|
||||
O10 if [#<_spindle_rpm_mode> EQ 1 AND #<_spindle_css_mode> EQ 0 AND #<_ccomp> EQ 400]
|
||||
G1 X1 F100
|
||||
O10 endif
|
||||
G41.1 D0.25
|
||||
O20 if [#<_ccomp> EQ 410]
|
||||
G1 Y1
|
||||
O20 endif
|
||||
G40
|
||||
G42.1 D0.25
|
||||
O30 if [#<_ccomp> EQ 420]
|
||||
G1 X2
|
||||
O30 endif
|
||||
G40
|
||||
G96 S120 D2500
|
||||
O40 if [#<_spindle_rpm_mode> EQ 0 AND #<_spindle_css_mode> EQ 1]
|
||||
G1 A1
|
||||
O40 endif
|
||||
M30
|
||||
@@ -0,0 +1 @@
|
||||
#5400 = 1
|
||||
@@ -0,0 +1,9 @@
|
||||
G21 G90 G17
|
||||
G0 A1 B2 C3 U4 V5 W6
|
||||
G28.1
|
||||
G0 A7 B8 C9 U10 V11 W12
|
||||
G30.1
|
||||
O10 if [[#5164 EQ 1] AND [#5165 EQ 2] AND [#5166 EQ 3] AND [#5167 EQ 4] AND [#5168 EQ 5] AND [#5169 EQ 6] AND [#5184 EQ 7] AND [#5185 EQ 8] AND [#5186 EQ 9] AND [#5187 EQ 10] AND [#5188 EQ 11] AND [#5189 EQ 12]]
|
||||
G1 X1 F100
|
||||
O10 endif
|
||||
M30
|
||||
6
tests/gcode/linuxcnc_rotary_g92_numbered_parameters.ngc
Normal file
6
tests/gcode/linuxcnc_rotary_g92_numbered_parameters.ngc
Normal file
@@ -0,0 +1,6 @@
|
||||
G21 G90 G17
|
||||
G92 A1 B2 C3 U4 V5 W6
|
||||
O10 if [[#5214 EQ -1] AND [#5215 EQ -2] AND [#5216 EQ -3] AND [#5217 EQ -4] AND [#5218 EQ -5] AND [#5219 EQ -6]]
|
||||
G1 X1 F100
|
||||
O10 endif
|
||||
M30
|
||||
@@ -0,0 +1,8 @@
|
||||
G21 G90 G17
|
||||
F100
|
||||
O10 if [[#5164 EQ 1] AND [#5165 EQ 2] AND [#5166 EQ 3] AND [#5167 EQ 4] AND [#5168 EQ 5] AND [#5169 EQ 6] AND [#5184 EQ 7] AND [#5185 EQ 8] AND [#5186 EQ 9] AND [#5187 EQ 10] AND [#5188 EQ 11] AND [#5189 EQ 12]]
|
||||
O11 if [[#5384 EQ 13] AND [#5385 EQ 14] AND [#5386 EQ 15] AND [#5387 EQ 16] AND [#5388 EQ 17] AND [#5389 EQ 18] AND [#5390 EQ 19]]
|
||||
G1 X1
|
||||
O11 endif
|
||||
O10 endif
|
||||
M30
|
||||
@@ -0,0 +1,7 @@
|
||||
G21 G90 G17
|
||||
G0 A1 B2 C3 U4 V5 W6
|
||||
G28.1
|
||||
G0 A7 B8 C9 U10 V11 W12
|
||||
G30.1
|
||||
G10 L2 P9 A13 B14 C15 U16 V17 W18 R19
|
||||
M30
|
||||
@@ -0,0 +1,7 @@
|
||||
G21 G90 G17
|
||||
F100
|
||||
G38.2 A5
|
||||
O10 if [[#5064 EQ 5] AND [#5070 EQ 1]]
|
||||
G1 X1
|
||||
O10 endif
|
||||
M30
|
||||
@@ -0,0 +1,6 @@
|
||||
G21 G90 G17
|
||||
G43.1 A1 B2 C3 U4 V5 W6
|
||||
O10 if [[#5404 EQ 1] AND [#5405 EQ 2] AND [#5406 EQ 3] AND [#5407 EQ 4] AND [#5408 EQ 5] AND [#5409 EQ 6] AND [#5423 EQ -1] AND [#5424 EQ -2] AND [#5425 EQ -3] AND [#5426 EQ -4] AND [#5427 EQ -5] AND [#5428 EQ -6]]
|
||||
G1 X1 F100
|
||||
O10 endif
|
||||
M30
|
||||
6
tests/gcode/linuxcnc_spindle_tool_info_parameter.ngc
Normal file
6
tests/gcode/linuxcnc_spindle_tool_info_parameter.ngc
Normal file
@@ -0,0 +1,6 @@
|
||||
G21 G90 G17
|
||||
F100
|
||||
O10 if [[#5400 EQ 1] AND [#5410 EQ 6] AND [#5411 EQ 12] AND [#5412 EQ 34] AND [#5413 EQ 5]]
|
||||
G1 X1
|
||||
O10 endif
|
||||
M30
|
||||
7
tests/gcode/linuxcnc_tool_info_zero_parameter.ngc
Normal file
7
tests/gcode/linuxcnc_tool_info_zero_parameter.ngc
Normal file
@@ -0,0 +1,7 @@
|
||||
G21 G90 G17
|
||||
M61 Q1
|
||||
F100
|
||||
O10 if [[#5400 EQ 0] AND [#5410 EQ 0] AND [#5411 EQ 0] AND [#5412 EQ 0] AND [#5413 EQ 0]]
|
||||
G1 X1
|
||||
O10 endif
|
||||
M30
|
||||
6
tests/gcode/linuxcnc_tool_offset_numbered_parameters.ngc
Normal file
6
tests/gcode/linuxcnc_tool_offset_numbered_parameters.ngc
Normal file
@@ -0,0 +1,6 @@
|
||||
G21 G90 G17
|
||||
G43.1 X1 Y0.5 Z2
|
||||
O10 if [[#5401 EQ 1] AND [#5402 EQ 0.5] AND [#5403 EQ 2] AND [#5420 EQ -1] AND [#5421 EQ -0.5] AND [#5422 EQ -2]]
|
||||
G1 Y1 F100
|
||||
O10 endif
|
||||
M30
|
||||
@@ -0,0 +1,5 @@
|
||||
F100
|
||||
O10 if [[#5000 EQ 0] AND [#5001 EQ 22] AND [#5030 EQ 32] AND [#5060 EQ 33]]
|
||||
G1 X1
|
||||
O10 endif
|
||||
M30
|
||||
@@ -0,0 +1,5 @@
|
||||
#5000 = 11
|
||||
#5001 = 22
|
||||
#5030 = 32
|
||||
#5060 = 33
|
||||
M30
|
||||
5
tests/gcode/linuxcnc_user_persistent_parameter_check.ngc
Normal file
5
tests/gcode/linuxcnc_user_persistent_parameter_check.ngc
Normal file
@@ -0,0 +1,5 @@
|
||||
F100
|
||||
O10 if [#5001 EQ 0]
|
||||
G1 X1
|
||||
O10 endif
|
||||
M30
|
||||
@@ -0,0 +1,5 @@
|
||||
F100
|
||||
O10 if [#5001 EQ 23]
|
||||
G1 X1
|
||||
O10 endif
|
||||
M30
|
||||
2
tests/gcode/linuxcnc_user_persistent_parameter_set.ngc
Normal file
2
tests/gcode/linuxcnc_user_persistent_parameter_set.ngc
Normal file
@@ -0,0 +1,2 @@
|
||||
#5001 = 23
|
||||
M30
|
||||
25
tests/gcode/linuxcnc_value_returned.ngc
Normal file
25
tests/gcode/linuxcnc_value_returned.ngc
Normal file
@@ -0,0 +1,25 @@
|
||||
O<f1> sub
|
||||
O<f1> endsub [4711]
|
||||
O<f2> sub
|
||||
O100 return [4712]
|
||||
O<f2> endsub
|
||||
O<proc> sub
|
||||
O<proc> endsub
|
||||
G21 G90
|
||||
F100
|
||||
O10 if [#<_value> EQ 0 AND #<_value_returned> EQ 0]
|
||||
G1 X1
|
||||
O10 endif
|
||||
O<f1> call
|
||||
O20 if [#<_value> EQ 4711 AND #<_value_returned> EQ 1]
|
||||
G1 Y1
|
||||
O20 endif
|
||||
O<proc> call
|
||||
O30 if [#<_value> EQ 0 AND #<_value_returned> EQ 0]
|
||||
G1 Z1
|
||||
O30 endif
|
||||
O<f2> call
|
||||
O40 if [#<_value> EQ 4712 AND #<_value_returned> EQ 1]
|
||||
G1 A1
|
||||
O40 endif
|
||||
M30
|
||||
5
tests/gcode/linuxcnc_volatile_global_parameter_check.ngc
Normal file
5
tests/gcode/linuxcnc_volatile_global_parameter_check.ngc
Normal file
@@ -0,0 +1,5 @@
|
||||
F100
|
||||
O10 if [#31 EQ 0]
|
||||
G1 X1
|
||||
O10 endif
|
||||
M30
|
||||
2
tests/gcode/linuxcnc_volatile_global_parameter_set.ngc
Normal file
2
tests/gcode/linuxcnc_volatile_global_parameter_set.ngc
Normal file
@@ -0,0 +1,2 @@
|
||||
#31 = 7
|
||||
M30
|
||||
6
tests/gcode/linuxcnc_word_bracket_whitespace.ngc
Normal file
6
tests/gcode/linuxcnc_word_bracket_whitespace.ngc
Normal file
@@ -0,0 +1,6 @@
|
||||
G21 G90
|
||||
F100
|
||||
G1 X [1 + 2]
|
||||
G1 Y + [1 + 2]
|
||||
G1 X- [1 + 2]
|
||||
M2
|
||||
Reference in New Issue
Block a user