Skip to content

Commit 1343487

Browse files
committed
Multispindle: Docs Update
Signed-off-by: andy pugh <andy@bodgesoc.org>
1 parent 826232c commit 1343487

4 files changed

Lines changed: 85 additions & 40 deletions

File tree

docs/html/gcode.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@
5656
<TR><TD><A HREF="gcode/g-code.html#gcode:g5.1">G5.1</A><TD>I J<TD>Quadratic Spline</TR>
5757
<TR><TD><A HREF="gcode/g-code.html#gcode:g5.2-g5.3">G5.2</A><TD>P L<TD>NURBS</TR>
5858
<TR><TD><A HREF="gcode/g-code.html#gcode:g38">G38.2 - G38.5</A><TD><TD>Straight Probe</TR>
59-
<TR><TD><A HREF="gcode/g-code.html#gcode:g33">G33</A><TD>K<TD>Spindle Synchronized Motion</TR>
60-
<TR><TD><A HREF="gcode/g-code.html#gcode:g33.1">G33.1</A><TD>K<TD>Rigid Tapping</TR>
59+
<TR><TD><A HREF="gcode/g-code.html#gcode:g33">G33</A><TD>K ($)<TD>Spindle Synchronized Motion</TR>
60+
<TR><TD><A HREF="gcode/g-code.html#gcode:g33.1">G33.1</A><TD>K ($)<TD>Rigid Tapping</TR>
6161
<TR><TD><A HREF="gcode/g-code.html#gcode:g80">G80</A> <TD><TD>Cancel Canned Cycle</TR>
6262

6363
<TR><TH>Canned cycles<TD COLSPAN=2>(X Y Z or U V W apply to canned cycles, depending on active plane)</TR>
6464
<TR><TD><A HREF="gcode/g-code.html#gcode:g81">G81</A><TD>R L (P)<TD>Drilling Cycle</TR>
6565
<TR><TD><A HREF="gcode/g-code.html#gcode:g82">G82</A><TD>R L (P)<TD>Drilling Cycle, Dwell</TR>
6666
<TR><TD><A HREF="gcode/g-code.html#gcode:g83">G83</A><TD>R L Q<TD>Drilling Cycle, Peck</TR>
67-
<TR><TD><A HREF="gcode/g-code.html#gcode:g84">G84</A><TD>R L (P)<TD>Right-hand Tapping Cycle, Dwell</TR>
67+
<TR><TD><A HREF="gcode/g-code.html#gcode:g84">G84</A><TD>R L (P) ($)<TD>Right-hand Tapping Cycle, Dwell</TR>
6868
<TR><TD><A HREF="gcode/g-code.html#gcode:g73">G73</A><TD>R L Q<TD>Drilling Cycle, Chip Breaking</TR>
69-
<TR><TD><A HREF="gcode/g-code.html#gcode:g74">G74</A><TD>R L (P)<TD>Left-hand Tapping Cycle, Dwell</TR>
69+
<TR><TD><A HREF="gcode/g-code.html#gcode:g74">G74</A><TD>R L (P) ($)<TD>Left-hand Tapping Cycle, Dwell</TR>
7070
<TR><TD><A HREF="gcode/g-code.html#gcode:g85">G85</A><TD>R L (P)<TD>Boring Cycle, Feed Out</TR>
7171
<TR><TD><A HREF="gcode/g-code.html#gcode:g89">G89</A><TD>R L (P)<TD>Boring Cycle, Dwell, Feed Out</TR>
72-
<TR><TD><A HREF="gcode/g-code.html#gcode:g76">G76</A><TD>P Z I J R K Q H L E<TD>Threading Cycle</TR>
72+
<TR><TD><A HREF="gcode/g-code.html#gcode:g76">G76</A><TD>P Z I J R K Q H L E ($)<TD>Threading Cycle</TR>
7373

7474
<TR><TH COLSPAN=3>Distance Mode</TR>
7575
<TR><TD><A HREF="gcode/g-code.html#gcode:g90-g91">G90, G91</A><TD><TD>Distance Mode</TR>
@@ -78,12 +78,12 @@
7878
<TR><TD><A HREF="gcode/g-code.html#gcode:g8">G8</A><TD><TD>Lathe Radius Mode</TR>
7979

