forked from LinuxCNC/linuxcnc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A stripped down version of the problem in <LinuxCNC#2844>, code structure is copied from 'g71-endless-loop'. The test is marked as skipped, since it does not always terminates correctly.
- Loading branch information
1 parent
0f3bd00
commit 83acada
Showing
5 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("interpreter: feed mode set to units per revolution") | ||
N..... SET_FEED_MODE(0, 1) | ||
N..... SET_FEED_RATE(0.0000) | ||
N..... SELECT_PLANE(CANON_PLANE_XZ) | ||
N..... SET_SPINDLE_MODE(0 700.0000) | ||
N..... SET_SPINDLE_SPEED(0, 250.0000) | ||
N..... START_SPINDLE_CLOCKWISE(0) | ||
N..... SET_FEED_RATE(0.2400) | ||
N..... STRAIGHT_TRAVERSE(168.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) | ||
N..... STRAIGHT_TRAVERSE(168.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) | ||
N..... STRAIGHT_FEED(168.0000, 0.0000, -333.0000, 0.0000, 0.0000, 0.0000) | ||
N..... STRAIGHT_FEED(170.0000, 0.0000, -333.0000, 0.0000, 0.0000, 0.0000) | ||
N..... STRAIGHT_FEED(170.0000, 0.0000, -415.0000, 0.0000, 0.0000, 0.0000) | ||
N..... STRAIGHT_TRAVERSE(300.0000, 0.0000, 10.0000, 0.0000, 0.0000, 0.0000) | ||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) | ||
N..... SET_XY_ROTATION(0.0000) | ||
N..... SELECT_PLANE(CANON_PLANE_XY) | ||
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..... PALLET_SHUTTLE() | ||
N..... PROGRAM_END() | ||
N..... ON_RESET() | ||
N..... ON_RESET() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
G18G95 | ||
G96 M3 S250 D700 | ||
|
||
O2 SUB | ||
Z-333 | ||
G1 X170 | ||
Z-415 | ||
O2 ENDSUB | ||
G71 Q2 X168 Z0 F.24 | ||
|
||
G0 X300 Z10 | ||
M30 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
# | ||
# Demonstrate endless loop when an additinal segment is added in the G71 call. | ||
# This is a subset of a file that was supplied in | ||
# https://github.com/LinuxCNC/linuxcnc/issues/2844 and which worked up to and | ||
# including 2.9.1~pre1. It entered an endless loop after | ||
# https://github.com/LinuxCNC/linuxcnc/pull/2677 | ||
|
||
rs274 -g g71-endless-loop2.ngc | awk '{$1=""; print}' > result & | ||
pid=$! | ||
|
||
# Give it 5 seconds to complete | ||
count=5 | ||
while [ 0 -lt $count ] && kill -0 $pid > /dev/null 2>&1 ; do | ||
sleep 1 | ||
count=$(($count - 1)) | ||
done | ||
|
||
if kill -0 $pid > /dev/null 2>&1; then | ||
kill -9 $pid | ||
echo "error: g71-endless-loop2.ngc program seem to be stuck, killing" | ||
exit 1 | ||
fi | ||
|
||
exit 0 |
Empty file.