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
Copy file name to clipboardExpand all lines: docs/src/hal/haltcl.adoc
+3-3
Original file line number
Diff line number
Diff line change
@@ -108,8 +108,8 @@ Because INI files can repeat the same ITEM in the same SECTION multiple times, `
108
108
When there is just one value and it is a simple value (all values that are just letters and numbers without whitespace are in this group),
109
109
then it is possible to treat `$::SECTION(ITEM)` as though it is not a list.
110
110
111
-
When the value could contain special characters--quote characters, curly-brace characters, embedded whitespace, and other characters that have special meaning in Tcl.
112
-
It is necessary to distinguish between the list of values and the initial (and possibly only) value in the list.
111
+
When the value could contain special characters (quote characters, curly-brace characters, embedded whitespace, and other characters that have special meaning in Tcl)
112
+
then it is necessary to distinguish between the list of values and the initial (and possibly only) value in the list.
113
113
114
114
In Tcl, this is written `[lindex $::SECTION(ITEM) 0]`.
115
115
@@ -197,7 +197,7 @@ MAXACCEL = 10.0
197
197
STEPGEN_MAXACCEL = 10.5
198
198
----
199
199
200
-
With `haltcl`, you can use Tcl commands to do the computation and eliminate the STEPGEN_MAXACCEL INI file item altogether:
200
+
With `haltcl`, you can use Tcl commands to do the computation and eliminate the `STEPGEN_MAXACCEL` INI file item altogether:
Copy file name to clipboardExpand all lines: docs/src/hal/parallel-port.adoc
+25-24
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,7 @@ The config string represents the hexadecimal address of the port, optionally fol
80
80
The directions are _in_, _out_, or _x_, and determine the direction of the physical pins 2 to 9 of the D-Sub 25 connector.
81
81
If the direction is not specified, the data group will by default be configured as outputs. For example:
82
82
83
+
.Command to load the real-time module 'hal_partport' with the additional _<config-string>_ to specify the port at which the parallel-port card is expected.
83
84
[source,{hal}]
84
85
----
85
86
loadrt hal_parport cfg="0x278 0x378 in 0x20A0 out"
The Netmos cards are Plug-N-Play, and might change their settings depending on which slot you put them into,
192
-
so if you like to \'get under the hood' and re-arrange things, be sure to check these values before you start LinuxCNC.
193
+
so if you like to 'get under the hood' and re-arrange things, be sure to check these values before you start LinuxCNC.
193
194
194
195
== Pins
195
196
196
-
* 'parport.<p>.pin-<n>-out' (bit) Drives a physical output pin.
197
-
* 'parport.<p>.pin-<n>-in' (bit) Tracks a physical input pin.
198
-
* 'parport.<p>.pin-<n>-in-not' (bit) Tracks a physical input pin, but inverted.
197
+
* `parport.<p>.pin-`__<n>__`-out` (bit) Drives a physical output pin.
198
+
* `parport.<p>.pin-`__<n>__`-in` (bit) Tracks a physical input pin.
199
+
* `parport.<p>.pin-`__<n>__`-in-not` (bit) Tracks a physical input pin, but inverted.
199
200
200
-
For each pin, '<p>' is the port number, and '<n>' is the physical pin number in the 25 pin D-shell connector.
201
+
For each pin, _<p>_ is the port number, and '<n>' is the physical pin number in the 25 pin D-shell connector.
201
202
202
-
For each physical output pin, the driver creates a single HAL pin, for example: 'parport.0.pin-14-out'.
203
+
For each physical output pin, the driver creates a single HAL pin, for example: `parport.0.pin-14-out`.
203
204
204
-
For each physical input pin, the driver creates two HAL pins, for example: 'parport.0.pin-12-in' and 'parport.0.pin-12-in-not'.
205
+
For each physical input pin, the driver creates two HAL pins, for example: `parport.0.pin-12-in` and `parport.0.pin-12-in-not`.
205
206
206
-
The '-in' HAL pin is TRUE if the physical pin is high, and FALSE if the physical pin is low.
207
-
The '-in-not' HAL pin is inverted and is FALSE if the physical pin is high.
207
+
The `-in` HAL pin is TRUE if the physical pin is high, and FALSE if the physical pin is low.
208
+
The `-in-not` HAL pin is inverted and is FALSE if the physical pin is high.
208
209
209
210
== Parameters
210
211
211
-
* 'parport.<p>.pin-<n>-out-invert' (bit) Inverts an output pin.
212
-
* 'parport.<p>.pin-<n>-out-reset' (bit) (only for 'out' pins) TRUE if this pin should be reset when the '-reset' function is executed.
213
-
* parport.<p>.reset-time' (U32) The time (in nanoseconds) between a pin is set by 'write' and reset by the 'reset' function if it is enabled.
212
+
* `parport.`__<p>__`.pin-`__<n>__`-out-invert` (bit) Inverts an output pin.
213
+
* `parport.`__<p>__`.pin-`__<n>__`-out-reset` (bit) (only for `-out` pins) TRUE if this pin should be reset when the `-reset` function is executed.
214
+
* `parport.`__<p>__`.reset-time` (U32) The time (in nanoseconds) between a pin is set by `-write` and reset by the `-reset` function if it is enabled.
214
215
215
-
The '-invert' parameter determines whether an output pin is active high or active low.
216
-
If '-invert' is FALSE, setting the HAL '-out' pin TRUE drives the physical pin high, and FALSE drives it low.
217
-
If '-invert' is TRUE, then setting the HAL '-out' pin TRUE will drive the physical pin low.
216
+
The `-invert` parameter determines whether an output pin is active high or active low.
217
+
If `-invert` is FALSE, setting the HAL `-out` pin TRUE drives the physical pin high, and FALSE drives it low.
218
+
If `-invert` is TRUE, then setting the HAL `-out` pin TRUE will drive the physical pin low.
218
219
219
220
[[sub:parport-functions]]
220
221
== Functions
221
222
222
-
* 'parport.<p>.read' (funct) Reads physical input pins of port '<portnum>' and updates HAL '-in' and '-in-not' pins.
223
-
* 'parport.read-all' (funct) Reads physical input pins of all ports and updates HAL '-in' and '-in-not' pins.
224
-
* 'parport.<p>.write' (funct) Reads HAL '-out' pins of port '<p>' and updates that port's physical output pins.
225
-
* 'parport.write-all' (funct) Reads HAL '-out' pins of all ports and updates all physical output pins.
226
-
* 'parport.<p>.reset' (funct) Waits until 'reset-time' has elapsed since the associated 'write', then resets pins to values indicated by '-out-invert' and '-out-invert' settings.
227
-
'reset' must be later in the same thread as 'write.
228
-
'If '-reset' is TRUE, then the 'reset' function will set the pin to the value of '-out-invert'.
223
+
* `parport.`__<p>__`.read' (funct) Reads physical input pins of port number _<p>_ and updates HAL `-in` and `-in-not` pins.
224
+
* `parport.read-all` (funct) Reads physical input pins of all ports and updates HAL `-in` and `-in-not` pins.
225
+
* `parport.`__<p>__`.write` (funct) Reads HAL `-out` pins of port number _<p>_ and updates that port's physical output pins.
226
+
* `parport.write-all` (funct) Reads HAL `-out` pins of all ports and updates all physical output pins.
227
+
* `parport.`__<p>__`.reset` (funct) Waits until `reset-time` has elapsed since the associated `write`, then resets pins to values indicated by `-out-invert` and `-out-invert` settings.
228
+
`reset` must be later in the same thread as `write`.
229
+
If `-reset` is TRUE, then the `reset` function will set the pin to the value of `-out-invert`.
229
230
This can be used in conjunction with stepgen's 'doublefreq' to produce one step per period.
230
231
The <<sec:stepgen,stepgen stepspace>> for that pin must be set to 0 to enable doublefreq.
231
232
232
233
The individual functions are provided for situations where one port needs to be updated in a very fast thread, but other ports can be updated in a slower thread to save CPU time.
233
-
It is probably not a good idea to use both an '-all' function and an individual function at the same time.
234
+
It is probably not a good idea to use both an `-all` function and an individual function at the same time.
234
235
235
236
== Common problems
236
237
@@ -249,7 +250,7 @@ If the module loads but does not appear to function, then the port address is in
249
250
== Using DoubleStep
250
251
251
252
To setup DoubleStep on the parallel port you must add the function parport.n.reset after parport.n.write and configure stepspace to 0 and the reset time wanted.
252
-
So that step can be asserted on every period in HAL and then toggled off by parport after being asserted for time specified by parport.n.reset-time.
253
+
So that step can be asserted on every period in HAL and then toggled off by parport after being asserted for time specified by `parport.`__n__`.reset-time`.
0 commit comments