按规划持续工作

This commit is contained in:
2026-06-09 06:13:28 +08:00
parent 902c6ecaea
commit 2658ee3b72
255 changed files with 12487 additions and 150 deletions

View File

@@ -0,0 +1 @@
Exercise parameter passing to user-defined code

View File

@@ -0,0 +1,17 @@
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
N..... SET_XY_ROTATION(0.0000)
N..... SET_FEED_REFERENCE(CANON_XYZ)
N..... ON_RESET()
N..... MESSAGE(" M400 call_level= 1.000000 remap_level=1.000000")
N..... MESSAGE(" P word set: 47.110000")
N..... MESSAGE(" Q word set: 8.150000")
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
N..... SET_XY_ROTATION(0.0000)
N..... SET_FEED_MODE(0, 0)
N..... SET_FEED_RATE(0.0000)
N..... STOP_SPINDLE_TURNING(0)
N..... SET_SPINDLE_MODE(0 0.0000)
N..... PROGRAM_END()
N..... ON_RESET()

View File

@@ -0,0 +1,18 @@
o<rm400> sub
(debug, M400 call_level= #<_call_level> remap_level=#<_remap_level>)
o100 if [EXISTS[#<P>]]
(debug, P word set: #<P>)
o100 else
(debug, P word missing)
o100 endif
o120 if [EXISTS[#<Q>]]
(debug, Q word set: #<Q>)
o120 else
(debug, Q word missing)
o120 endif
o<rm400> endsub
m2
%

View File

@@ -0,0 +1,9 @@
[EMC]
DEBUG=0
LOG_LEVEL=0
[RS274NGC]
SUBROUTINE_PATH = .
# M405 requires P- Q- and does NOT permit any other words in this block
REMAP=M400 modalgroup=5 argspec=PQ ngc=rm400

View File

@@ -0,0 +1,2 @@
M400 P47.11 Q8.15
M2

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -i test.ini -g test.ngc | awk '{$1=""; print}'
exit "${PIPESTATUS[0]}"

View File

@@ -0,0 +1,3 @@
Exercise failed parameter passing to user-defined code
The required Q parameter is missing

View File

@@ -0,0 +1,17 @@
executing
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
4 N..... SET_XY_ROTATION(0.0000)
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
6 N..... ON_RESET()
user-defined M400: missing: Q
O <rm400> call
7 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
8 N..... SET_XY_ROTATION(0.0000)
9 N..... SET_FEED_MODE(0, 0)
10 N..... SET_FEED_RATE(0.0000)
11 N..... STOP_SPINDLE_TURNING(0)
12 N..... SET_SPINDLE_MODE(0 0.0000)
13 N..... PROGRAM_END()
14 N..... ON_RESET()

View File

@@ -0,0 +1,18 @@
o<rm400> sub
(debug, M400 call_level= #<_call_level> remap_level=#<_remap_level>)
o100 if [EXISTS[#<P>]]
(debug, P word set: #<P>)
o100 else
(debug, P word missing)
o100 endif
o120 if [EXISTS[#<Q>]]
(debug, Q word set: #<Q>)
o120 else
(debug, Q word missing)
o120 endif
o<rm400> endsub
m2
%

View File

@@ -0,0 +1,9 @@
[EMC]
DEBUG=0
LOG_LEVEL=0
[RS274NGC]
SUBROUTINE_PATH = .
# M405 requires P- Q- and does NOT permit any other words in this block
REMAP=M400 modalgroup=5 argspec=PQ ngc=rm400

View File

@@ -0,0 +1,2 @@
M400 P47.11
M2

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -i test.ini -n 0 -g test.ngc 2>&1
exit "${PIPESTATUS[0]}"

View File

@@ -0,0 +1,3 @@
Exercise failed parameter passing to user-defined code
The required Q parameter is missing

View File

@@ -0,0 +1,17 @@
executing
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
4 N..... SET_XY_ROTATION(0.0000)
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
6 N..... ON_RESET()
user-defined M400: missing: P,Q
O <rm400> call
7 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
8 N..... SET_XY_ROTATION(0.0000)
9 N..... SET_FEED_MODE(0, 0)
10 N..... SET_FEED_RATE(0.0000)
11 N..... STOP_SPINDLE_TURNING(0)
12 N..... SET_SPINDLE_MODE(0 0.0000)
13 N..... PROGRAM_END()
14 N..... ON_RESET()

View File

@@ -0,0 +1,18 @@
o<rm400> sub
(debug, M400 call_level= #<_call_level> remap_level=#<_remap_level>)
o100 if [EXISTS[#<P>]]
(debug, P word set: #<P>)
o100 else
(debug, P word missing)
o100 endif
o120 if [EXISTS[#<Q>]]
(debug, Q word set: #<Q>)
o120 else
(debug, Q word missing)
o120 endif
o<rm400> endsub
m2
%

View File

@@ -0,0 +1,9 @@
[EMC]
DEBUG=0
LOG_LEVEL=0
[RS274NGC]
SUBROUTINE_PATH = .
# M405 requires P- Q- and does NOT permit any other words in this block
REMAP=M400 modalgroup=5 argspec=PQ ngc=rm400

View File

@@ -0,0 +1,2 @@
M400 R122.25
M2

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -i test.ini -n 0 -g test.ngc 2>&1
exit "${PIPESTATUS[0]}"

View File

@@ -0,0 +1 @@
Exercise failed remap NGC procedure - must properly return to top level

View File

@@ -0,0 +1,20 @@
executing
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
4 N..... SET_XY_ROTATION(0.0000)
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
6 N..... ON_RESET()
7 N..... MESSAGE(" before M400: call_level= 0.000000 remap_level=0.000000")
8 N..... MESSAGE(" in rm400: call_level= 1.000000 remap_level=1.000000")
Attempt to divide by zero
#100 = [1/0]
9 N..... MESSAGE(" after failed M400: call_level= 0.000000 remap_level=0.000000")
10 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
11 N..... SET_XY_ROTATION(0.0000)
12 N..... SET_FEED_MODE(0, 0)
13 N..... SET_FEED_RATE(0.0000)
14 N..... STOP_SPINDLE_TURNING(0)
15 N..... SET_SPINDLE_MODE(0 0.0000)
16 N..... PROGRAM_END()
17 N..... ON_RESET()

View File

@@ -0,0 +1,6 @@
o<rm400> sub
(debug, in rm400: call_level= #<_call_level> remap_level=#<_remap_level>)
#100 = [1/0]
o<rm400> endsub
m2
%

View File

@@ -0,0 +1,9 @@
[EMC]
DEBUG=0
LOG_LEVEL=0
[RS274NGC]
SUBROUTINE_PATH = .
REMAP=M400 modalgroup=5 ngc=rm400

View File

@@ -0,0 +1,4 @@
(debug, before M400: call_level= #<_call_level> remap_level=#<_remap_level>)
M400
(debug, after failed M400: call_level= #<_call_level> remap_level=#<_remap_level>)
M2

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -i test.ini -n 0 -g test.ngc 2>&1
exit "${PIPESTATUS[0]}"