Skip to content

Commit a5c2aab

Browse files
authored
Merge pull request #1995 from smoe/docs_hal_vscode
docs: translation-motivated changes
2 parents 5b8dfb3 + 63f7662 commit a5c2aab

3 files changed

Lines changed: 64 additions & 62 deletions

File tree

docs/src/hal/intro.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,12 @@ does - that is determined by which functions are
320320
connected to it. The real distinction is simply how often a thread
321321
runs.
322322

323-
In LinuxCNC you might have a 50 µs thread and a 1 ms thread.
323+
In LinuxCNC you might have a 50 µs thread and a 1 ms thread.
324324
These would be created based on BASE_PERIOD and SERVO_PERIOD, the
325-
actual times depend on the values in your ini file.
325+
actual times depend on the values in your INI file.
326326

327327
The next step is to decide what each thread needs to do. Some of those
328-
decisions are the same in (nearly) any LinuxCNC system--For instance,
328+
decisions are the same in (nearly) any LinuxCNC system. For instance,
329329
motion-command-handler is always added to servo-thread.
330330

331331
Other connections would be made by the integrator. These might include

docs/src/hal/rtcomps.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -567,14 +567,14 @@ advanced tuning possibilities.
567567
* '(float) pid.<loopnum>.FF1' - First order feedforward - output
568568
proportional to derivative of command (velocity).
569569
* '(float) pid.<loopnum>.FF2' - Second order feedforward - output
570-
proportional to 2nd derivative
570+
proportional to 2^nd^ derivative
571571
of command (acceleration).
572572
* '(float) pid.<loopnum>.deadband' - Amount of error that will be ignored
573573
* '(float) pid.<loopnum>.maxerror' - Limit on error
574574
* '(float) pid.<loopnum>.maxerrorI' - Limit on error integrator
575575
* '(float) pid.<loopnum>.maxerrorD' - Limit on error derivative
576576
* '(float) pid.<loopnum>.maxcmdD' - Limit on command derivative
577-
* '(float) pid.<loopnum>.maxcmdDD' - Limit on command 2nd derivative
577+
* '(float) pid.<loopnum>.maxcmdDD' - Limit on command 2^nd^ derivative
578578
* '(float) pid.<loopnum>.maxoutput' - Limit on output value
579579

580580
All _max*_ limits are implemented so that if the value of this parameter
@@ -586,7 +586,7 @@ additional pins will be exported:
586586
* '(float) pid.<loopnum>.errorI' - Integral of error.
587587
* '(float) pid.<loopnum>.errorD' - Derivative of error.
588588
* '(float) pid.<loopnum>.commandD' - Derivative of the command.
589-
* '(float) pid.<loopnum>.commandDD' - 2nd derivative of the command.
589+
* '(float) pid.<loopnum>.commandDD' - 2^nd^ derivative of the command.
590590

591591
=== Functions
592592