8080
<TR><TH COLSPAN=3>Feed Rate Mode </TR>
81-
<TR><TD><A HREF="gcode/g-code.html#gcode:g93-g94-g95">G93, G94, G95</A><TD><TD>Feed Rate Mode</TR>
81+
<TR><TD><A HREF="gcode/g-code.html#gcode:g93-g94-g95">G93, G94, G95</A><TD>S ($)<TD>Feed Rate Mode</TR>
8282

8383
<TR><TH COLSPAN=3>Spindle Control </TR>
84-
<TR><TD><A HREF="gcode/m-code.html#mcode:m3-m4-m5">M3, M4, M5</A><TD>S<TD>Spindle Control</TR>
85-
<TR><TD><A HREF="gcode/m-code.html#mcode:m19">M19</A><TD><TD>Orient Spindle</TR>
86-
<TR><TD><A HREF="gcode/g-code.html#gcode:g96-g97">G96, G97</A><TD> S D <TD>Spindle Control Mode</TR>
84+
<TR><TD><A HREF="gcode/m-code.html#mcode:m3-m4-m5">M3, M4, M5</A><TD>S ($)<TD>Spindle Control</TR>
85+
<TR><TD><A HREF="gcode/m-code.html#mcode:m19">M19</A><TD>R Q (P) ($)<TD>Orient Spindle</TR>
86+
<TR><TD><A HREF="gcode/g-code.html#gcode:g96-g97">G96, G97</A><TD> S D ($)<TD>Spindle Control Mode</TR>
8787

8888
<TR><TH COLSPAN=3>Coolant </TR>
8989
<TR><TD><A HREF="gcode/m-code.html#mcode:m7-m8-m9">M7, M8, M9</A><TD><TD>Coolant Control</TR>
@@ -119,11 +119,11 @@
119119

120120
<TR><TH COLSPAN=3>Other Modal Codes </TR>
121121
<TR><TD><A HREF="gcode/other-code.html#sec:set-feed-rate">F</A><TD><TD>Set Feed Rate</TR>
122-
<TR><TD><A HREF="gcode/other-code.html#sec:set-spindle-speed">S</A><TD><TD>Set Spindle Speed</TR>
122+
<TR><TD><A HREF="gcode/other-code.html#sec:set-spindle-speed">S</A><TD>($)<TD>Set Spindle Speed</TR>
123123
<TR><TD><A HREF="gcode/other-code.html#sec:select-tool">T</A><TD><TD>Select Tool</a>)</TR>
124124
<TR><TD><A HREF="gcode/m-code.html#mcode:m48-m49">M48, M49</A><TD><TD>Speed and Feed Override Control</TR>
125125
<TR><TD><A HREF="gcode/m-code.html#mcode:m50">M50</A><TD>P0 (off) or P1 (on)<TD>Feed Override Control</TR>
126-
<TR><TD><A HREF="gcode/m-code.html#mcode:m51">M51</A><TD>P0 (off) or P1 (on)<TD>Spindle Speed Override Control</TR>
126+
<TR><TD><A HREF="gcode/m-code.html#mcode:m51">M51</A><TD>P0 (off) or P1 (on) ($)<TD>Spindle Speed Override Control</TR>
127127
<TR><TD><A HREF="gcode/m-code.html#mcode:m52">M52</A><TD>P0 (off) or P1 (on)<TD>Adaptive Feed Control</TR>
128128
<TR><TD><A HREF="gcode/m-code.html#mcode:m53">M53</A><TD>P0 (off) or P1 (on)<TD>Feed Stop Control</TR>
129129
<TR><TD><A HREF="gcode/g-code.html#gcode:g54-g59.3">G54-G59.3</A><TD><TD>Select Coordinate System</TR>

docs/man/man9/motion.9

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
.SH NAME
99
motion \- accepts NML motion commands, interacts with HAL in realtime
1010
.SH SYNOPSIS
11-
\fBloadrt motmod [base_period_nsec=\fIperiod\fB] [base_thread_fp=\fI0 or 1\fB] [servo_period_nsec=\fIperiod\fB] [traj_period_nsec=\fIperiod\fB] [num_joints=\fI[1-9]\fB] [num_dio=\fI[1-64]\fB] [num_aio=\fI[1-64]\fB]\fR \fB[unlock_joints_mask=\fR\fIjointmask\fR\fB]\fR
11+
\fBloadrt motmod [base_period_nsec=\fIperiod\fB] [base_thread_fp=\fI0 or 1\fB] [servo_period_nsec=\fIperiod\fB] [traj_period_nsec=\fIperiod\fB] [num_joints=\fI[1-9]\fB] [num_dio=\fI[1-64]\fB] [num_aio=\fI[1-64]\fB]\fR [num_spindles=\fI[1-8]\fB]\fR \fB[unlock_joints_mask=\fR\fIjointmask\fR\fB]\fR
1212

