Import LinuxCNC source tree
This commit is contained in:
1
tests/m70-m73/m70m72-restore.0/README
Normal file
1
tests/m70-m73/m70m72-restore.0/README
Normal file
@@ -0,0 +1 @@
|
||||
Test for restoring G91 mode on oword sub return by M71
|
||||
40
tests/m70-m73/m70m72-restore.0/expected
Normal file
40
tests/m70-m73/m70m72-restore.0/expected
Normal file
@@ -0,0 +1,40 @@
|
||||
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..... COMMENT("Program to test M70 save/M72 restore context")
|
||||
N..... COMMENT("M. Haberler")
|
||||
N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("relative")
|
||||
N..... COMMENT("interpreter: distance mode changed to incremental")
|
||||
N..... STRAIGHT_TRAVERSE(10.0000, 10.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... STRAIGHT_TRAVERSE(20.0000, 20.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("save context")
|
||||
N..... COMMENT("absolute")
|
||||
N..... COMMENT("interpreter: distance mode changed to absolute")
|
||||
N..... STRAIGHT_TRAVERSE(5.0000, 20.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("restore context")
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... SET_SPINDLE_SPEED(0, 0.0000)
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000)
|
||||
N..... SET_NAIVECAM_TOLERANCE(0.0000)
|
||||
N..... COMMENT("interpreter: distance mode changed to incremental")
|
||||
N..... COMMENT("back in relative mode due to G72")
|
||||
N..... MESSAGE(" incremental=1.000000")
|
||||
N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("absolute")
|
||||
N..... COMMENT("interpreter: distance mode changed to absolute")
|
||||
N..... STRAIGHT_TRAVERSE(5.0000, 20.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("relative")
|
||||
N..... COMMENT("interpreter: distance mode changed to incremental")
|
||||
N..... STRAIGHT_TRAVERSE(15.0000, 30.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... STRAIGHT_TRAVERSE(25.0000, 40.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("absolute")
|
||||
N..... COMMENT("interpreter: distance mode changed to absolute")
|
||||
N..... STRAIGHT_TRAVERSE(5.0000, 20.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... MESSAGE(" incremental=0.000000")
|
||||
N..... FINISH()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
31
tests/m70-m73/m70m72-restore.0/test.ngc
Normal file
31
tests/m70-m73/m70m72-restore.0/test.ngc
Normal file
@@ -0,0 +1,31 @@
|
||||
%
|
||||
(Program to test M70 save/M72 restore context)
|
||||
(M. Haberler)
|
||||
|
||||
o1000 sub
|
||||
o1001 if [#1 GT 0]
|
||||
M70 (save context)
|
||||
o1001 endif
|
||||
G90 (absolute)
|
||||
G0 X5 Y20
|
||||
o1002 if [#1 GT 0]
|
||||
M72 (restore context)
|
||||
o1002 endif
|
||||
o1000 endsub
|
||||
|
||||
G90
|
||||
G53 G0 X0 Y0 Z0
|
||||
G91 (relative)
|
||||
g0 x10 y10
|
||||
g0 x10 y10
|
||||
o1000 call [1.0]
|
||||
(back in relative mode due to G72)
|
||||
(debug, incremental=#<_incremental>)
|
||||
g0 X-5 Y-20
|
||||
o1000 call [0.0]
|
||||
G91 (relative)
|
||||
g0 x10 y10
|
||||
g0 x10 y10
|
||||
o1000 call [0.0]
|
||||
(debug, incremental=#<_incremental>)
|
||||
%
|
||||
3
tests/m70-m73/m70m72-restore.0/test.sh
Normal file
3
tests/m70-m73/m70m72-restore.0/test.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
2
tests/m70-m73/m73-flood-mist-restore.0/README
Normal file
2
tests/m70-m73/m73-flood-mist-restore.0/README
Normal file
@@ -0,0 +1,2 @@
|
||||
test for restoring both M7 and M8 after being turned off in a sub
|
||||
with M73 autorestore set
|
||||
31
tests/m70-m73/m73-flood-mist-restore.0/expected
Normal file
31
tests/m70-m73/m73-flood-mist-restore.0/expected
Normal file
@@ -0,0 +1,31 @@
|
||||
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..... COMMENT("mist on")
|
||||
N..... MIST_ON()
|
||||
N..... COMMENT("flood on")
|
||||
N..... FLOOD_ON()
|
||||
N..... COMMENT("mist+flood off")
|
||||
N..... MIST_OFF()
|
||||
N..... FLOOD_OFF()
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... SET_SPINDLE_SPEED(0, 0.0000)
|
||||
N..... MIST_ON()
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000)
|
||||
N..... SET_NAIVECAM_TOLERANCE(0.0000)
|
||||
N..... FLOOD_ON()
|
||||
N..... COMMENT("mist+flood must be on again here since restored by M73:")
|
||||
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..... MIST_OFF()
|
||||
N..... FLOOD_OFF()
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
19
tests/m70-m73/m73-flood-mist-restore.0/test.ngc
Normal file
19
tests/m70-m73/m73-flood-mist-restore.0/test.ngc
Normal file
@@ -0,0 +1,19 @@
|
||||
;py,from interpreter import *
|
||||
|
||||
o1000 sub
|
||||
M73
|
||||
M9 (mist+flood off)
|
||||
o1000 endsub
|
||||
|
||||
|
||||
m7 (mist on)
|
||||
m8 (flood on)
|
||||
|
||||
o1000 call
|
||||
|
||||
(mist+flood must be on again here since restored by M73:)
|
||||
|
||||
;py,assert this.params["_mist"] == 1.0
|
||||
;py,assert this.params["_flood"] == 1.0
|
||||
|
||||
m2
|
||||
3
tests/m70-m73/m73-flood-mist-restore.0/test.sh
Normal file
3
tests/m70-m73/m73-flood-mist-restore.0/test.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
1
tests/m70-m73/m73autorestore.0/README
Normal file
1
tests/m70-m73/m73autorestore.0/README
Normal file
@@ -0,0 +1 @@
|
||||
Test for restoring G91 mode on oword sub return by M71
|
||||
50
tests/m70-m73/m73autorestore.0/expected
Normal file
50
tests/m70-m73/m73autorestore.0/expected
Normal file
@@ -0,0 +1,50 @@
|
||||
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..... COMMENT("Program to test M73 save context/auto-restore context on return")
|
||||
N..... COMMENT("M. Haberler")
|
||||
N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("relative")
|
||||
N..... COMMENT("interpreter: distance mode changed to incremental")
|
||||
N..... STRAIGHT_TRAVERSE(10.0000, 10.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... STRAIGHT_TRAVERSE(20.0000, 20.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("save context and auto-restore on return and endsub")
|
||||
N..... COMMENT("absolute")
|
||||
N..... COMMENT("interpreter: distance mode changed to absolute")
|
||||
N..... STRAIGHT_TRAVERSE(5.0000, 20.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... SET_SPINDLE_SPEED(0, 0.0000)
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000)
|
||||
N..... SET_NAIVECAM_TOLERANCE(0.0000)
|
||||
N..... COMMENT("interpreter: distance mode changed to incremental")
|
||||
N..... COMMENT("back in relative mode due to M73 restore-on-endsub")
|
||||
N..... MESSAGE(" incremental=1.000000")
|
||||
N..... COMMENT("save context and auto-restore on return and endsub")
|
||||
N..... COMMENT("absolute")
|
||||
N..... COMMENT("interpreter: distance mode changed to absolute")
|
||||
N..... STRAIGHT_TRAVERSE(5.0000, 20.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... SET_SPINDLE_SPEED(0, 0.0000)
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000)
|
||||
N..... SET_NAIVECAM_TOLERANCE(0.0000)
|
||||
N..... COMMENT("interpreter: distance mode changed to incremental")
|
||||
N..... COMMENT("back in relative mode due to M73 restore-on-return")
|
||||
N..... MESSAGE(" incremental=1.000000")
|
||||
N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("absolute")
|
||||
N..... COMMENT("interpreter: distance mode changed to absolute")
|
||||
N..... STRAIGHT_TRAVERSE(5.0000, 20.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("relative")
|
||||
N..... COMMENT("interpreter: distance mode changed to incremental")
|
||||
N..... STRAIGHT_TRAVERSE(15.0000, 30.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... STRAIGHT_TRAVERSE(25.0000, 40.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("absolute")
|
||||
N..... COMMENT("interpreter: distance mode changed to absolute")
|
||||
N..... STRAIGHT_TRAVERSE(5.0000, 20.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... MESSAGE(" incremental=0.000000")
|
||||
N..... FINISH()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
47
tests/m70-m73/m73autorestore.0/test.ngc
Normal file
47
tests/m70-m73/m73autorestore.0/test.ngc
Normal file
@@ -0,0 +1,47 @@
|
||||
%
|
||||
(Program to test M73 save context/auto-restore context on return)
|
||||
(M. Haberler)
|
||||
|
||||
o1000 sub
|
||||
|
||||
o1001 if [#1 GT 0]
|
||||
M73 (save context and auto-restore on return and endsub)
|
||||
o1001 endif
|
||||
|
||||
G90 (absolute)
|
||||
G0 X5 Y20
|
||||
|
||||
o1002 if [#2 EQ 1]
|
||||
o1002 return (trigger auto-restore on return)
|
||||
o1002 endif
|
||||
|
||||
o1005 if [#2 EQ 2]
|
||||
M72 (explicitly restore context of this frame)
|
||||
M71 (invalidate current frame)
|
||||
o1005 return (no triggering of auto-restore-on-return since frame now invalid)
|
||||
o1005 endif
|
||||
|
||||
o1000 endsub (trigger auto-restore on endsub if m73 issued and not invalidated)
|
||||
|
||||
G90
|
||||
G53 G0 X0 Y0 Z0
|
||||
G91 (relative)
|
||||
g0 x10 y10
|
||||
g0 x10 y10
|
||||
o1000 call [1.0] [0.0]
|
||||
(back in relative mode due to M73 restore-on-endsub)
|
||||
(debug, incremental=#<_incremental>)
|
||||
o1000 call [1.0] [1.0]
|
||||
(back in relative mode due to M73 restore-on-return)
|
||||
(debug, incremental=#<_incremental>)
|
||||
|
||||
g0 X-5 Y-20
|
||||
o1000 call [0.0] [0.0]
|
||||
G91 (relative)
|
||||
g0 x10 y10
|
||||
g0 x10 y10
|
||||
o1000 call [0.0] [0]
|
||||
|
||||
|
||||
(debug, incremental=#<_incremental>)
|
||||
%
|
||||
3
tests/m70-m73/m73autorestore.0/test.sh
Normal file
3
tests/m70-m73/m73autorestore.0/test.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
Reference in New Issue
Block a user