@@ -743,8 +743,8 @@ halcmd: loadrt siggen [num_chan=<chans>]
743743
If 'numchan' is not specified, one signal generator will be installed.
744744
The maximum
745745
number of generators is 16 (as defined by MAX_CHAN in siggen.c). Each
746-
generator is completely independent. In the following descriptions,
747-
<chan>:: is the number of a specific signal generator (the numbers
746+
generator is completely independent. In the following descriptions is
747+
<chan>:: the number of a specific signal generator (the numbers
748748
start at 0).
749749

750750
.Unloading siggen

docs/src/hal/tools.adoc

Lines changed: 56 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
[[sec:halcmd]]
1414
== Halcmd
1515

16-
Halcmd is a command line tool for manipulating the HAL. There is a
17-
rather complete man page for link:../man/man1/halcmd.1.html[halcmd], which will be installed if you
18-
have installed LinuxCNC from either source or a package. The manpage
19-
provides usage info:
16+
Halcmd is a command line tool for manipulating the HAL.
17+
There is a rather complete man page for link:../man/man1/halcmd.1.html[halcmd], which will be installed if you have installed LinuxCNC from either source or a package.
18+
The manpage provides usage info:
2019

2120
----
2221
man halcmd
@@ -39,7 +38,7 @@ usage, and is a good tutorial for halcmd.
3938

4039
Halmeter is a 'voltmeter' for the HAL. It lets you look at a pin,
4140
signal, or parameter, and displays the current value of that item. It
42-
is pretty simple to use. Start it by typing *halmeter* in an X
41+
is pretty simple to use. Start it by typing `halmeter` in an X
4342
windows shell. Halmeter is a GUI application. It will pop up
4443
a small window, with two buttons labeled 'Select' and 'Exit'. Exit is
4544
easy - it shuts down the program. Select pops up a larger window, with
@@ -55,13 +54,11 @@ convenient if you want to look at a number of different items quickly.
5554

5655
You can have many halmeters running at the same time, if you want to
5756
monitor several items. If you want to launch a halmeter without tying
58-
up a shell window, type 'halmeter &' to run it in the background.
59-
You can also make halmeter start
60-
displaying a specific item immediately, by adding 'pin|sig|par[am]
61-
<name>' to the command line. It will display the pin, signal, or
62-
parameter
63-
<name> as soon as it starts. (If there is no such item, it will simply
64-
start normally.) And finally, if you specify an item to display, you
57+
up a shell window, type `halmeter &` to run it in the background.
58+
You can also make halmeter start displaying a specific item immediately, by adding 'pin|sig|par[am] <name>' to the command line.
59+
It will display the pin, signal, or parameter <name> as soon as it starts -
60+
if there is no such item, it will simply start normally.
61+
And finally, if you specify an item to display, you
6562
can add '-s' before the pin|sig|param to tell halmeter to use a small
6663
window. The item name will be displayed in the title bar instead of
6764
under the value, and there will be no buttons. Useful when you want a
@@ -82,7 +79,7 @@ For example:
8279
loadusr halmeter pin hm2.0.stepgen.00.velocity-fb -g 0 500
8380
----
8481

85-
See the man page for more options. See section <<sec:halmeter,Halmeter>>.
82+
See the man page for more options and the section <<sec:halmeter,Halmeter>>.
8683

8784
.Halmeter selection window
8885
image::images/hal-meter01.png["Halmeter selection window"]
@@ -95,10 +92,11 @@ image::images/hal-meter02.png["Halmeter watch window"]
9592
Halshow (<<cha:halshow,complete usage description>>)
9693
can be started from the command line to show details for selected
9794
components, pins, parameters, signals, functions, and threads of a running HAL.
98-
The WATCH tab provides a continuous display of selected pin, parameters, and
99-
signal items. The File menu provides buttons to 1) save the watch items to
100-
a watch list and to load and existing watch list. The watch list items can
101-
also be loaded automatically on startup. For command line usage:
95+
The WATCH tab provides a continuous display of selected pin, parameters, and signal items.
96+
The File menu provides buttons to 1) save the watch items to
97+
a watch list and to load and existing watch list.
98+
The watch list items can also be loaded automatically on startup.
99+
For command line usage:
102100

103101
----
104102
halshow --help
@@ -110,8 +108,8 @@ Usage:
110108
--iformat format_string_for_int
111109
112110
Notes:
113-
Create watchfile in halshow using: 'File/Save Watch List'
114-
linuxcnc must be running for standalone usage
111+
Create watchfile in halshow using: 'File/Save Watch List'.
112+
LinuxCNC must be running for standalone usage.
115113
----
116114

117115
LinuxCNC must be running for standalone usage.
@@ -180,14 +178,14 @@ writable pins, parameters or signals.
180178
--help (this text)
181179
--title title_string (window title, default: sim_pin)
182180
183-
Note: LinuxCNC (or a standalone Hal application) must be running
181+
Note: LinuxCNC (or a standalone HAL application) must be running
184182
A named item can specify a pin, param, or signal
185183
The item must be writable, e.g.:
186184
pin: IN or I/O (and not connected to a signal with a writer)
187185
param: RW
188186
signal: connected to a writable pin
189187
190-
Hal item types bit,s32,u32,float are supported
188+
HAL item types bit,s32,u32,float are supported
191189
192190
When a bit item is specified, a pushbutton is created
193191
to manage the item in one of three manners specified
@@ -219,7 +217,7 @@ image::images/sim_pin.png["sim_pin Window"]
219217

220218
== Simulate Probe
221219

222-
simulate_probe is a simple gui to simulate activation of the pin motion.probe-input.
220+
`simulate_probe` is a simple GUI to simulate activation of the pin motion.probe-input.
223221
Usage:
224222

225223
----
@@ -229,44 +227,47 @@ simulate_probe &
229227
.`simulate_probe` Window
230228
image::images/simulate_probe.png["simulate_probe Window"]
231229

232-
== Hal Histogram
230+
== HAL Histogram
233231

234-
hal-histogram is a command line utility to display histograms for hal pins.
232+
`hal-histogram` is a command line utility to display histograms for HAL pins.
235233

236234
.`hal-histogram` Usage
237-
----
238-
Usage:
235+
.Usage:
239236
hal-histogram --help | -?
240237
or
241238
hal-histogram [Options] [pinname]
242239

