Import LinuxCNC source tree

This commit is contained in:
Wang Dequan
2026-08-20 06:17:39 +08:00
commit 2c814634c3
9429 changed files with 10556013 additions and 0 deletions

View File

@@ -0,0 +1 @@
Test remap's ability to introspect about spindles.

View File

@@ -0,0 +1,35 @@
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()
M500 P0 {
active spindle: 0
spindle speeds: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
}
7 N..... SET_SPINDLE_SPEED(0, 1000.0000)
8 N..... START_SPINDLE_CLOCKWISE(0)
M500 P1 {
active spindle: 0
spindle speeds: [1000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
}
9 N..... SET_SPINDLE_SPEED(1, 2000.0000)
10 N..... START_SPINDLE_COUNTERCLOCKWISE(1)
M500 P2 {
active spindle: 0
spindle speeds: [1000.0, 2000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
}
11 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
12 N..... SET_XY_ROTATION(0.0000)
13 N..... SET_FEED_MODE(0, 0)
14 N..... SET_FEED_RATE(0.0000)
15 N..... STOP_SPINDLE_TURNING(0)
16 N..... SET_SPINDLE_MODE(0 0.0000)
17 N..... STOP_SPINDLE_TURNING(1)
18 N..... SET_SPINDLE_MODE(1 0.0000)
19 N..... STOP_SPINDLE_TURNING(2)
20 N..... SET_SPINDLE_MODE(2 0.0000)
21 N..... PROGRAM_END()
22 N..... ON_RESET()

View File

@@ -0,0 +1,7 @@
from __future__ import print_function
def m500(self, **words):
print("M500 P{} {{".format(int(words['p'])))
print(" active spindle: ", self.active_spindle)
print(" spindle speeds: ", list(self.speed))
print("}")

View File

@@ -0,0 +1,14 @@
[EMC]
DEBUG=0
[RS274NGC]
SUBROUTINE_PATH = .
LOG_LEVEL=0
REMAP= M500 py=m500 modalgroup=10 argspec=P
[TRAJ]
SPINDLES=3
[PYTHON]
PATH_PREPEND=.
TOPLEVEL=toplevel.py

View File

@@ -0,0 +1,13 @@
M500 P0
S1000
M3
M500 P1
S2000 $1
M4 $1
M500 P2
M2

3
tests/remap/spindle/test.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -i test.ini -n 0 -g test.ngc 2>&1
exit $?

View File

@@ -0,0 +1,2 @@
import interpreter
import remap