1313
The maximum number of joints available is set by EMCMOT_MAX_JOINTS.
1414
The maximum number of digital inputs is set by EMCMOT_MAX_DIO.
1515
The maximum number of analog inputs is set by EMCMOT_MAX_AIO.
16+
The maximum number of spindles available is set by EMCMOT_MAX_SPINDLES
1617

1718
.SH DESCRIPTION
1819
By default, the base thread does not support floating point. Software stepping, software encoder counting, and software pwm do not use floating point. \fBbase_thread_fp\fR can be used to enable floating point in the base thread (for example for brushless DC motor control).

docs/src/gcode/g-code.txt

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ It is an error if :
942942
(((G33 Spindle Synchronized Motion)))
943943

944944
----
945-
G33 X- Y- Z- K-
945+
G33 X- Y- Z- K- $-
946946
----
947947
* 'K' - distance per revolution
948948

@@ -954,6 +954,10 @@ This command might be part of a program to produce a 16TPI thread.
954954
Another example in metric, 'G33 Z-15 K1.5' produces
955955
a movement of 15mm while the spindle rotates 10 times for a thread of 1.5mm.
956956

957+
The (optional) $ argument sets which spindle the motion is synchronised
958+
to (default is zero). For example G33 Z10 K1 $1 will move the spindle in
959+
synchrony with the spindle.N.revs HAL pin value.
960+
957961
Spindle-synchronized motion waits for the spindle index and spindle at speed
958962
pins, so multiple passes line up. 'G33' moves end at the programmed endpoint.
959963
G33 could be used to cut tapered threads or a fusee.
@@ -976,8 +980,11 @@ finishes accelerating to the proper speed, and can immediately begin
976980
cutting a good thread.
977981

978982
.HAL Connections
979-
The pins 'spindle.N.at-speed' and the 'encoder.n.phase-Z' for the
980-
spindle must be connected in your HAL file before G33 will work.
983+
The pin 'spindle.N.at-speed' must be set or driven true for the motion to
984+
start. Additionally spindle.N.revs must increase by 1 for each revolution
985+
of the spindle and the spindle.N.index-enable pin must be connected to
986+
an encoder (or resolver) counter which resets index-enable once per rev.
987+
981988
See the Integrators Manual for more information on spindle synchronized motion.
982989

983990
.G33 Example
@@ -1004,10 +1011,11 @@ It is an error if:
10041011
(((G33.1 Rigid Tapping)))
10051012

10061013
----------------
1007-
G33.1 X- Y- Z- K- I-
1014+
G33.1 X- Y- Z- K- I- $-
10081015
----------------
10091016
* 'K' - distance per revolution
10101017
* 'I' - optional spindle speed multiplier for faster return move
1018+
* '$' - optional spindle selector
10111019

10121020
[WARNING]
10131021
For Z only tapping preposition the XY location prior to calling G33.1 and only
@@ -1023,8 +1031,8 @@ for each revolution of the spindle.
10231031
A rigid tapping move consists of the following sequence:
10241032

10251033
. A move from the current coordinate to the specified coordinate, synchronized
1026-
with the spindle at the given ratio and starting from the current coordinate
1027-
with a spindle index pulse.
1034+
with the selected spindle at the given ratio and starting from the
1035+
current coordinate with a spindle index pulse.
10281036
. When reaching the endpoint, a command to reverse the spindle, and speed up
10291037
by a factor set by the multiplier (e.g., from clockwise to counterclockwise).
10301038
. Continued synchronized motion beyond the specified end coordinate
@@ -1496,7 +1504,7 @@ It is an error if:
14961504
(((G74 Left-hand Tapping Cycle Dwell)))
14971505

14981506
----
1499-
G74 (X- Y- Z-) or (U- V- W-) R- L- P-
1507+
G74 (X- Y- Z-) or (U- V- W-) R- L- P- $-
15001508
----
15011509

15021510
The 'G74' cycle is intended for tapping with floating chuck and dwell at the bottom of the hole.
@@ -1508,7 +1516,7 @@ The 'G74' cycle is intended for tapping with floating chuck and dwell at the bot
15081516