243-
Options:
244-
--minvalue minvalue (minimum bin, default: 0)
245-
--binsize binsize (binsize, default: 100)
246-
--nbins nbins (number of bins, default: 50)
247-
248-
--logscale 0|1 (y axis log scale, default: 1)
249-
--text note (text display, default: "" )
250-
--show (show count of undisplayed nbins, default off)
251-
--verbose (progress and debug, default off)
252-
253-
Notes:
254-
1) LinuxCNC (or another Hal application) must be running
255-
2) If no pinname is specified, default is: motion-command-handler.time
256-
3) This app may be opened for 5 pins
257-
4) pintypes float, s32, u32, bit are supported
258-
5) The pin must be associated with a thread supporting floating point
259-
For a base thread, this may require using:
260-
loadrt motmod ... base_thread_fp=1
261-
----
240+
.Options:
241+
[width="90%",options="header"]
242+
//[grid=false,frame=false]
243+
|===
244+
|Option |Value |Description
245+
|--minvalue|minvalue|minimum bin, default: 0
246+
|--binsize |binsize |binsize, default: 100
247+
|--nbins |nbins |number of bins, default: 50
248+
| | |
249+
|--logscale|0/1 |y axis log scale, default: 1
250+
|--text |note |text display, default: ""
251+
|--show | |show count of undisplayed nbins, default off
252+
|--verbose | |progress and debug, default off
253+
|===
254+
255+
.Notes:
256+
1. LinuxCNC (or another HAL application) must be running
257+
2. If no pinname is specified, default is: motion-command-handler.time
258+
3. This app may be opened for 5 pins
259+
4. pintypes float, s32, u32, bit are supported
260+
5. The pin must be associated with a thread supporting floating point
261+
For a base thread, this may require using
262+
`loadrt motmod ... base_thread_fp=1` .
262263

263264
.`hal-histogram` Window
264265
image::images/hal-histogram.png["hal-histogram Window"]
265266

266267
== Halreport
267268

268-
halreport is a command-line utility that generates a report about hal
269-
connections for a running LinuxCNC (or other hal) application. The
269+
`halreport` is a command-line utility that generates a report about HAL
270+
connections for a running LinuxCNC (or other HAL) application. The
270271
report shows all signal connections and flags potential problems.
271272
Information included:
272273

@@ -293,7 +294,7 @@ or
293294
----
294295

295296
To generate the report for every LinuxCNC startup, include halreport
296-
and an output filename as an [APPLICATIONS]APP entry in the ini file.
297+
and an output filename as an [APPLICATIONS]APP entry in the INI file.
297298

298299
.`halreport` Example
299300
[source,{ini}]
@@ -315,7 +316,7 @@ critical input pins that it connects to.
315316
For routine signal paths that handle switch inputs, user-space
316317
pins, etc., the addf-ordering is often not critical. Moreover,
317318
the timing of user-space pin value changes cannot be controlled
318-
or guaranteed at the intervals typically employed for hal threads.
319+
or guaranteed at the intervals typically employed for HAL threads.
319320

320321
Example report file excerpts showing a pid loop for a hostmot2
321322
stepgen operated in velocity mode on a trivkins machine with
@@ -340,8 +341,7 @@ SIG: motor-cmd-0
340341
(=hm2_7i92.0.stepgen.00.velocity-cmd)
341342
----
342343

343-
In the example above, the HALFILE uses halcmd aliases to simplify pin names
344-
for an hostmot2 fpga board with commands like:
344+
In the example above, the HALFILE uses halcmd aliases to simplify pin names for an hostmot2 FPGA board with commands like:
345345

346346
[source,{hal}]
347347
----
@@ -353,8 +353,10 @@ alias pin hm2_7i92.0.stepgen.00.position-fb h.00.position-fb
353353
Questionable component function detection may occur for
354354
355355
. unsupported (deprecated) components,
356-
. user-created components that use multiple functions or unconventional function naming, or
357-
. GUI-created userspace components that lack distinguishing characteristics such as a prefix based on the GUI program name.
356+
. user-created components that use multiple functions or
357+
unconventional function naming, or
358+
. GUI-created userspace components that lack distinguishing
359+
characteristics such as a prefix based on the GUI program name.
358360
359361
Questionable functions are tagged with a question mark "?".
360362
====
@@ -364,7 +366,7 @@ Component pins that cannot be associated with a known thread
364366
function report the function as "Unknown".
365367

366368
[NOTE]
367-
halreport generates a connections report for a running hal
369+
halreport generates a connections report for a running HAL
368370
application to aid in designing and verifying connections. Pin
369371
types and current values are not shown. For this information use
370372
applications like halshow, halmeter, halscope or the 'show'

0 commit comments

Comments
 (0)