@@ -612,12 +612,12 @@ component. Each pwmgen instance has the following pins and parameters:
612612 a space.
613613 Each pulse (and space) in the PDM pulse train has a duration of
614614 1/pdm_frequency seconds.
615- For example, setting the pdm_frequency to 2*10^6^ (2 MHz) and the duty
615+ For example, setting the pdm_frequency to 2*10^6^ Hz (2 MHz) and the duty
616616 cycle to 50% results in a 1 MHz square wave, identical to a 1 MHz
617617 PWM signal with 50% duty cycle. The effective range of this parameter
618618 is from about 1525 Hz up to just under 100 MHz. Note that the max
619619 frequency is determined by the ClockHigh frequency of the Anything I/O
620- board; the 5i20 and 7i43 both have a 100 MHz clock, resulting in a
620+ board; the 5I20 and 7I43 both have a 100 MHz clock, resulting in a
621621 100 MHz max PDM frequency. Other boards may have different clocks,
622622 resulting in different max PDM frequencies. If the user attempts to
623623 set the frequency too high, it will be clipped to the max supported
@@ -633,107 +633,91 @@ component. Each pwmgen instance has the following pins and parameters:
633633 boards may have different clocks, resulting in different max PWM
634634 frequencies. If the user attempts to set the frequency too high, it
635635 will be clipped to the max supported frequency of the board.
636- Frequencies below about 5 Hz are not terribly accurate, but above 5 Hz
637- they're pretty close.
636+ Frequencies below about 5 Hz are not terribly accurate,
637+ but above 5 Hz they are pretty close.
638638
639639=== Output Parameters
640640
641641The output pins of each PWMGen have two additional parameters. To find
642- which I/O pin belongs to which output run ' dmesg' as described above.
642+ which I/O pin belongs to which output run ` dmesg` as described above.
643643
644- * 'invert_output' - (Bit, RW) This parameter only has an effect if the
645- 'is_output' parameter is true. If this parameter is true, the output
646- value of the GPIO will be the inverse of the value on the 'out' HAL
647- pin.
644+ * `invert_output` - (Bit, RW) This parameter only has an effect if the
645+ `is_output` parameter is true. If this parameter is true, the output
646+ value of the GPIO will be the inverse of the value on the `out` HAL pin.
648647
649- * ' is_opendrain' - (Bit, RW) If this parameter is false, the GPIO behaves
648+ * ` is_opendrain` - (Bit, RW) If this parameter is false, the GPIO behaves
650649 as a normal output pin: the I/O pin on the connector is driven to the
651- value specified by the ' out' HAL pin (possibly inverted).
650+ value specified by the ` out` HAL pin (possibly inverted).
652651 If this parameter is true, the GPIO behaves as an open-drain pin.
653- Writing 0 to the ' out' HAL pin drives the I/O pin low, writing 1 to
654- the ' out' HAL pin puts the I/O pin in a high-impedance state. In this
652+ Writing 0 to the ` out` HAL pin drives the I/O pin low, writing 1 to
653+ the ` out` HAL pin puts the I/O pin in a high-impedance state. In this
655654 high-impedance state the I/O pin floats (weakly pulled high), and other
656655 devices can drive the value; the resulting value on the I/O pin is
657- available on the 'in' and ' in_not' pins.
656+ available on the `in` and ` in_not` pins.
658657 Only full GPIO pins and I/O pins used as outputs by active module
659658 instances have this parameter.
660659
661660[[sec:hm2-encoder]]
662661== Encoder
663662
664663Encoders have names like
665- ' hm2_<BoardType>.<BoardNum>.encoder.<Instance>.'. 'Instance' is a
666- two-digit number that corresponds to the HostMot2 encoder instance
667- number. There are 'num_encoders' instances, starting with 00.
664+ ` hm2_<BoardType>.<BoardNum>.encoder.<Instance>.`.
665+ `Instance` is a two-digit number that corresponds to the HostMot2 encoder instance number.
666+ There are _num_encoders_ instances, starting with 00.
668667
669- Each encoder uses three or four input I/O pins, depending on how the
670- firmware was compiled. Three-pin encoders use A, B, and Index
671- (sometimes also known as Z). Four-pin encoders use A, B, Index, and
672- Index-mask.
668+ Each encoder uses three or four input I/O pins, depending on how the firmware was compiled.
669+ Three-pin encoders use A, B, and Index (sometimes also known as Z).
670+ Four-pin encoders use A, B, Index, and Index-mask.
673671
674672The hm2 encoder representation is similar to the one described by the
675673Canonical Device Interface (in the HAL General Reference document), and
676- to the software encoder component. Each encoder instance has the
677- following pins and parameters:
674+ to the software encoder component.
675+ Each encoder instance has the following pins and parameters:
678676
679677=== Pins
680678
681- * 'count' - (s32, Out) Number of encoder counts since the previous reset.
682-
683- * 'index-enable' - (Bit, I/O) When this pin is set to True, the count
684- (and therefore also
685- position) are reset to zero on the next Index (Phase-Z) pulse. At the
686- same time, index-enable is reset to zero to indicate that the pulse has
687- occurred.
688-
689- * 'position' - (Float, Out) Encoder position in position units
690- (count / scale).
691-
692- * 'rawcounts' - (s32, Out) Total number of encoder counts since the
693- start, not adjusted for index or reset.
694-
695- * 'reset' - (Bit, In) When this pin is TRUE, the count and position pins
696- are set to 0.
679+ * `count` - (s32, Out) Number of encoder counts since the previous reset.
680+ * `index-enable` - (Bit, I/O) When this pin is set to True,
681+ the count (and therefore also position) are reset to zero on the next Index (Phase-Z) pulse.
682+ At the same time, index-enable is reset to zero to indicate that the pulse has occurred.
683+ * `position` - (Float, Out) Encoder position in position units (count / scale).
684+ * `rawcounts` - (s32, Out) Total number of encoder counts since the start, not adjusted for index or reset.
685+ * `reset` - (Bit, In) When this pin is TRUE, the count and position pins are set to 0.
697686 The value of the velocity pin is not affected by this.
698- The driver does not reset this pin to FALSE after resetting the count
699- to 0, that is the user's job.
700-
701- * 'velocity' - (Float, Out) Estimated encoder velocity in position units
702- per second.
687+ The driver does not reset this pin to FALSE after resetting the count to 0, that is the user's job.
688+ * `velocity` - (Float, Out) Estimated encoder velocity in position units per second.
703689
704690=== Parameters
705691
706- * 'counter-mode' - (Bit, RW) Set to False (the default) for Quadrature.
707- Set to True for
708- Up/Down or for single input on Phase A. Can be used for a frequency to
709- velocity converter with a single input on Phase A when set to true.
692+ * `counter-mode` - (Bit, RW) Set to False (the default) for Quadrature.
693+ Set to True for Up/Down or for single input on Phase A.
694+ Can be used for a frequency to velocity converter with a single input on Phase A when set to true.
710695
711- * ' filter' - (Bit, RW) If set to True (the default), the quadrature
696+ * ` filter` - (Bit, RW) If set to True (the default), the quadrature
712697 counter needs 15 clocks to register a change on any of the three input
713698 lines (any pulse shorter than this is rejected as noise).
714- If set to False, the quadrature counter needs only 3 clocks to register
715- a change. The encoder sample clock runs at 33 MHz on the PCI Anything
716- I/O cards and 50 MHz on the 7i43.
699+ If set to False, the quadrature counter needs only 3 clocks to register a change.
700+ The encoder sample clock runs at 33 MHz on the PCI Anything I/O cards and 50 MHz on the 7I43.
717701
718- * ' index-invert' - (Bit, RW) If set to True, the rising edge of the
719- Index input pin triggers the Index event (if index-enable is True). If
720- set to False, the falling edge triggers.
702+ * ` index-invert` - (Bit, RW) If set to True, the rising edge of the
703+ Index input pin triggers the Index event (if index-enable is True).
704+ If set to False, the falling edge triggers.
721705
722- * ' index-mask' - (Bit, RW) If set to True, the Index input pin only has
706+ * ` index-mask` - (Bit, RW) If set to True, the Index input pin only has
723707 an effect if the Index-Mask input pin is True (or False, depending on
724- the index-mask-invert pin below).
708+ the ` index-mask-invert` pin below).
725709
726- * ' index-mask-invert' - (Bit, RW) If set to True, Index-Mask must be
710+ * ` index-mask-invert` - (Bit, RW) If set to True, Index-Mask must be
727711 False for Index to have an effect.
728- If set to False, the Index-Mask pin must be True.
712+ If set to False, the ` Index-Mask` pin must be True.
729713
730- * ' scale' - (Float, RW) Converts from 'count' units to 'position' units.
714+ * ` scale` - (Float, RW) Converts from 'count' units to 'position' units.
731715 A quadrature encoder will normally have 4 counts per pulse so a 100 PPR
732- encoder would be 400 counts per revolution. In ' .counter-mode' a 100
716+ encoder would be 400 counts per revolution. In ` .counter-mode` a 100
733717 PPR encoder would have 100 counts per revolution as it only uses the
734718 rising edge of A and direction is B.
735719
736- * ' vel-timeout' - (Float, RW) When the encoder is moving slower than one
720+ * ` vel-timeout` - (Float, RW) When the encoder is moving slower than one
737721 pulse for each time that the driver reads the count from the FPGA (in
738722 the hm2_read() function), the velocity is harder to estimate.
739723 The driver can wait several iterations for the next pulse to arrive,
@@ -743,23 +727,23 @@ following pins and parameters:
743727 reporting the encoder stopped.
744728 This parameter is in seconds.
745729
746- == 5i25 Configuration
730+ == 5I25 Configuration
747731
748732=== Firmware
749733
750- The 5i25 firmware comes preloaded for the daughter card it is purchased with.
734+ The 5I25 firmware comes preloaded for the daughter card it is purchased with.
751735So the `firmware=xxx.BIT` is not part of the hm2_pci configuration string when
752- using a 5i25 .
736+ using a 5I25 .
753737
754738=== Configuration
755739
756- Example configurations of the 5i25/7i76 and 5i25/7i77 cards are included in
740+ Example configurations of the 5I25/7I76 and 5I25/7I77 cards are included in
757741the <<sub:configuration-selector,Configuration Selector>>.
758742
759743If you like to roll your own configuration the following examples show how
760744to load the drivers in the HAL file.
761745
762- .5i25 + 7i76 Card
746+ .5I25 + 7I76 Card
763747[source,{hal}]
764748----
765749# load the generic driver
@@ -769,7 +753,7 @@ loadrt hostmot2
769753loadrt hm2_pci config="num_encoders=1 num_stepgens=5 sserial_port_0=0XXX"
770754----
771755
772- .5i25 + 7i77 Card
756+ .5I25 + 7I77 Card
773757[source,{hal}]
774758----
775759# load the generic driver
@@ -787,15 +771,14 @@ the Mesa manual for more information on the exact usage (typically in the sectio
787771called SOFTWARE PROCESS DATA MODES) or see the manual page of
788772link:../man/man9/sserial.9.html[SSERIAL(9)].
789773
790- === 7i77 Limits
774+ === 7I77 Limits
791775
792776The minlimit and maxlimit are bounds on the pin value (in this case the analog
793777out value) fullscalemax is the scale factor.
794778
795- These are by default set to the analog in or analog range (most likely in
796- volts).
779+ These are by default set to the analog in or analog range (most likely in Volts).
797780
798- So for example on the 7i77 +-10V analog outputs, the default values are:
781+ So for example on the 7I77 +-10 V analog outputs, the default values are:
799782
800783minlimit: -10 +
801784maxlimit: +10 +
@@ -809,7 +792,7 @@ maxlimit: +24 +
809792maxfullscale: 24 +
810793
811794If you wanted to scale the analog out of a channel to RPM for a 0 to 6000 RPM
812- spindle with 0-10V control you could set the limits like this:
795+ spindle with 0-10 V control you could set the limits like this:
813796
814797minlimit: 0 +
815798maxlimit: 6000 +
@@ -826,7 +809,7 @@ load. The examples are a good place to start and will save you time.
826809Just pick the proper example from the LinuxCNC Configuration Selector and
827810save a copy to your computer so you can edit it. To see the exact pins
828811and parameters that your configuration gave you, open the Show HAL
829- Configuration window from the Machine menu, or do ' dmesg' as outlined
812+ Configuration window from the Machine menu, or do ` dmesg` as outlined
830813above.
831814
832815// vim: set syntax=asciidoc:
0 commit comments