15091517
3. Move the Z-axis at the current feed rate to the Z position.
15101518

1511-
4. Stop Spindle.
1519+
4. Stop the selected spindle (chosen by the $ parameter)
15121520

15131521
5. Start spindle rotation clockwise.
15141522

@@ -1526,7 +1534,7 @@ In example S100 F125 gives pitch of 1.25MM per revolution.
15261534
(((G76 Threading Cycle)))
15271535

15281536
----
1529-
G76 P- Z- I- J- R- K- Q- H- E- L-
1537+
G76 P- Z- I- J- R- K- Q- H- E- L- $-
15301538
----
15311539

15321540
.G76 Threading
@@ -1558,6 +1566,11 @@ threading cut will be 'K' beyond the 'thread peak' position.
15581566

15591567
Optional settings
15601568

1569+
* '$-' - The spindle number to which the motion will be synchronised
1570+
(default 0). For example is $1 is programmed then the motion will begin
1571+
on the reset od spindle.1.index-enable and proceed in synchrony with the
1572+
value of spindle.1.revs
1573+
15611574
* 'R-' - The 'depth degression'. 'R1.0' selects constant depth on successive
15621575
threading passes. 'R2.0' selects constant area. Values between 1.0 and
15631576
2.0 select decreasing
@@ -2094,7 +2107,7 @@ It is an error if:
20942107
(((G84 Right-hand Tapping Cycle Dwell)))
20952108

20962109
----
2097-
G84 (X- Y- Z-) or (U- V- W-) R- L- P-
2110+
G84 (X- Y- Z-) or (U- V- W-) R- L- P- $-
20982111
----
20992112

21002113
The 'G84' cycle is intended for tapping with floating chuck and dwell at the bottom of the hole.
@@ -2106,7 +2119,7 @@ The 'G84' cycle is intended for tapping with floating chuck and dwell at the bot
21062119

21072120
3. Move the Z-axis at the current feed rate to the Z position.
21082121

2109-
4. Stop spindle
2122+
4. Stop the seleted spindle (chosen by the $ parameter)
21102123

21112124
5. Start spindle rotation counterclockwise.
21122125

@@ -2143,7 +2156,7 @@ for drilling or milling.
21432156
(((G86 Boring, Spindle Stop, Rapid Move Out)))
21442157

21452158
----
2146-
G86 (X- Y- Z-) or (U- V- W-) R- L- P-
2159+
G86 (X- Y- Z-) or (U- V- W-) R- L- P- $-
21472160
----
21482161

21492162
The 'G86' cycle is intended for boring. This cycle uses a P number
@@ -2154,7 +2167,7 @@ for the number of seconds to dwell.
21542167
. Move the Z-axis only at the current <<sec:set-feed-rate,feed rate>> to the Z
21552168
position.
21562169
. Dwell for the P number of seconds.
2157-
. Stop the spindle turning.
2170+
. Stop the selected spindle turning. (Chosen by the $ parameter)
21582171
. The Z-axis does a <<gcode:g0,rapid move>> to clear Z.
21592172
. Restart the spindle in the direction it was going.
21602173

@@ -2340,7 +2353,8 @@ controlled point should move a certain number of inches per revolution
23402353
of the spindle, depending on what length units are being used and which
23412354
axis or axes are moving. G95 is not suitable for threading, for
23422355
threading use G33 or G76.
2343-
G95 requires that spindle.N.speed-in to be connected.
2356+
G95 requires that spindle.N.speed-in to be connected. The actual spindle
2357+
to which the feed is synchronised is chosen by the $ parameter
23442358

23452359
It is an error if:
23462360

@@ -2353,22 +2367,26 @@ It is an error if:
23532367
(((G96, G97 Spindle Control Mode)))
23542368

23552369
----
2356-
G96 <D-> S- (Constant Surface Speed Mode)
2357-
G97 (RPM Mode)
2370+
G96 <D-> S- <$-> (Constant Surface Speed Mode)
2371+
G97 S- <$-> (RPM Mode)
23582372
----
23592373

23602374
* 'D' - maximum spindle RPM
23612375
* 'S' - surface speed
2376+
* '$" - the spindle of which the speed will be varied.
23622377

