@@ -122,12 +122,12 @@ halcmd: loadrt siggen
122122Now that the module is loaded, it is time to introduce 'halcmd' , the
123123command line tool used to configure the HAL. This tutorial will
124124introduce some halcmd features, for a more complete description try
125- 'man halcmd', or see the reference in <<sec:hal-commands,Hal Commands>>
125+ 'man halcmd', or see the reference in <<sec:hal-commands,HAL Commands>>
126126section of this document. The first
127127halcmd feature is the 'show' command. This command displays information
128128about the current state of the HAL. To show all installed components:
129129
130- .Show Components with `halrun`/`halcmd``
130+ .Show Components with `halrun`/`halcmd`
131131----
132132halcmd: show comp
133133
@@ -212,8 +212,8 @@ Owner CodeAddr Arg FP Users Name
212212
213213The siggen component exported a single function. It requires floating
214214point. It is not currently linked to any threads, so 'users' is
215- zero. footnote:[CodeAddr and Arg fields were used during development and
216- should probably disappear.]
215+ zero footnote:[CodeAddr and Arg fields were used during development and
216+ should probably disappear.].
217217
218218=== Making realtime code run
219219
@@ -834,7 +834,7 @@ halcmd: setp stepgen.0.enable 1
834834halcmd: setp stepgen.1.enable 1
835835----
836836
837- This velocity scaling means that when the pin ' stepgen.0.velocity-cmd'
837+ This velocity scaling means that when the pin ` stepgen.0.velocity-cmd``
838838is 1.0, the step generator will generate 10000 pulses per second
839839(10 kHz). With the motor and leadscrew described above, that will result
840840in the axis moving at exactly 1.0 inches per second. This illustrates
@@ -1031,40 +1031,35 @@ image::images/halscope-09.png["Waveforms with Triggering",align="center"]
10311031
10321032To look closely at part of a waveform, you can use the zoom slider at
10331033the top of the screen to expand the waveforms horizontally, and the
1034- position slider to determine which part of the zoomed waveform is
1035- visible. However, sometimes simply expanding the waveforms isn't enough
1036- and you need to increase the sampling rate. For example, we would like
1037- to look at the actual step pulses that are being generated in our
1038- example. Since the step pulses may be only 50 µs long, sampling at 1 kHz
1039- isn't fast enough. To change the sample rate, click on the button that
1040- displays the number of samples and sample rate to bring up the 'Select
1041- Sample Rate' dialog, figure . For this example, we will click on the
1042- 50 µs thread, 'fast', which gives us a sample rate of about 20 kHz. Now
1043- instead of displaying about 4 seconds worth of data, one record is 4000
1044- samples at 20 kHz, or about 0.20 seconds.
1034+ position slider to determine which part of the zoomed waveform is visible.
1035+ However, sometimes simply expanding the waveforms isn't enough and you need to increase the sampling rate.
1036+ For example, we would like to look at the actual step pulses that are being generated in our example.
1037+ Since the step pulses may be only 50 µs long, sampling at 1 kHz isn't fast enough.
1038+ To change the sample rate, click on the button that displays the number
1039+ of samples and sample rate to bring up the 'Select Sample Rate' dialog figure.
1040+ For this example, we will click on the 50 µs thread, 'fast', which gives us a sample rate of about 20 kHz.
1041+ Now instead of displaying about 4 seconds worth of data, one record is 4000 samples at 20 kHz, or about 0.20 seconds.
10451042
10461043[[fig:halscope-sample-rate-choice]]
10471044.Sample Rate Dialog
10481045image::images/halscope-10.png["Sample Rate Dialog",align="center"]
10491046
10501047=== More Channels
10511048
1052- Now let's look at the step pulses. Halscope has 16 channels, but for
1053- this example we are using only 4 at a time. Before we select any more
1054- channels, we need to turn off a couple. Click on the channel 2 button,
1055- then click the 'Chan Off' button at the bottom of the 'Vertical' box.
1049+ Now let's look at the step pulses.
1050+ Halscope has 16 channels, but for this example we are using only 4 at a time.
1051+ Before we select any more channels, we need to turn off a couple.
1052+ Click on the channel 2 button, then click the 'Chan Off' button at the bottom of the 'Vertical' box.
10561053Then click on channel 3, turn if off, and do the same for channel 4.
10571054Even though the channels are turned off, they still remember what they
1058- are connected to, and in fact we will continue to use channel 3 as the
1059- trigger source. To add new channels, select channel 5, and choose pin
1060- 'stepgen.0.dir', then channel 6, and select 'stepgen.0.step'. Then
1061- click run mode 'Normal' to start the scope, and adjust the horizontal
1062- zoom to 5 ms per division. You should see the step pulses slow down as
1063- the velocity command (channel 1) approaches zero, then the direction
1064- pin changes state and the step pulses speed up again. You might want to
1065- increase the gain on channel 1 to about 20 milli per division to better see
1066- the change in the velocity command. The result should look like the
1067- following figure.
1055+ are connected to, and in fact we will continue to use channel 3 as the trigger source.
1056+ To add new channels, select channel 5, and choose pin `stepgen.0.dir`, then channel 6, and select `stepgen.0.step`.
1057+ Then click run mode 'Normal' to start the scope, and adjust the horizontal zoom to 5 ms per division.
1058+ You should see the step pulses slow down as the velocity command (channel 1) approaches zero,
1059+ then the direction pin changes state and the step pulses speed up again.
1060+ You might want toincrease the gain on channel 1 to about 20 milli per division to better see
1061+ the change in the velocity command.
1062+ The result should look like the following figure.
10681063
10691064[[fig:halscope-step-pulses]]
10701065.Step Pulses
0 commit comments