You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The preferred way to set up a standard stepper machine is with the Step Configuration Wizard.
16
+
See the <<cha:stepconf-wizard,Stepper Configuration Wizard>> Chapter.
18
17
19
-
This chapter describes some of the more common settings for manually
20
-
setting up a stepper based system. These systems are using stepper motors
21
-
with drives that accept step & direction signals.
18
+
This chapter describes some of the more common settings for manually setting up a stepper based system.
19
+
These systems are using stepper motors with drives that accept step & direction signals.
22
20
23
-
It is one of the simpler setups, because the motors run open-loop (no
24
-
feedback comes back from the motors), yet the system needs to be
25
-
configured properly so the motors don't stall or lose steps.
21
+
It is one of the simpler setups, because the motors run open-loop (no feedback comes back from the motors),
22
+
yet the system needs to be configured properly so the motors don't stall or lose steps.
26
23
27
-
Most of this chapter is based on a sample config released along with
28
-
LinuxCNC. The config is called stepper_inch, and can be found by running the
29
-
<<cha:running-emc,Configuration Picker>>.
24
+
Most of this chapter is based on a sample config released along with LinuxCNC.
25
+
The config is called stepper_inch, and can be found by running the <<cha:running-emc,Configuration Picker>>.
30
26
31
27
== Maximum step rate
32
28
33
-
With software step generation, the maximum step rate is one step per
34
-
two BASE_PERIODs for step-and-direction output. The maximum requested
35
-
step rate is the product of an axis' MAX_VELOCITY and its INPUT_SCALE.
36
-
If the requested step rate is not attainable, following errors will
37
-
occur, particularly during fast jogs and G0 moves.
29
+
With software step generation, the maximum step rate is one step per two BASE_PERIODs for step-and-direction output.
30
+
The maximum requested step rate is the product of an axis' MAX_VELOCITY and its INPUT_SCALE.
31
+
If the requested step rate is not attainable, following errors will occur, particularly during fast jogs and G0 moves.
38
32
39
33
If your stepper driver can accept quadrature input, use this mode.
40
-
With a quadrature signal, one step is possible for each BASE_PERIOD,
41
-
doubling the maximum step rate.
34
+
With a quadrature signal, one step is possible for each BASE_PERIOD, doubling the maximum step rate.
42
35
43
-
The other remedies are to decrease one or more of: the BASE_PERIOD
44
-
(setting this too low will cause the machine to become unresponsive or
45
-
even lock up), the INPUT_SCALE (if you can select different step sizes
46
-
on your stepper driver, change pulley ratios, or leadscrew pitch), or
47
-
the MAX_VELOCITY and STEPGEN_MAXVEL.
36
+
The other remedies are to decrease one or more of: the BASE_PERIOD (setting this too low will cause the machine to become unresponsive or even lock up),
37
+
the INPUT_SCALE (if you can select different step sizes on your stepper driver, change pulley ratios, or leadscrew pitch), or the MAX_VELOCITY and STEPGEN_MAXVEL.
48
38
49
-
If no valid combination of BASE_PERIOD, INPUT_SCALE, and MAX_VELOCITY
50
-
is acceptable, then consider using hardware step generation (such as
51
-
with the LinuxCNC-supported Universal Stepper Controller, Mesa cards, and
52
-
others).
39
+
If no valid combination of BASE_PERIOD, INPUT_SCALE, and MAX_VELOCITY is acceptable,
40
+
then consider using hardware step generation (such as with the LinuxCNC-supported Universal Stepper Controller, Mesa cards, and others).
53
41
54
42
== Pinout
55
43
56
-
One of the major flaws in LinuxCNC was that you couldn't specify the pinout
57
-
without recompiling the source code. LinuxCNC is far more flexible, and now
58
-
(thanks to the Hardware Abstraction Layer) you can easily specify which
59
-
signal goes where. See the <<cha:basic-hal-reference,HAL Basics>>
60
-
for more information on HAL.
44
+
One of the major flaws in LinuxCNC was that you couldn't specify the pinout without recompiling the source code.
45
+
LinuxCNC is far more flexible, and now (thanks to the Hardware Abstraction Layer) you can easily specify which signal goes where.
46
+
See the <<cha:basic-hal-reference,HAL Basics>> for more information on HAL.
61
47
62
-
As it is described in the HAL Introduction and tutorial, we have
63
-
signals, pins and parameters inside the HAL.
48
+
As it is described in the HAL Introduction and tutorial, we have signals, pins and parameters inside the HAL.
64
49
65
50
[NOTE]
66
51
We are presenting one axis to keep it short, all others are similar.
@@ -72,10 +57,9 @@ signals: Xstep, Xdir & Xen
72
57
pins: parport.0.pin-XX-out & parport.0.pin-XX-in
73
58
----
74
59
75
-
Depending on what you have chosen in your INI file you are using
76
-
either standard_pinout.hal or xylotex_pinout.hal. These are two files
77
-
that instruct the HAL how to link the various signals & pins. Further
78
-
on we'll investigate the standard_pinout.hal.
60
+
Depending on what you have chosen in your INI file you are using either standard_pinout.hal or xylotex_pinout.hal.
61
+
These are two files that instruct the HAL how to link the various signals & pins.
62
+
Further on we'll investigate the standard_pinout.hal.
79
63
80
64
=== Standard Pinout HAL
81
65
@@ -163,31 +147,25 @@ net spindle-on spindle.0.on => parport.0.pin-09-out
163
147
164
148
----
165
149
166
-
The lines starting with '#' are comments, and their only purpose is to
167
-
guide the reader through the file.
150
+
The lines starting with '#' are comments, and their only purpose is to guide the reader through the file.
168
151
169
152
=== Overview
170
153
171
-
There are a couple of operations that get executed when the
172
-
standard_pinout.hal gets executed/interpreted:
154
+
There are a couple of operations that get executed when the standard_pinout.hal gets executed/interpreted:
173
155
174
156
* The Parport driver gets loaded (see the <<cha:parport,Parport Chapter>> for details).
175
157
* The read & write functions of the parport driver get assigned to the
176
-
base thread footnote:[the fastest thread in the LinuxCNC setup, usually ther
177
-
code gets executed every few tens of microseconds.].
178
-
* The step & direction signals for axes X, Y, Z get linked to pins on the
179
-
parport.
158
+
base thread footnote:[The fastest thread in the LinuxCNC setup, usually the code gets executed every few tens of microseconds.].
159
+
* The step & direction signals for axes X, Y, Z get linked to pins on the parport.
180
160
* Further I/O signals get connected (estop loopback, toolchanger loopback).
181
161
* A spindle-on signal gets defined and linked to a parport pin.
182
162
183
163
=== Changing the standard_pinout.hal
184
164
185
-
If you want to change the standard_pinout.hal file, all you need is a
186
-
text editor. Open the file and locate the parts you want to change.
165
+
If you want to change the standard_pinout.hal file, all you need is a text editor.
166
+
Open the file and locate the parts you want to change.
187
167
188
-
If you want for example to change the pin for the X-axis Step &
189
-
Directions signals, all you need to do is to change the number in the
190
-
'parport.0.pin-XX-out' name:
168
+
If you want for example to change the pin for the X-axis Step & Directions signals, all you need to do is to change the number in the 'parport.0.pin-XX-out' name:
191
169
192
170
[source,{hal}]
193
171
----
@@ -205,14 +183,12 @@ net Xdir parport.0.pin-03-out
205
183
206
184
or basically any other 'out' pin you like.
207
185
208
-
Hint: make sure you don't have more than one signal connected to the
209
-
same pin.
186
+
Hint: make sure you don't have more than one signal connected to the same pin.
210
187
211
188
=== Changing polarity of a signal
212
189
213
-
If external hardware expects an "active low" signal, set the
214
-
corresponding '-invert' parameter. For instance, to invert the spindle
215
-
control signal:
190
+
If external hardware expects an "active low" signal, set the corresponding '-invert' parameter.
191
+
For instance, to invert the spindle control signal:
If your spindle can be controlled by a PWM signal, use the 'pwmgen'
225
-
component to create the signal:
200
+
If your spindle can be controlled by a PWM signal, use the 'pwmgen' component to create the signal:
226
201
227
202
[source,{hal}]
228
203
----
@@ -236,15 +211,13 @@ setp pwmgen.0.scale 1800 # Change to your spindle's top speed in RPM
236
211
----
237
212
238
213
This assumes that the spindle controller's response to PWM is simple:
239
-
0% PWM gives 0 RPM, 10% PWM gives 180 RPM, etc. If there is a minimum
240
-
PWM required to get the spindle to turn, follow the example in the
241
-
'nist-lathe' sample configuration to use a 'scale' component.
214
+
0% PWM gives 0 RPM, 10% PWM gives 180 RPM, etc.
215
+
If there is a minimum PWM required to get the spindle to turn, follow the example in the 'nist-lathe' sample configuration to use a 'scale' component.
242
216
243
217
=== Adding an enable signal
244
218
245
-
Some amplifiers (drives) require an enable signal before they accept
246
-
and command movement of the motors. For this reason there are already
247
-
defined signals called 'Xen', 'Yen', 'Zen'.
219
+
Some amplifiers (drives) require an enable signal before they accept and command movement of the motors.
220
+
For this reason there are already defined signals called 'Xen', 'Yen', 'Zen'.
248
221
249
222
To connect them use the following example:
250
223
@@ -253,15 +226,12 @@ To connect them use the following example:
253
226
net Xen parport.0.pin-08-out
254
227
----
255
228
256
-
You can either have one single pin that enables all drives; or
257
-
several, depending on the setup you have. Note, however, that usually
258
-
when one axis faults, all the other drives will be disabled as well, so
259
-
having only one enable signal / pin for all drives is a common
260
-
practice.
229
+
You can either have one single pin that enables all drives; or several, depending on the setup you have.
230
+
Note, however, that usually when one axis faults, all the other drives will be disabled as well, so having only one enable signal / pin for all drives is a common practice.
261
231
262
232
=== External ESTOP button
263
233
264
-
The standard_pinout.hal file assumes no external ESTOP button. For more
265
-
information on an external E-Stop see the estop_latch man page.
234
+
The standard_pinout.hal file assumes no external ESTOP button.
235
+
For more information on an external E-Stop see the estop_latch man page.
0 commit comments