23632378
* 'G96 D- S-' - selects constant surface speed of 'S' feet per minute
23642379
(if G20 is in effect) or meters per minute
23652380
(if G21 is in effect). D- is optional.
23662381
+
23672382
When using G96, ensure that X0 in
23682383
the current coordinate system (including offsets and tool lengths) is
2369-
the center of rotation or LinuxCNC will not give the desired spindle speed.
2384+
the center of rotation or LinuxCNC will not give the desired ssurface speed.
23702385
G96 is not affected by radius or diameter mode.
23712386

2387+
To achieve CSS mode on selected spindles programme successive G96 commands
2388+
for each spindle prior to issuing M3.
2389+
23722390
* 'G97' selects RPM mode.
23732391

23742392
.G96 Example Line

docs/src/gcode/m-code.txt

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,30 @@ Using % to wrap the G code does not do the same thing as a 'Program End'. See
104104
== M3, M4, M5 Spindle Control
105105
(((M3, M4, M5 Spindle Control)))
106106

107-
* 'M3' - start the spindle clockwise at the 'S' speed.
108-
* 'M4' - start the spindle counterclockwise at the 'S' speed.
109-
* 'M5' - stop the spindle.
107+
* 'M3' - start the selected spindle clockwise at the 'S' speed.
108+
* 'M4' - start the selected spindle counterclockwise at the 'S' speed.
109+
* 'M5' - stop the selected spindle.
110+
111+
Use $ to operate on specific spindles. If $ is omitted then thr commands
112+
operate on all spindles.
113+
114+
For example
115+
[source,{ngc}]
116+
---
117+
S100 $0
118+
S200 $1
119+
S300 $2
120+
M3
121+
----
122+
Will start all three spindles simultaneously at different speeds
123+
[source,{ngc]]
124+
----
125+
M4 $1
126+
----
127+
Will then reverse spindle 1 but leave the other spindles rotating forwards.
128+
129+
If the $ is omitted then behaviour is exactly as normal for a single
130+
spindle machine
110131
111132
It is OK to use 'M3' or 'M4' if the <<sec:set-spindle-speed,S>>
112133
spindle speed is set to zero. If this is done
@@ -180,7 +201,7 @@ state.
180201
== M19 Orient Spindle
181202
(((M19 Orient Spindle)))
182203
183-
* 'M19 R- Q- [P-]'
204+
* 'M19 R- Q- [P-] [$-]'
184205
185206
* 'R' Position to rotate to from 0, valid range is 0-360 degrees
186207
@@ -193,6 +214,8 @@ state.
193214
** '1' always rotate clockwise (same as M3 direction)
194215
** '2' always rotate counterclockwise (same as M4 direction)
195216
217+
* '$' The spindle to orient (actually only determines which HAL pins
218+
carry the spindle position commands)
196219
197220
M19 is cleared by any of M3,M4,M5.
198221
@@ -238,6 +261,9 @@ Spindle orient complete pin. Cleared by any of M3,M4,M5.
238261
* 'M48' - enable the spindle speed and feed rate override controls.
239262
* 'M49' - disable both controls.
240263
264+
These commands also take an optional $ parameter to determine which
265+
spindle they operate on.
266+
241267
It is OK to enable or disable the controls when
242268
they are already enabled or disabled.
243269
See the <<sub:feed-rate,Feed Rate>> Section for more details.
@@ -258,13 +284,13 @@ and the motion will be executed at programmed feed rate.
258284
== M51 Spindle Speed Override Control
259285
(((M51 Spindle Speed Override)))
260286
261-
* 'M51 <P1>' - enable the spindle speed override control. The P1
262-
is optional.
263-
* 'M51 P0' - disable the spindle speed override control program.
264-
While disabled the spindle speed override will have
265-
no influence, and the spindle speed will have the
266-
exact program specified value of the S-word
267-
(described in <<sec:set-spindle-speed,Spindle Speed>> Section).
287+
* 'M51 <P1> <$->'- enable the spindle speed override control for the
288+
selected spindle. The P1 is optional.
289+
* 'M51 P0 <$->' - disable the spindle speed override control program.
290+
While disabled the spindle speed override will have
291+
no influence, and the spindle speed will have the
292+
exact program specified value of the S-word
293+
(described in <<sec:set-spindle-speed,Spindle Speed>> Section).
268294
269295
[[mcode:m52]]
270296
== M52 Adaptive Feed Control

0 commit comments

Comments
 (0)