diff --git a/docs/src/drivers/gm.adoc b/docs/src/drivers/gm.adoc index abc75a918a8..03e622d629e 100644 --- a/docs/src/drivers/gm.adoc +++ b/docs/src/drivers/gm.adoc @@ -180,9 +180,9 @@ m| .reset | (bool, In) | When True, resets counts and positio m| .rawcounts | (sint, Out) | The raw count is the counts, but unaffected by reset or the index pulse. m| .counts | (sint, Out) | Position in encoder counts. m| .position | (real, Out) | Position in scaled units (=.counts/.position-scale). -m| .index-enabled | (bool, IO) | +m| .index-enable | (bool, IO) | When True, counts and position are rounded or reset (depends on index-mode) on next rising edge of channel-I. -Every time position is reset because of Index, the `index-enabled` pin is set to 0 and remains 0 until connected HAL pin does not set it. +Every time position is reset because of Index, the `index-enable` pin is set to 0 and remains 0 until connected HAL pin does not set it. m| .velocity | (real, Out) | Velocity in scaled units per second. GM encoder uses high frequency hardware timer to measure time between encoder pulses in order to calculate velocity. @@ -204,7 +204,7 @@ are rounded (based on .counts-per-rev) at rising edge of channel-I. This is useful to correct few pulses error caused by noise. In round mode, it is essential to set .counts-per-rev parameter correctly. When .index-mode is False and .index-enabled is true, .counts and .position are reset at channel-I pulse. -m| .counts-per-rev | (sint, R/V) | +m| .counts-per-rev | (uint, R/W) | Determine how many counts are between two index pulses. It is used only in round mode, so when both .index-enabled and .index-mode parameters are True. GM encoder process encoder signal in 4x mode, so for example in case of a 500 CPR encoder it should be set to 2000. @@ -316,7 +316,7 @@ setp gm.0.stepgen.0.maxaccel 0 # do not set max acceleration for # step generator, let interpolator control it. setp gm.0.stepgen.0.position-scale 1000 # 1000 step/position unit setp gm.0.stepgen.0.steplen 1000 # 1000 ns = 1 µs -setp gm.0.stepgen.0.stepspace1000 # 1000 ns = 1 µs +setp gm.0.stepgen.0.stepspace 1000 # 1000 ns = 1 µs setp gm.0.stepgen.0.dirdelay 2000 # 2000 ns = 2 µs ---- @@ -386,7 +386,7 @@ m| .value | (real, In) | Value of DAC output in Volts. m| .offset | (real, R/W) | Offset is added to the value before the hardware is updated. m| .high-limit | (real, R/W) | Maximum output voltage of the hardware in Volts. m| .low-limit | (real, R/W) | Minimum output voltage of the hardware in Volts. -m| .invert-serial | (real, R/W) | +m| .invert-serial | (bool, R/W) | GM6-PCI card is communicating with DAC hardware via fast serial communication to highly reduce time delay compared to PWM. DAC module is recommended to be isolated which is negating serial communication line. In case of isolation, leave this parameter to default (0), while in case of none-isolation, set this parameter to 1. @@ -414,7 +414,7 @@ gm..can-gm. ---- where __ is from 0 to 5. -For example, `gm.0.can-gm.0.position` refers to the output position of axis 0 in position units. +For example, `gm.0.can-gm.0.position-fb` refers to the feedback position of axis 0 in position units. HAL pins are updated by function: @@ -430,7 +430,7 @@ gm..write | Pins | Type and direction | Pin description m| .enable | (bool, In) | Enable sending position references. m| .position-cmd | (real, In) | Commanded position in position units. -m| .position-fb | (real, In) | Feed back position in position units. +m| .position-fb | (real, Out) | Feed back position in position units. |=== === Parameters @@ -471,7 +471,7 @@ m| gm.__.watchdog-enable | (bool, R/W) | Enables watchdog timer. + It is strongly recommended to enable the watchdog timer, because it can disable all the servo amplifiers by pulling down all enable signals in case of a PC error. -m| gm.__.watchdog-timeout-ns | (real, R/W) | +m| gm.__.watchdog-timeout-ns | (uint, R/W) | Time interval in within the gm.__.read function must be executed. The gm.__.read is typically added to servo-thread, so watch timeout is typically set to 3 times of the servo period. @@ -498,11 +498,11 @@ image::images/GM_ENDSWpinout.png["Pin numbering of homing and end switch connect The GM6-PCI motion control card has two limit- and one homing switch input for each joint. All the names of these pins begin as follows: ---- -gm..joint. +gm..axis. ---- where __ is from 0 to 5. -For example, `gm.0.joint.0.home-sw-in` indicates the state of the axis 0 home switch. +For example, `gm.0.axis.0.home-sw-in` indicates the state of the axis 0 home switch. HAL pins are updated by function: @@ -524,12 +524,10 @@ m| .pos-lim-sw-in | (bool, Out) | Positive limit switch input m| .pos-lim-sw-in-not | (bool, Out) | Negated positive limit switch input |=== -=== Parameters - -.E-stop switch parameters +.E-stop switch pins [width="80%",options="header",cols="<3,^2,<6"] |=== -| Parameters | Type and direction | Parameter description +| Pins | Type and direction | Pin description m| gm.0.estop.0.in | (bool, Out) | Estop 0 input m| gm.0.estop.0.in-not | (bool, Out) | Negated Estop 0 input m| gm.0.estop.1.in | (bool, Out) | Estop 1 input @@ -645,7 +643,7 @@ where __ is from 00 to 15. [width="80%",options="header",cols="<3,^2,<6"] |=== | Pins | Type and direction | Pin description -m| .relay-<0-7> | (bool, Out) | Output pin for relay +m| .relay-<0-7> | (bool, In) | Output pin for relay |=== .Relay output module parameters @@ -657,7 +655,7 @@ m| .invert-relay-<0-7> | (bool, R/W) | Negate relay output pin .HAL example ---- - gm.0.rs485.0.relay-0 # First relay of the node. + gm.0.rs485.00.relay-0 # First relay of the node. # gm.0 # Identifies the first GM6-PCI motion control card (PCI card address = 0) # .rs485.0 # Selects node with address 0 on the RS485 bus # .relay-0 # Selects the first relay @@ -693,7 +691,7 @@ m| .in-not-_<0-7>_ | (bool, Out) | Negated input pin .HAL example ---- - gm.0.rs485.0.in-0 # First input of the node. + gm.0.rs485.00.in-0 # First input of the node. # gm.0 # Identifies the first GM6-PCI motion control card (PCI card address = 0) # .rs485.0 # Selects node with address 0 on the RS485 bus # .in-0 # Selects the first digital input module @@ -744,7 +742,7 @@ m| .dac-low-limit-_<0-3>_ | (real, R/W) | Minimum output voltage of the h .HAL example ---- - gm.0.rs485.0.adc-0 # First analogue channel of the node. + gm.0.rs485.00.adc-0 # First analogue channel of the node. # gm.0 # Identifies the first GM6-PCI motion control card (PCI card address = 0) # .rs485.0 # Selects node with address 0 on the RS485 bus # .adc-0 # Selects the first analogue input of the module @@ -798,7 +796,7 @@ m| .enc-position-scale | (real, R/W) | Scale in per length unit. .HAL example ---- - gm.0.rs485.0.adc-0 # First analogue channel of the node. + gm.0.rs485.00.adc-0 # First analogue channel of the node. # gm.0 # Identifies the first GM6-PCI motion control card (PCI card address = 0) # .rs485.0 # Selects node with address 0 on the RS485 bus # .adc-0 # Selects the first analogue input of the module diff --git a/docs/src/drivers/mb2hal.adoc b/docs/src/drivers/mb2hal.adoc index 64b35042666..34b5b29723b 100644 --- a/docs/src/drivers/mb2hal.adoc +++ b/docs/src/drivers/mb2hal.adoc @@ -188,39 +188,39 @@ _n_ = Element number (`NELEMENTS`) or name from `PIN_NAMES` Example: * `mb2hal.00.01.int` (TRANSACTION_00, second register) -* `mb2hal.readStatus.01.bit` (HAL_TX_NAME=readStatus, first bit) +* `mb2hal.readStatus.00.bit` (HAL_TX_NAME=readStatus, first bit) ==== === [yellow-background]#fnct_01_read_coils# -* [yellow-background]#mb2hal.__m__.__n__.bit# _bit out_ -* [yellow-background]#mb2hal.__m__.__n__.bit-inv# _bit out_ +* [yellow-background]#mb2hal.__m__.__n__.bit# _bool out_ +* [yellow-background]#mb2hal.__m__.__n__.bit-inv# _bool out_ === fnct_02_read_discrete_inputs -* mb2hal.__m__.__n__.[yellow-background]#bit# _bit out_ -* [yellow-background]#mb2hal.__m__.__n__.bit-inv# _bit out_ +* mb2hal.__m__.__n__.[yellow-background]#bit# _bool out_ +* [yellow-background]#mb2hal.__m__.__n__.bit-inv# _bool out_ === fnct_03_read_holding_registers -* mb2hal.__m__.__n__.float _float out_ -* mb2hal.__m__.__n__.int _s32 out_ +* mb2hal.__m__.__n__.float _real out_ +* mb2hal.__m__.__n__.int _sint out_ === fnct_04_read_input_registers -* mb2hal.__m__.__n__.float _float out_ -* mb2hal.__m__.__n__.int _s32 out_ +* mb2hal.__m__.__n__.float _real out_ +* mb2hal.__m__.__n__.int _sint out_ === [yellow-background]#fnct_05_write_single_coil# -* [yellow-background]#mb2hal.__m__.__n__.bit# _bit in_ +* [yellow-background]#mb2hal.__m__.__n__.bit# _bool in_ `NELEMENTS` needs to be 1 or `PIN_NAMES` must contain just one name. === fnct_06_write_single_register -* mb2hal.__m__.__n__.[yellow-background]#float# _float in_ -* [yellow-background]#mb2hal.__m__.__n__.int# _s32 in_ +* mb2hal.__m__.__n__.[yellow-background]#float# _real in_ +* [yellow-background]#mb2hal.__m__.__n__.int# _sint in_ `NELEMENTS` needs to be 1 or `PIN_NAMES` must contain just one name. Both pin values are added and limited to 65535 (UINT16_MAX). @@ -228,12 +228,12 @@ Use one and let the other open (read as 0). === fnct_15_write_multiple_coils -* mb2hal.__m__.__n__.[yellow-background]#bit# _bit in_ +* mb2hal.__m__.__n__.[yellow-background]#bit# _bool in_ === fnct_16_write_multiple_registers -* mb2hal.__m__.__n__.[yellow-background]#float# _float in_ -* [yellow-background]#mb2hal.__m__.__n__.int# _s32 in_ +* mb2hal.__m__.__n__.[yellow-background]#float# _real in_ +* [yellow-background]#mb2hal.__m__.__n__.int# _sint in_ Both pin values are added and limited to 65535 (UINT16_MAX). Use one and let the other open (read as 0). diff --git a/docs/src/drivers/mitsub-vfd.adoc b/docs/src/drivers/mitsub-vfd.adoc index 15b9d5366dc..af97d0dbf18 100644 --- a/docs/src/drivers/mitsub-vfd.adoc +++ b/docs/src/drivers/mitsub-vfd.adoc @@ -88,7 +88,7 @@ Where is +mitsub_vfd+ or the name given during loading. * '.estop' (bool, in) puts the VFD into emergency-stopped status. - * '.status-bit-N' (bool, out) + * '.stat-bit-N' (bool, out) N = 0 to 7, status bits are user configurable on the VFD. Bit 3 should be set to at speed and bit 7 should be set to alarm. Others are free to be set as required. diff --git a/docs/src/drivers/pico-ppmc.adoc b/docs/src/drivers/pico-ppmc.adoc index d2ee9dd4874..e71c30c5b74 100644 --- a/docs/src/drivers/pico-ppmc.adoc +++ b/docs/src/drivers/pico-ppmc.adoc @@ -127,7 +127,7 @@ board to have a sufficient revision level to support the feature. bidirectional HAL signal. Setting it to true causes the encoder hardware to reset the count to zero on the next encoder index pulse. The driver will detect this and set the signal back to false. -* '(PPMC real output) ppmc..DAC..value' - sends a +* '(PPMC real input) ppmc..DAC..value' - sends a signed value to the 16-bit Digital to Analog Converter on the PPMC DAC16 board commanding the analog output voltage of that DAC channel. * '(UPC bool input) ppmc..pwm..enable' - Enables a PWM generator. @@ -151,7 +151,7 @@ board to have a sufficient revision level to support the feature. state of digital input pin, see canonical digital input. * '(All bool input) ppmc..dout..out' - Value to be written to digital output, see canonical digital output. -* '(Option real input) ppmc..DAC8-.value' - Value to +* '(Option real input) ppmc..DAC8..value' - Value to be written to analog output, range from 0 to 255. This sends 8 output bits to J8, which should have a Spindle DAC board connected to it. 0 corresponds to zero Volts, 255 corresponds to 10 @@ -193,15 +193,15 @@ board to have a sufficient revision level to support the feature. PWM generator will generate a short sequence of pulses of both polarities when E-stop goes false, to reset the shutdown latches on some PWM servo drives. -* '(USC uint) ppmc..stepgen..setup-time' - Sets +* '(USC uint) ppmc..stepgen..setup-time-ns' - Sets minimum time between direction change and step pulse, in units of 100 ns. Applies to a group of four consecutive step generators, as indicated by ''. Values between 200 ns and 25.5 µs can be specified. -* '(USC uint) ppmc..stepgen..pulse-width' - Sets +* '(USC uint) ppmc..stepgen..pulse-width-ns' - Sets width of step pulses, in units of 100 ns. Applies to a group of four consecutive step generators, as indicated by ''. Values between 200 ns and 25.5 µs may be specified. -* '(USC uint) ppmc..stepgen..pulse-space-min' - Sets +* '(USC uint) ppmc..stepgen..pulse-space-min-ns' - Sets minimum time between pulses, in units of 100 ns. Applies to a group of four consecutive step generators, as indicated by ''. Values between 200 ns and 25.5 µs can be specified. @@ -213,7 +213,7 @@ board to have a sufficient revision level to support the feature. * '(USC real) ppmc..stepgen..max-vel' - The maximum value for 'velocity'. Commands greater than 'max-vel' will be clamped. Also applies to negative values. (The absolute value is clamped.) -* '(USC real) ppmc..stepgen..frequency' - Actual +* '(USC real) ppmc..stepgen..freq' - Actual step pulse frequency in Hz (used mostly for troubleshooting.) * '(Option real) ppmc..DAC8..scale' - Sets scale of extra DAC output such that an output value equal to diff --git a/docs/src/drivers/pmx485.adoc b/docs/src/drivers/pmx485.adoc index bd7cb6a78aa..e14a06c8f53 100644 --- a/docs/src/drivers/pmx485.adoc +++ b/docs/src/drivers/pmx485.adoc @@ -43,11 +43,11 @@ To communicate with a Powermax, the component must first be enabled via the *enable* pin and it may then initiate a request to the Powermax by writing a valid string to the following pins: -* *mode-set* -* *current-set* -* *pressure-set* +* *mode_set* +* *current_set* +* *pressure_set* -NOTE: A *pressure-set* value of zero is valid, the Powermax will then +NOTE: A *pressure_set* value of zero is valid, the Powermax will then calculate the required pressure internally. Communications may be validated from the Powermax display or the *status* @@ -56,8 +56,8 @@ as needed. To terminate the communications, do one of the following: -* Set all set pins to zero: *mode-set*, *current-set*, and - *pressure-set*. +* Set all set pins to zero: *mode_set*, *current_set*, and + *pressure_set*. * Disconnect the Powermax power supply from its power source for approximately 30 seconds. When you power the system back ON, it will no longer be in remote mode. diff --git a/docs/src/drivers/vfs11.adoc b/docs/src/drivers/vfs11.adoc index 241800a512d..6160a9f9394 100644 --- a/docs/src/drivers/vfs11.adoc +++ b/docs/src/drivers/vfs11.adoc @@ -89,8 +89,8 @@ Where is +vfs11_vfd+ or the name given during loading with the -n option. from the VFD * '.output-voltage-percentage' (real, out) from the VFD -* '.output-voltage' (real, out) - from the VFD +* '.frequency-limit' (real, out) + upper limit read from VFD setup. * '.speed-command' (real, in) speed sent to VFD in RPM. It is an error to send a speed faster than the Motor Max RPM as set in the VFD * '.spindle-fwd' (bool, in) @@ -119,8 +119,6 @@ Where is +vfs11_vfd+ or the name given during loading with the -n option. Where is +vfs11_vfd+ or the name given during loading with the -n option. -* '.frequency-limit' (real, RO) - upper limit read from VFD setup. * '.loop-time' (real, RW) how often the Modbus is polled (default interval 0.1 seconds) * '.nameplate-HZ' (real, RW) diff --git a/docs/src/hal/halmodule.adoc b/docs/src/hal/halmodule.adoc index 05e34c7701d..91d64a1411d 100644 --- a/docs/src/hal/halmodule.adoc +++ b/docs/src/hal/halmodule.adoc @@ -89,7 +89,7 @@ The arguments are: pin name suffix, pin type, and pin direction. For parameters, the arguments are: parameter name suffix, parameter type, and parameter direction. .HAL Option Names -[width="100%",cols="<3s,7*<"] +[width="100%",cols="<3s,5*<"] |=== |Pin and Parameter Types:|`hal.Type.BOOL`|`hal.Type.REAL`|`hal.Type.SINT`|`hal.Type.UINT`|`hal.Type.PORT` |Pin Directions: |`hal.Dir.IN` |`hal.Dir.OUT` |`hal.Dir.IO` | | diff --git a/docs/src/hal/rtcomps.adoc b/docs/src/hal/rtcomps.adoc index 7ab2193146d..b8aa03117af 100644 --- a/docs/src/hal/rtcomps.adoc +++ b/docs/src/hal/rtcomps.adoc @@ -47,8 +47,8 @@ halcmd: loadrt stepgen step_type=0,0,2 ctrl_type=p,p,v Will install three step generators. The first two use step type '0' (step and direction) and run in position mode. The last one uses step type '2' (quadrature) and runs in velocity mode. -The default value for '' is '0,0,0' which will install three type '0' (step/dir) generators. -The maximum number of step generators is 8 (as defined by MAX_CHAN in stepgen.c). +There is no default value for ''; at least one step type must be given or loading fails. +The maximum number of step generators is 16 (as defined by MAX_CHAN in stepgen.c). Each generator is independent, but all are updated by the same function(s) at the same time. In the following descriptions, __ is the number of a specific generator. The first generator is number 0. @@ -72,11 +72,11 @@ On the step type and control type selected. * (bool) `stepgen.`____`.dir` - Direction output (step type 0 only). * (bool) `stepgen.`____`.up` - UP pseudo-PWM output (step type 1 only). * (bool) `stepgen.`____`.down` - DOWN pseudo-PWM output (step type 1 only). -* (bool) `stepgen.`____`.phase-A` - Phase A output (step types 2-14 only). -* (bool) `stepgen.`____`.phase-B` - Phase B output (step types 2-14 only). -* (bool) `stepgen.`____`.phase-C` - Phase C output (step types 3-14 only). -* (bool) `stepgen.`____`.phase-D` - Phase D output (step types 5-14 only). -* (bool) `stepgen.`____`.phase-E` - Phase E output (step types 11-14 only). +* (bool) `stepgen.`____`.phase-A` - Phase A output (step types 2-15 only). +* (bool) `stepgen.`____`.phase-B` - Phase B output (step types 2-15 only). +* (bool) `stepgen.`____`.phase-C` - Phase C output (step types 3-15 only). +* (bool) `stepgen.`____`.phase-D` - Phase D output (step types 5-15 only). +* (bool) `stepgen.`____`.phase-E` - Phase E output (step types 11-15 only). [[sec:stepgen-parameters]] === Parameters @@ -88,12 +88,12 @@ On the step type and control type selected. * (real) `stepgen.`____`.maxaccel` - Maximum accel/decel rate, in positions units per second squared. If 0.0, has no effect. * (real) `stepgen.`____`.frequency` - The current step rate, in steps per second. -* (uint) `stepgen.`____`.steplen` - Length of a step pulse (step type 0 and 1) or minimum time in a given state (step types 2-14), in nano-seconds. +* (uint) `stepgen.`____`.steplen` - Length of a step pulse (step type 0 and 1) or minimum time in a given state (step types 2-15), in nano-seconds. * (uint) `stepgen.`____`.stepspace` - Minimum spacing between two step pulses (step types 0 and 1 only), in nano-seconds. Set to 0 to enable the stepgen 'doublefreq' function. To use 'doublefreq' the <> must be enabled. * (uint) `stepgen.`____`.dirsetup` - Minimum time from a direction change to the beginning of the next step pulse (step type 0 only), in nanoseconds. * (uint) `stepgen.`____`.dirhold` - Minimum time from the end of a step pulse to a direction change (step type 0 only), in nanoseconds. -* (uint) `stepgen.`____`.dirdelay` - Minimum time any step to a step in the opposite direction (step types 1-14 only), in nano-seconds. +* (uint) `stepgen.`____`.dirdelay` - Minimum time any step to a step in the opposite direction (step types 1-15 only), in nano-seconds. * (sint) `stepgen.`____`.rawcounts` - The raw feedback count, updated by 'make_pulses()'. In position mode, the values of maxvel and maxaccel are used by the internal position loop to avoid generating step pulse trains that the motor cannot follow. @@ -108,7 +108,7 @@ As in position mode, proper values for these parameters ensure that the motor ca === Step Types (((HAL stepgen Step Types))) -Step generator supports 15 different _step sequences_: +Step generator supports 16 different _step sequences_ (types 0 to 15): .Step Type 0 Step type 0 is the standard step and direction type. @@ -136,13 +136,14 @@ If _maxfreq_ is set higher than the limit it will be lowered. If _maxfreq_ is zero, it will remain zero but the output frequency will still be limited. [WARNING] -Do not use the parport reset function with step types 2 - 14. +Do not use the parport reset function with step types 2 - 15. Unexpected results can happen. -.Step Type 2 - 14 -Step types 2 through 14 are state based, and have from two to five outputs. +.Step Type 2 - 15 +Step types 2 through 15 are state based, and have from two to five outputs. On each step, a state counter is incremented or decremented. The Two-and-Three-Phase, Four-Phase, and Five-Phase show the output patterns as a function of the state counter. +Step type 15 has no built-in pattern; its sequence is defined with the `user_step_type` module parameter (up to 18 state values, one per phase state). The maximum frequency is 1,000,000,000 divided by _steplen_, and as in the other modes, _maxfreq_ will be lowered if it is above the limit. (((Two and Three Phase))) @@ -245,19 +246,24 @@ Each PWM generator will also have some of these pins, depending on the output ty * (bool) `pwmgen.`____`.up` - PWM/PDM output for positive input value (output type 2 only). * (bool) `pwmgen.`____`.down` - PWM/PDM output for negative input value (output type 2 only). -=== Parameters +Each PWM generator also has these pins: -* (real) `pwmgen.`____`.scale` - Scaling factor to convert `value` from arbitrary units to duty cycle. +* (real io) `pwmgen.`____`.scale` - Scaling factor to convert `value` from arbitrary units to duty cycle. For example if scale is set to 4000 and the input value passed to the `pwmgen.`____`.value` is 4000 then it will be 100% duty-cycle (always on). If the value is 2000 then it will be a 50% 25 Hz square wave. -* (real) `pwmgen.`____`.pwm-freq` - Desired PWM frequency, in Hz. - If 0.0, generates PDM instead of PWM. If set higher than internal limits, next call of 'update_freq()' will set it to the internal limit. - If non-zero, and 'dither' is false, next call of 'update_freq()' will set it to the nearest integer multiple of the 'make_pulses()' function period. -* (bool) `pwmgen.`____`.dither-pwm` - If true, enables dithering to achieve average PWM frequencies or duty cycles that are unobtainable with pure PWM. +* (real io) `pwmgen.`____`.offset` - DC offset added to `value` before scaling. +* (real io) `pwmgen.`____`.pwm-freq` - Desired PWM frequency, in Hz. + If 0.0, generates PDM instead of PWM. If set higher than internal limits, next call of 'pwmgen.update' will set it to the internal limit. + If non-zero, and 'dither' is false, next call of 'pwmgen.update' will set it to the nearest integer multiple of the 'make_pulses()' function period. +* (bool io) `pwmgen.`____`.dither-pwm` - If true, enables dithering to achieve average PWM frequencies or duty cycles that are unobtainable with pure PWM. If false, both the PWM frequency and the duty cycle will be rounded to values that can be achieved exactly. -* (real) `pwmgen.`____`.min-dc` - Minimum duty cycle, between 0.0 and 1.0 (duty cycle will go to zero when disabled, regardless of this setting). -* (real) `pwmgen.`____`.max-dc` - Maximum duty cycle, between 0.0 and 1.0. -* (real) `pwmgen.`____`.curr-dc` - Current duty cycle - after all limiting and rounding (read only). +* (real io) `pwmgen.`____`.min-dc` - Minimum duty cycle, between 0.0 and 1.0 (duty cycle will go to zero when disabled, regardless of this setting). +* (real io) `pwmgen.`____`.max-dc` - Maximum duty cycle, between 0.0 and 1.0. +* (real out) `pwmgen.`____`.curr-dc` - Current duty cycle - after all limiting and rounding (read only). + +=== Parameters + +None. === Functions @@ -326,8 +332,8 @@ halcmd: unloadrt encoder If `index-enable` is False, the Phase Z channel of the encoder will be ignored, and the counter will count normally. The encoder driver will never set `index-enable` True. However, some other component may do so. * `encoder.__.latch-falling` (bool, in) (default: TRUE) - Not used at this time. -* `encoder.__.latch-input` (bool, in) (default: TRUE) - Not used at this time. -* `encoder.__.latch-rising` (bool, in) - Not used at this time. +* `encoder.__.latch-input` (bool, in) (default: FALSE) - Not used at this time. +* `encoder.__.latch-rising` (bool, in) (default: TRUE) - Not used at this time. * `encoder.__.min-speed-estimate` (real, in) - Determine the minimum true velocity magnitude, at which velocity will be estimated as nonzero and position-interpolated will be interpolated. The units of `min-speed-estimate` are the same as the units of `velocity`. Scale factor, in counts per length unit. Setting this parameter too low will cause it to take a long time for velocity to go to 0 after encoder pulses have stopped arriving. @@ -350,6 +356,7 @@ halcmd: unloadrt encoder * `encoder.__.velocity` (real, out) - Velocity in scaled units per second. `encoder` uses an algorithm that greatly reduces quantization noise as compared to simply differentiating the 'position' output. When the magnitude of the true velocity is below min-speed-estimate, the velocity output is 0. +* `encoder.__.velocity-rpm` (real, out) - Velocity in scaled units per minute. * `encoder.__.x4-mode` (bool, i/o) (default: TRUE) - Enables times-4 mode. When true, the counter counts each edge of the quadrature waveform (four counts per full cycle). When false, it only counts once per full cycle. @@ -357,10 +364,7 @@ halcmd: unloadrt encoder === Parameters -* `encoder.__.capture-position.time` (sint, ro) -* `encoder.__.capture-position.tmax` (sint, rw) -* `encoder.__.update-counters.time` (sint, ro) -* `encoder.__.update-counter.tmax` (sint, rw) +None. === Functions @@ -430,8 +434,8 @@ Each loop has two pins which are used to monitor or control the general operatio Pins used to report saturation. Saturation occurs when the output of the PID block is at its maximum or minimum limit. * '(bool) pid.__.saturated' - True when output is saturated. -* '(real) pid.__.saturated_s' - The time the output has been saturated. -* '(sint) pid.__.saturated_count' - The time the output has been saturated. +* '(real) pid.__.saturated-s' - The time the output has been saturated. +* '(sint) pid.__.saturated-count' - The time the output has been saturated. The PID gains, limits, and other 'tunable' features of the loop are available as pins so that they can be adjusted dynamically for more advanced tuning possibilities. @@ -442,22 +446,42 @@ The PID gains, limits, and other 'tunable' features of the loop are available as * '(real) pid.__.FF0' - Zeroth order feedforward - output proportional to command (position). * '(real) pid.__.FF1' - First order feedforward - output proportional to derivative of command (velocity). * '(real) pid.__.FF2' - Second order feedforward - output proportional to 2^nd^ derivative of command (acceleration). +* '(real) pid.__.FF3' - Third order feedforward - output proportional to 3^rd^ derivative of command (jerk). * '(real) pid.__.deadband' - Amount of error that will be ignored * '(real) pid.__.maxerror' - Limit on error * '(real) pid.__.maxerrorI' - Limit on error integrator * '(real) pid.__.maxerrorD' - Limit on error derivative * '(real) pid.__.maxcmdD' - Limit on command derivative * '(real) pid.__.maxcmdDD' - Limit on command 2^nd^ derivative +* '(real) pid.__.maxcmdDDD' - Limit on command 3^rd^ derivative * '(real) pid.__.maxoutput' - Limit on output value All _max*_ limits are implemented so that if the value of this parameter is zero, there is no limit. -If 'debug=1' was specified when the component was installed, four additional pins will be exported: +Additional input pins: + +* '(real) pid.__.command-deriv' - Command derivative (velocity), used instead of differentiating '.command' when connected. +* '(real) pid.__.feedback-deriv' - Feedback derivative (velocity), used instead of differentiating '.feedback' when connected. +* '(bool) pid.__.index-enable' - When true, the loop is reset on the next rising edge, like an encoder index. +* '(bool) pid.__.error-previous-target' - When true (the default), the derivative of error tracks the previous target to avoid derivative kick on command steps. + +Auto-tuning pins (used by the 'at_pid' component): + +* '(real io) pid.__.tune-effort' - Effort limit used during tuning cycles. +* '(uint io) pid.__.tune-cycles' - Number of tuning cycles to run. +* '(uint io) pid.__.tune-type' - Type of tuning to perform. +* '(bool) pid.__.tune-mode' - When true, the loop runs in tuning mode. +* '(bool io) pid.__.tune-start' - Set true to start tuning; reset to false when tuning is done. + +If 'debug=1' was specified when the component was installed, additional pins will be exported: * '(real) pid.__.errorI' - Integral of error. * '(real) pid.__.errorD' - Derivative of error. * '(real) pid.__.commandD' - Derivative of the command. * '(real) pid.__.commandDD' - 2^nd^ derivative of the command. +* '(real) pid.__.commandDDD' - 3^rd^ derivative of the command. +* '(real) pid.__.ultimate-gain' - Ultimate gain determined by auto-tuning. +* '(real) pid.__.ultimate-period' - Ultimate period determined by auto-tuning. === Functions @@ -465,7 +489,7 @@ The component exports one function for each PID loop. This function performs all the calculations needed for the loop. Since each loop has its own function, individual loops can be included in different threads and execute at different rates. -* '(funct) pid.__.do_pid_calcs' - Performs all calculations +* '(funct) pid.__.do-pid-calcs' - Performs all calculations for a single PID loop. If you want to understand the exact algorithm used to compute the output of the PID loop, refer to @@ -504,15 +528,17 @@ halcmd: unloadrt sim-encoder * (bool) `sim-encoder.`____`.phase-A` - Quadrature output. * (bool) `sim-encoder.`____`.phase-B` - Quadrature output. * (bool) `sim-encoder.`____`.phase-Z` - Index pulse output. +* (sint) `sim-encoder.`____`.rawcounts` - Position in counts, can be driven to simulate an external encoder position. +* (uint io) `sim-encoder.`____`.ppr` - Pulses Per Revolution. +* (real io) `sim-encoder.`____`.scale` - Scale Factor for `.speed`. + The default is 1.0, which means that `.speed` is in revolutions per second. + Change to 60 for RPM, to 360 for degrees per second, 6.283185 (= 2*π) for radians per second, etc. When `.speed` is positive, `.phase-A` leads `.phase-B`. === Parameters -* (uint) `sim-encoder.`____`.ppr` - Pulses Per Revolution. -* (real) `sim-encoder.`____`.scale` - Scale Factor for `.speed`. - The default is 1.0, which means that `.speed` is in revolutions per second. - Change to 60 for RPM, to 360 for degrees per second, 6.283185 (= 2*π) for radians per second, etc. +None. Note that pulses per revolution is not the same as counts per revolution. A pulse is a complete quadrature cycle. @@ -546,9 +572,9 @@ halcmd: loadrt debounce cfg=1,4,2 ---- will install three groups of filters. Group 0 contains one filter, group 1 contains four, and group 2 contains two filters. -The default value for __ is "1" which will install a single group containing a single filter. -The maximum number of groups 8 (as defined by MAX_GROUPS in debounce.c). -The maximum number of filters in a group is limited only by shared memory space. +There is no default value for __; at least one group size must be given or loading fails. +The maximum number of groups is 8 (as defined by MAX_GROUP in debounce.c). +The maximum number of filters in a group is 50 (as defined by MAX_GROUP_SIZE in debounce.c). Each group is completely independent. All filters in a single group are identical, and they are all updated by the same function at the same time. In the following descriptions, __ is the group number and __ is the filter number within the group. @@ -618,6 +644,7 @@ Each generator has five output pins. * (real) `siggen.`____`.sawtooth` - Sawtooth output. * (real) `siggen.`____`.triangle` - Triangle wave output. * (real) `siggen.`____`.square` - Square wave output. +* (bool) `siggen.`____`.clock` - Clock output, toggles once per cycle. All five outputs have the same frequency, amplitude, and offset. @@ -626,6 +653,7 @@ In addition to the output pins, there are three control pins: * (real) `siggen.`____`.frequency` - Sets the frequency in Hertz, default value is 1 Hz. * (real) `siggen.`____`.amplitude` - Sets the peak amplitude of the output waveforms, default is 1. * (real) `siggen.`____`.offset` - Sets DC offset of the output waveforms, default is 0. +* (bool) `siggen.`____`.reset` - When true, the internal phase accumulator is held at zero. For example, if `siggen.0.amplitude` is 1.0 and `siggen.0.offset` is 0.0, the outputs will swing from -1.0 to +1.0. If `siggen.0.amplitude` is 2.5 and `siggen.0.offset` is 10.0, then the outputs will swing from 7.5 to 12.5. diff --git a/docs/src/man/man1/gs2_vfd.1.adoc b/docs/src/man/man1/gs2_vfd.1.adoc index f826253f163..5778300f438 100644 --- a/docs/src/man/man1/gs2_vfd.1.adoc +++ b/docs/src/man/man1/gs2_vfd.1.adoc @@ -72,6 +72,12 @@ and writes to the GS2 via a modbus connection. .at-speed (bool, out):: when drive is at commanded speed +.enable (bool, in):: + enable communication with the VFD; the drive will not respond to commands while this is false + +.initialized (bool, out):: + true once the component has completed its initial read of the VFD parameters + .err-reset (bool, in):: reset errors sent to VFD diff --git a/docs/src/man/man1/halui.1.adoc b/docs/src/man/man1/halui.1.adoc index bbdcb48b915..861abcd04c0 100644 --- a/docs/src/man/man1/halui.1.adoc +++ b/docs/src/man/man1/halui.1.adoc @@ -38,23 +38,23 @@ contact) connect the physical button to a HAL debounce filter first. === Tool -*halui.tool.length-offset.a* real out:: +*halui.tool.length_offset.a* real out:: current applied tool length offset for the A axis -*halui.tool.length-offset.b* real out:: +*halui.tool.length_offset.b* real out:: current applied tool length offset for the B axis -*halui.tool.length-offset.c* real out:: +*halui.tool.length_offset.c* real out:: current applied tool length offset for the C axis -*halui.tool.length-offset.u* real out:: +*halui.tool.length_offset.u* real out:: current applied tool length offset for the U axis -*halui.tool.length-offset.v* real out:: +*halui.tool.length_offset.v* real out:: current applied tool length offset for the V axis -*halui.tool.length-offset.w* real out:: +*halui.tool.length_offset.w* real out:: current applied tool length offset for the W axis -*halui.tool.length-offset.x* real out:: +*halui.tool.length_offset.x* real out:: current applied tool length offset for the X axis -*halui.tool.length-offset.y* real out:: +*halui.tool.length_offset.y* real out:: current applied tool length offset for the Y axis -*halui.tool.length-offset.z* real out:: +*halui.tool.length_offset.z* real out:: current applied tool length offset for the Z axis *halui.tool.diameter* real out:: Current tool diameter, or 0 if no tool is loaded. @@ -307,7 +307,7 @@ Joint jogging is possible in unhomed state except for joints having a negative H pin for jogging the selected joint in negative direction at the halui.joint.jog-speed velocity *halui.joint.selected.plus* bool in:: - pin for jogging the selected joint bit in in positive direction at the + pin for jogging the selected joint in positive direction at the halui.joint.jog-speed velocity === Axis @@ -368,7 +368,7 @@ _L_ = axis letter (xyzabcuvw) *halui.axis.selected.minus* bool in:: pin for jogging the selected axis in negative direction at the halui.axis.jog-speed velocity *halui.axis.selected.plus* bool in:: - pin for jogging the selected axis bit in in positive direction at the halui.axis.jog-speed velocity + pin for jogging the selected axis in positive direction at the halui.axis.jog-speed velocity === Flood coolant diff --git a/docs/src/man/man1/hy_vfd.1.adoc b/docs/src/man/man1/hy_vfd.1.adoc index e36a2d50d8b..02650dcffb6 100644 --- a/docs/src/man/man1/hy_vfd.1.adoc +++ b/docs/src/man/man1/hy_vfd.1.adoc @@ -187,9 +187,9 @@ __.Tmp (real, out) __.spindle-forward (bool, in) -__.spindle-reverse (bin, in) +__.spindle-reverse (bool, in) -__.spindle-on (bin, in) +__.spindle-on (bool, in) __.CNTR (real, out) diff --git a/docs/src/man/man1/io.1.adoc b/docs/src/man/man1/io.1.adoc index d5e2366648a..fc279016f96 100644 --- a/docs/src/man/man1/io.1.adoc +++ b/docs/src/man/man1/io.1.adoc @@ -49,6 +49,8 @@ unless an absolute path is specified. TRUE when a T__n__ tool prepare is requested. *iocontrol.0.tool-prepared* (bool, in):: Should be driven TRUE when a tool prepare is completed. +*iocontrol.0.tool-from-pocket* (sint, out):: + The pocket number of the currently loaded tool. *iocontrol.0.user-enable-out* (bool, out):: FALSE when an internal E-stop condition exists. *iocontrol.0.user-request-enable* (bool, out):: diff --git a/docs/src/man/man1/moveoff_gui.1.adoc b/docs/src/man/man1/moveoff_gui.1.adoc index 424bbcbdbcd..042b2aead0f 100644 --- a/docs/src/man/man1/moveoff_gui.1.adoc +++ b/docs/src/man/man1/moveoff_gui.1.adoc @@ -82,7 +82,7 @@ HALUI = halui The moveoff component must be loaded with the name 'mv' as: + **loadrt moveoff names=**_mv **personality=**_number_of_axes_ -If the pin mv.motion-enable is *not* connected when moveoff_gui is started, +If the pin mv.move-enable is *not* connected when moveoff_gui is started, *controls will be provided* to enable offsets and set offset values. If the pin *is* connected, *only a display* of offsets is shown and control must be made by *external* HAL connections. diff --git a/docs/src/man/man1/sendkeys.1.adoc b/docs/src/man/man1/sendkeys.1.adoc index 8a2d5c68f47..7208f8c6a9b 100644 --- a/docs/src/man/man1/sendkeys.1.adoc +++ b/docs/src/man/man1/sendkeys.1.adoc @@ -82,6 +82,9 @@ To generate keystrokes from other sources note that a keydown is simply `0xC0 & **sendkeys.**_N_**.init** bool in:: Set this pin TRUE once all the event parameters have been set. +**sendkeys.**_N_**.trigger-**_MM_ bool in:: + Generate the keystrokes assigned by pin-event-_MM_ when this pin goes TRUE. + == PARAMETERS **sendkeys.**_N_**.scan-event-_MM_** uint in:: diff --git a/docs/src/man/man1/vfs11_vfd.1.adoc b/docs/src/man/man1/vfs11_vfd.1.adoc index 57cdda7e1cd..ac0d3231314 100644 --- a/docs/src/man/man1/vfs11_vfd.1.adoc +++ b/docs/src/man/man1/vfs11_vfd.1.adoc @@ -90,7 +90,7 @@ This component reads and writes to the vfs11 via a Modbus connection. Speed control is disabled, and the output frequency is determined by register F262 (preset to 5 Hz). This might be useful for spindle orientation. -.max-rpm (real, R):: +.max-rpm (real, out):: Actual RPM limit based on maximum frequency the VFD may generate, and the motors nameplate values. For instance, if _nameplate-HZ_ is 50, and _nameplate-RPM__ is 1410, but the VFD may generate up to 80Hz, then _max-rpm_ would read as 2256 (80*1410/50). The frequency limit is read from the VFD at startup. @@ -109,8 +109,8 @@ This component reads and writes to the vfs11 via a Modbus connection. .output-voltage-percentage (real, out):: from the VFD -.output-voltage (real, out):: - from the VFD +.frequency-limit (real, out):: + Upper limit read from VFD setup. .speed-command (real, in):: Speed sent to VFD in RPM. It is an error to send a speed faster than the Motor Max RPM as set in the VFD. @@ -134,14 +134,11 @@ This component reads and writes to the vfs11 via a Modbus connection. .trip-code (sint, out):: Trip code if VF-S11 is in tripped state. -.error-count (sint, RW):: +.error-count (sint, out):: Total number of transactions returning a Modbus error. == PARAMETERS -.frequency-limit (real, RO):: - Upper limit read from VFD setup. - .loop-time (real, RW):: How often the Modbus is polled (default interval 0.1 seconds) diff --git a/docs/src/man/man1/xhc-hb04.1.adoc b/docs/src/man/man1/xhc-hb04.1.adoc index 99413a82037..40301993e3f 100644 --- a/docs/src/man/man1/xhc-hb04.1.adoc +++ b/docs/src/man/man1/xhc-hb04.1.adoc @@ -157,14 +157,14 @@ xhc-hb04.sleeping (bool out):: xhc-hb04.jog.enable-off (bool out):: True when the pendant rotary selector switch is in the OFF position or when the pendant is sleeping. -xhc-hb04.enable-[xyza] (bool out):: +xhc-hb04.jog.enable-[xyza] (bool out):: True when the pendant rotary selector switch is in the [xyza] position and not sleeping. -xhc-hb04.enable-spindle-override (bool out):: +xhc-hb04.jog.enable-spindle-override (bool out):: True when the pendant rotary selector switch is in the Spindle position and not sleeping (typically connect to: halui.spindle-override-count-enable). -xhc-hb04.enable-feed-override (bool out):: +xhc-hb04.jog.enable-feed-override (bool out):: True when the pendant rotary selector switch is in the feed position and not sleeping (typically connect to: halui.feed-override-count-enable). diff --git a/docs/src/man/man1/xhc-whb04b-6.1.adoc b/docs/src/man/man1/xhc-whb04b-6.1.adoc index 6ead157c1ed..6cd5f625ab2 100644 --- a/docs/src/man/man1/xhc-whb04b-6.1.adoc +++ b/docs/src/man/man1/xhc-whb04b-6.1.adoc @@ -116,9 +116,6 @@ Signals utilized for moving axis. __ ... denotes the axis number, which is of {x, y, z, a, b, c}. -`whb.halui.home-all` (bool, out):: - connect to `halui.home-all`, driven by M-Home. - Pin for requesting all axis to home. See also `whb.button.m-home`. `whb.halui.axis.__.select` (bool, out):: connect to `halui.axis.__.select`. Pin to select axis. `whb.axis.__.jog-counts` (sint, out):: @@ -138,7 +135,7 @@ __ ... denotes the axis number, which is of {x, y, z, a, b, c}. `whb.halui.max-velocity.value` (real, in):: connect to `halui.max-velocity.value`. The maximum allowable velocity, in units per second (__ is two digit '0'-padded). -`whb.halui.feed-override.scale` (real, in):: +`whb.halui.feed-override.scale` (real, out):: connect to `halui.feed-override.scale`. The scaling for feed override value. `whb.halui.axis.`____`.pos-feedback` (real, in):: connect to `halui.axis.`____`.pos-feedback`. @@ -184,7 +181,7 @@ Signals utilized for toggling machine status. `whb.halui.spindle-override.value` (real, in):: Connect to `halui.spindle.0.override.value`. The current spindle override value. -`whb.halui.spindle-override.scale` (real, in):: +`whb.halui.spindle-override.scale` (real, out):: Connect to `halui.spindle.0.override.scale`. The current spindle scaling override value. @@ -216,7 +213,7 @@ In MPG/CON the feed rate will change to 100%, 60%, ... and so forth. In Step mod Connect to `halui.feed-override.increase`. Pin for increasing the feed override by amount of scale. `whb.halui.feed-override.scale` (real, out):: Connect to `halui.feed-override.scale`. Pin for setting the scale on changing the feed override. -`whb.halui.max-velocity.value` (real, out):: +`whb.halui.max-velocity.value` (real, in):: Connect to `halui.max-velocity.value`. ==== Program diff --git a/docs/src/man/man9/demux_generic.9.adoc b/docs/src/man/man9/demux_generic.9.adoc index 9948af5df4d..bef0c0f582b 100644 --- a/docs/src/man/man9/demux_generic.9.adoc +++ b/docs/src/man/man9/demux_generic.9.adoc @@ -72,7 +72,7 @@ It allows the creation of arbitrary-size demultiplexers (up to 1024 entries) and also supports differing data types on the input and output pins. The configuration string is a comma-separated list of code-letters and numbers, such as "bb4,fu12". This would create a -4-element bit-to-bit demux and a 12-element real-to-uint demux. +4-element bool-to-bool demux and a 12-element real-to-uint demux. The code letters are: **b** = bool (boolean), diff --git a/docs/src/man/man9/hm2_eth.9.adoc b/docs/src/man/man9/hm2_eth.9.adoc index 0e6e3b43dcf..aeb9df00a8e 100644 --- a/docs/src/man/man9/hm2_eth.9.adoc +++ b/docs/src/man/man9/hm2_eth.9.adoc @@ -121,14 +121,14 @@ for each feedback signal, using *packet-error* as the mux2 *sel* input. In addition to the pins documented in *hostmot2(9)*, *hm2_eth(9)* creates the following additional pins: -hm2_____.____.packet-error (bit, out):: +hm2_____.____.packet-error (bool, out):: This pin is TRUE when the most recent cycle detected a read or write error, and FALSE at other times. -hm2_____.____.packet-error-level (s32, out):: +hm2_____.____.packet-error-level (sint, out):: This pin shows the current error level, with higher numbers indicating a greater number of recent detected errors. The error level is always in the range from 0 to packet-error-limit, inclusive. -hm2_____.____.packet-error-exceeded (bit, out):: +hm2_____.____.packet-error-exceeded (bool, out):: This pin is TRUE when the current error level is equal to the maximum, and FALSE at other times. -hm2_____.____.packet-error-total (u32, io):: +hm2_____.____.packet-error-total (uint, io):: This pin shows the total package error count. == PARAMETERS @@ -136,17 +136,17 @@ hm2_____.____.packet-error-total (u32, io):: In addition to the parameters documented in *hostmot2(9)*, *hm2_eth(9)* creates the following additional parameters: -hm2_____.____.packet-error-decrement (s32, rw):: +hm2_____.____.packet-error-decrement (sint, ro):: The amount deducted from `packet-error-level` in a cycle without detected read or write errors, without going below zero. -hm2_____.____.packet-error-increment (s32, rw):: +hm2_____.____.packet-error-increment (sint, rw):: The amount added to `packet-error-level` in a cycle without detected read or write errors, without going above `packet-error-limit`. -hm2_____.____.packet-error-limit (s32, rw):: +hm2_____.____.packet-error-limit (sint, rw):: The level at which a detected read or write error is treated as a permanent error. When this error level is reached, the board's `io-error` pin becomes TRUE and the condition must be manually reset. -hm2_____.____.packet-read-timeout (s32, rw):: +hm2_____.____.packet-read-timeout (sint, rw):: The length of time that must pass before a read request times out. If the value is less than or equal to 0, it is interpreted as 80% of the thread period. If the value is less than 100, it is interpreted as a percentage of the thread period. diff --git a/docs/src/man/man9/hostmot2.9.adoc b/docs/src/man/man9/hostmot2.9.adoc index 10f0b4851eb..da9f56a494f 100644 --- a/docs/src/man/man9/hostmot2.9.adoc +++ b/docs/src/man/man9/hostmot2.9.adoc @@ -218,7 +218,7 @@ reasonable to load these cards with no config string at all. Unconnected channels will default to GPIO, but the pin values will vary semi-randomly during boot when card-detection runs, to it is best to actively disable any channel that is to be used for GPIO. See - SSERIAL(9) for more information. + sserial(9) for more information. *num_bspis* [optional, default: -1]:: Only enable the first N Buffered SPI drivers. If N is -1 then all the drivers are enabled. Each BSPI driver can address 16 devices. @@ -236,7 +236,8 @@ reasonable to load these cards with no config string at all. === dpll -The hm2dpll module has pins like "hm2___.__.dpll" +The hm2dpll module has pins and parameters like +**hm2_**____**.**____**.dpll** It is likely that the pin-count will decrease in the future and that some pins will become parameters. This module is a phase-locked loop that will synchronise itself with the thread in which the hostmot2 @@ -252,56 +253,56 @@ ethernet-interfaced cards. *Pins:* -hm2_____.____.dpll._NN_.timer-us (float, in):: + .__NN__.timer-us (real, in):: This pin sets the triggering offset of the associated timer. There are 4 timers numbered 01 to 04, represented by the _NN_ digits in the pin name. The units are microseconds (µs). Generally the value for reads will be negative, and positive for writes, so that input data is sampled prior to the main hostmot read and output data is written some time after the main hostmot2 read. - + - For stepgen and quadrature encoders, the value needs to be more than the - maximum variation between read times. -100 will suffice for most - systems, and -50 will work on systems with good performance and latency. - + - For serial encoders, the value also needs to include the time it takes - to transfer the absolute encoder position. For instance, if 50 bits must - be read at 500 kHz then subtract an additional 50/500 kHz = 100 µs to - get a starting value of -200. - + - The xy2mod uses 2 DPLL timers, one for read and one for write. - The read timer value can be the same as used by the stepgen and quadrature - encoders so the same timer channel can be shared. - The write timer is typically set to a time after the main hostmot2 write - this may take some experimentation. - -hm2____.____.dpll.base-freq-khz (float, in):: ++ +For stepgen and quadrature encoders, the value needs to be more than the +maximum variation between read times. -100 will suffice for most +systems, and -50 will work on systems with good performance and latency. ++ +For serial encoders, the value also needs to include the time it takes +to transfer the absolute encoder position. For instance, if 50 bits must +be read at 500 kHz then subtract an additional 50/500 kHz = 100 µs to +get a starting value of -200. ++ +The xy2mod uses 2 DPLL timers, one for read and one for write. +The read timer value can be the same as used by the stepgen and quadrature +encoders so the same timer channel can be shared. +The write timer is typically set to a time after the main hostmot2 write +this may take some experimentation. + + .base-freq-khz (real, in):: This pin sets the base frequency of the phase-locked loop. By default it will be set to the nominal frequency of the thread in which the PLL is running and will not normally need to be changed. -hm2____.____.dpll.phase-error-us (float, out):: + .phase-error-us (real, out):: Indicates the phase error of the DPLL. If the number cycles by a large amount it is likely that the PLL has failed to achieve lock and adjustments will need to be made. -hm2_____.____.dpll.time-const (u32, in):: + .time-const (uint, in):: The filter time-constant for the PLL. The default value is a compromise between insensitivity to single-cycle variations and being resilient to changes to the Linux CLOCK_MONOTONIC timescale, which can instantly change by up to ±500ppm from its nominal value, usually by timekeeping software like ntpd and ntpdate. Default 2000 (0x7d0). -hm2_____.____.dpll.plimit (u32, in):: + .plimit (uint, in):: Sets the phase adjustment limit of the PLL. If the value is zero then the PLL will free-run at the base frequency independent of the servo thread rate. This is probably not what you want. Default 4194304 (0x400000) Units not known... -hm2_____.____.dpll.ddsize (u32, out):: + .ddsize (uint, out):: Used internally by the driver, likely to disappear. -hm2_____.____.dpll.prescale (u32, in):: + .prescale (uint, out):: Prescale factor for the rate generator. Default 1. === Encoder -Encoders have names like **hm2_**____**.**____**.encoder.**____**.**". +Encoders have names like **hm2_**____**.**____**.encoder.**____. "Instance" is a two-digit number that corresponds to the HostMot2 encoder instance number. There are "num_encoders" instances, starting with 00. @@ -321,121 +322,128 @@ following pins and parameters: *Pins:* -count (s32 out):: + .count (sint, out):: Number of encoder counts since the previous reset. 32-bit truncation of the 64-bit internal counter; position is computed from the full-width internal value so it does not wrap. -position (float out):: + .position (real, out):: Encoder position in position units (count / scale). -position-interpolated (float out):: + .position-interpolated (real, out):: Encoder interpolated position in position units (count / scale). Only valid when velocity is approximately constant and the time between counts is less than the velocity timeout parameter value. Do not use for position control. Useful for spindle synchronized moves with low resolution encoders. -position-latched (float out):: + .position-latched (real, out):: Encoder latched position in position units (count / scale). -velocity (float out):: + .velocity (real, out):: Estimated encoder velocity in position units per second. -velocity-rpm (float out):: + .velocity-rpm (real, out):: Estimated encoder velocity in position units per minute. -reset (bit in):: + .reset (bool, in):: When this pin is True, the count and position pins are set to 0 (the value of the velocity pin is not affected by this). The driver does not reset this pin to FALSE after resetting the count to 0, that is the user's job. -index-enable (bit in/out):: - When this pin is set to True, (and no-clear-on-index is false) + .index-enable (bool, io):: + When this pin is set to True, (and no_clear_on_index is false) the count (and therefore also position) are reset to zero on the next Index (Phase-Z) pulse. At the same time, index-enable is reset to zero to indicate that the pulse has occurred. -no-clear-on-index (bit in):: + .no_clear_on_index (bool, in):: When this pin is set to True, the count (and therefore also position) are NOT reset to zero on the next Index (Phase\-Z) pulse. On an index event the latched count and position will be set to indicate the count and position where the index occured. -probe-enable (bit in/out):: + .probe-enable (bool, in):: When this pin is set to True, the encoder count (and therefore also position) are latched on the the next probe active edge. At the same time, probe-enable is reset to zero to indicate that latch event has occurred. (only present if supported by firmware) -probe-invert (bit r/w):: + .probe-invert (bool, in):: If set to True, the rising edge of the probe input pin triggers the latch event (if probe-enable is True). If set to False, the falling edge triggers. (only present if supported by firmware) -rawcounts (s32 out):: + .rawcounts (sint, out):: Total number of encoder counts since the start, not adjusted for index or reset. Truncated view of the internal 64-bit counter. -count_latch (s32 out):: + .count-latched (sint, out):: Encoder count at latch event (index or probe). Truncated view of the internal 64-bit latched count. -input-a, input-b, input-index (bit out):: + .input-a, .input-b, .input-index (bool, out):: Real time filtered values of A,B,Index encoder signals -quad-error-enable (bit in):: + .quad-error-enable (bool, in):: When this pin is True quadrature error reporting is enabled. When False, existing quadrature errors are cleared and error reporting is disabled. -quad-error (bit out):: + .quad-error (bool, out):: This bit indicates that a quadrature sequence error has been detected. It can only be set if the corresponding quad-error-enable bit is True. -hm2_XXXX.N.encoder.sample-frequency (u32 in):: + +The following pins are global to the encoder module and have no +instance number in the name: + + .sample-frequency (uint, in):: This is the sample frequency that determines all standard encoder channels digital filter time constant (see filter parameter). -hm2_XXXX.N.encoder.muxed-sample-frequency (u32 in):: + .muxed-sample-frequency (uint, in):: This is the sample frequency that determines all muxed encoder channels digital filter time constant (see filter parameter). This also sets the encoder multiplexing frequency. -hm2_XXXX.N.encoder.muxed-skew (float in):: + .muxed-skew (uint, in):: This sets the muxed encoder sample time delay (in ns) from the multiplex signal. Setting this properly can increase the usable multiplex frequency and compensate for cable delays (suggested value is 3* cable length in feet +20). -hm2_XXXX.N.encoder.hires-timestamp (bit in):: + .hires-timestamp (bool, in):: When this pin is True the encoder timestamp counter frequency is ca. 10 MHz. When False the timestamp counter frequency is ca. 2 MHz. This should be set True for frequency counting applications to improve the resolution. It should be set False when servo thread periods longer than 1 ms are used. + .timer-number (default: -1) (sint, in):: + Sets the hm2dpll timer instance to be used to latch encoder counts. + A setting of -1 does not latch encoder counts. A setting of 0 latches at + the same time as the main hostmot2 read. A setting of 1..4 uses a time + offset from the main hostmot2 read according to the dpll's timer-us setting. + +Typically, timer-us should be a negative number with a magnitude larger than the largest latency +(e.g., -100 for a system with mediocre latency, -50 for a system with good latency). +A negative number specifies latching the specified time before the nominal hostmot2 read time. + +If no DPLL module is present in the FPGA firmware, or if the encoder +module does not support DPLL, then this pin is not created. + +When available, this feature should typically be enabled. +Doing so generally reduces following errors. + *Parameters:* -scale (float r/w):: + .scale (real, rw):: Converts from "count" units to "position" units. -index-invert (bit r/w):: + .index-invert (bool, rw):: If set to True, the rising edge of the Index input pin triggers the Index event (if index-enable is True). If set to False, the falling edge triggers. -index-mask (bit r/w):: + .index-mask (bool, rw):: If set to True, the Index input pin only has an effect if the Index-Mask input pin is True (or False, depending on the index-mask-invert pin below). -index-mask-invert (bit r/w):: + .index-mask-invert (bool, rw):: If set to True, Index-Mask must be False for Index to have an effect. If set to False, the Index-Mask pin must be True. -counter-mode (bit r/w):: + .counter-mode (bool, rw):: Set to False (the default) for Quadrature. Set to True for Step/Dir (in which case Step is on the A pin and Dir is on the B pin). -filter (bit r/w):: + .filter (bool, rw):: If set to True (the default), the quadrature counter needs 15 sample clocks to register a change on any of the three input lines (any pulse shorter than this is rejected as noise). If set to False, the quadrature counter needs only 3 clocks to register a change. The default encoder sample clock runs at approximately 25 to 33 MHz but can be changed globally with the sample-frequency or muxed-sample-frequency pin. -vel-timeout (float r/w):: + .vel-timeout (real, rw):: When the encoder is moving slower than one pulse for each time that the driver reads the count from the FPGA (in the hm2_read() function), the velocity is harder to estimate. The driver can wait several iterations for the next pulse to arrive, all the while reporting the upper bound of the encoder velocity, which can be accurately guessed. This parameter specifies how long to wait for the next pulse, before reporting the encoder stopped. This parameter is in seconds. -hm2_XXXX.N.encoder.timer-number (default: -1) (s32 r/w):: - Sets the hm2dpll timer instance to be used to latch encoder counts. - A setting of -1 does not latch encoder counts. A setting of 0 latches at - the same time as the main hostmot2 read. A setting of 1..4 uses a time - offset from the main hostmot2 read according to the dpll's timer-us setting. - -Typically, timer-us should be a negative number with a magnitude larger than the largest latency -(e.g., -100 for a system with mediocre latency, -50 for a system with good latency). -A negative number specifies latching the specified time before the nominal hostmot2 read time. - -If no DPLL module is present in the FPGA firmware, or if the encoder -module does not support DPLL, then this pin is not created. - -When available, this feature should typically be enabled. -Doing so generally reduces following errors. === Synchronous Serial Interface (SSI) (Not to be confused with the Smart Serial Interface) +SSI pins and parameters use the prefix +**hm2_**__XXXX__**.**__N__**.ssi.**__MM__. One pin is created for each SSI instance regardless of data format: -hm2_XXXX.__NN__.ssi.__MM__.data-incomplete (bit, in):: + .data-invalid (bool, out):: This pin will be set "True" if the module was still transferring data when the value was read. When this problem exists there will also be a limited number of error messages printed to the UI. This pin should be used to monitor whether the problem has been addressed by config changes. @@ -447,7 +455,7 @@ The names of the pins created by the SSI module will depend entirely on the format string for each channel specified in the loadrt command line. A typical format string might be *ssi_chan_0=error%1bposition%24g*. -This would interpret the LSB of the bit-stream as a bit-type pin named +This would interpret the LSB of the bit-stream as a bool-type pin named "error" and the next 24 bits as a Gray-coded encoder counter. The encoder-related HAL pins would all begin with "position". @@ -463,37 +471,37 @@ The valid format characters and the pins they create are: p: (Pad):: Does not create any pins, used to ignore sections of the bit stream that are not required. -b: (Boolean).:: (bit, out) hm2_XXXX.N.ssi.MM.. + +b: (Boolean).:: (bool, out) .. + If any bits in the designated field width are non-zero then the HAL pin will be "True". + - (bit, out) hm2_XXXX.N.ssi.MM.-not. + + (bool, out) .-not. + An inverted version of the above, the HAL pin will be "True" if all bits in the field are zero. -u: (Unsigned):: (float, out) hm2_XXXX.N.ssi.MM.. +u: (Unsigned):: (real, out) .. The value of the bits interpreted as an unsigned integer then scaled such that the pin value will equal the scalemax parameter value when all bits are high. (for example if the field is 8 bits wide and the scalmax parameter was 20 then a value of 255 would return 20, and 0 would return 0. -s: (Signed):: (float, out) hm2_XXXX.N.ssi.MM.. + +s: (Signed):: (real, out) .. + The value of the bits interpreted as a 2s complement signed number then scaled similarly to the unsigned variant, except symmetrical around zero. -f: (bitField):: (bit, out) hm2_XXXX.N.ssi.MM.-NN. + +f: (bitField):: (bool, out) .-NN. + The value of each individual bit in the data field. NN starts at 00 up to the number of bits in the field. + - (bit, out) hm2_XXXX.N.ssi.MM.-NN-not. + + (bool, out) .-NN-not. + An inverted version of the individual bit values. -e: (Encoder):: (s32, out) hm2_XXXX.N.ssi.MM..count. + +e: (Encoder):: (sint, out) ..count. + The lower 32 bits of the total encoder counts. This value is reset both by the ...reset and the ...index-enable pins. + - (s32, out) hm2_XXXX.N.ssi.MM..rawcounts. + + (sint, out) ..rawcounts. + The lower 32 bits of the total encoder counts. The pin is not affected by reset and index. + - (float, out) hm2_XXXX.N.ssi.MM..position. + + (real, out) ..position. + The encoder position in machine units. This is calculated from the full 64-bit buffers so will show a True value even after the counts pins have wrapped. It is zeroed by reset and index enable. + - (bit, IO) hm2_XXXX.N.ssi.MM..index-enable. + + (bool, io) ..index-enable. + When this pin is set "True" the module will wait until the raw encoder counts next passes through an integer multiple of the number of counts specified by counts-per-rev parameter and then it will zero the counts and position pins, and set the index-enable pin back to "False" as a signal to the system that "index" has been passed. this pin is used for spindle-synchronised motion and index-homing. + - (bit, in) (bit, out) hm2_XXXX.N.ssi.MM..reset. + + (bool, io) ..reset. + When this pin is set high the counts and position pins are zeroed. h: (Split encoder, high-order bits):: Some encoders (Including Fanuc) place the encoder part-turn counts and full-turn counts in separate, non-contiguous fields. @@ -514,9 +522,9 @@ m: (Multi-turn):: Two parameters are universally created for all SSI instances -hm2_XXXX.N.ssi.MM.frequency-khz (float r/w):: + .frequency-khz (real, rw):: This parameter sets the SSI clock frequency. The units are kHz, so 500 will give a clock frequency of 500,000 Hz. -hm2_XXXX.N.ssi.timer-number-num (s32 r/w):: + .timer-number (uint, rw):: This parameter allocates the SSI module to a specific hm2dpll timer instance. This pin is only of use in firmwares which contain a hm2dpll function and will default to 1 in cases where there is such a @@ -528,16 +536,17 @@ Other parameters depend on the data types specified in the config string. p: (Pad):: No Parameters. b: (Boolean):: No Parameters. u: (Unsigned):: - (float, r/w) hm2_XXXX.N.ssi.MM.-scalemax. + (real, rw) .-scalemax. The scaling factor for the channel. s: (Signed):: - (float, r/w) hm2_XXXX.N.ssi.MM.-scalemax. + (real, rw) .-scalemax. The scaling factor for the channel. f: (bitField):: No parameters. e: (Encoder):: - (float, r/w) hm2_XXXX.N.ssi.MM.__.scale: (float, r.w) The encoder - scale in counts per machine unit. (u32, r/w) - hm2_XXXX.N.ssi.MM.__.counts-per-rev (u32, r/w) Used to emulate the + (real, rw) .__.scale. + The encoder scale in counts per machine unit. + (uint, rw) .__.counts-per-rev. + Used to emulate the index behaviour of an incremental+index encoder. This would normally be set to the actual counts per rev of the encoder, but can be any whole number of revs. Integer divisors or multipliers of the true PPR @@ -549,10 +558,11 @@ e: (Encoder):: BiSS is a bidirectional variant of SSI. Currently only a single direction is supported by LinuxCNC (encoder to PC). - +BiSS pins and parameters use the prefix +**hm2_**__XXXX__**.**__NN__**.biss.**__MM__. One pin is created for each BiSS instance regardless of data format: -hm2_XXXX.NN.biss.MM.data-incomplete (bit, in):: + .data-invalid (bool, out):: This pin will be set "True" if the module was still transferring data when the value was read. When this problem exists there will also be a limited number of error messages printed to the UI. This pin should be used to monitor whether the problem has been addressed by config changes. @@ -572,19 +582,20 @@ there is a requirement to do so. The pins and format specifier for this module are identical to the SSI module described above, except that at least one pre-configured format is provided. A modparam of fanuc_chan_N=AA64 (case sensitive) will -configure the channel for a Fanuc Aa64 encoder. The pins created are: - -hm2___XXXX__._N_.fanuc._MM_.batt:: indicates battery state -hm2___XXXX__._N_.fanuc._MM_.batt-not:: inverted version of above -hm2___XXXX__._N_.fanuc._MM_.comm:: The 0-1023 absolute output for motor commutation -hm2___XXXX__._N_.fanuc._MM_.crc:: The CRC checksum. Currently HAL has no way to use this -hm2___XXXX__._N_.fanuc._MM_.encoder.count:: Encoder counts -hm2___XXXX__._N_.fanuc._MM_.encoder.index-enable:: Simulated index. Set by counts-per-rev parameter -hm2___XXXX__._N_.fanuc._MM_.encoder.position:: Counts scaled by the ...scale parameter -hm2___XXXX__._N_.fanuc._MM_.encoder.rawcounts:: Raw counts, unaffected by reset or index -hm2___XXXX__._N_.fanuc._MM_.encoder.reset:: If high/True then counts and position = 0 -hm2___XXXX__._N_.fanuc._MM_.valid:: Indicates that the absolute position is valid -hm2___XXXX__._N_.fanuc._MM_.valid-not:: Inverted version +configure the channel for a Fanuc Aa64 encoder. The pins use the prefix +**hm2_**__XXXX__**.**__N__**.fanuc.**__MM__ and are: + + .batt_fail (bool, out):: indicates battery state + .batt_fail-not (bool, out):: inverted version of above + .comm (uint, out):: The 0-1023 absolute output for motor commutation + .crc (uint, out):: The CRC checksum. Currently HAL has no way to use this + .encoder.count (sint, out):: Encoder counts + .encoder.index-enable (bool, io):: Simulated index. Set by counts-per-rev parameter + .encoder.position (real, out):: Counts scaled by the ...scale parameter + .encoder.rawcounts (sint, out):: Raw counts, unaffected by reset or index + .encoder.reset (bool, io):: If high/True then counts and position = 0 + .pos_invalid (bool, out):: Indicates that the absolute position is not valid + .pos_invalid-not (bool, out):: Inverted version === resolver @@ -596,25 +607,25 @@ The pins allocated will be listed in the dmesg output, but are unlikely to be us *Pins:* -angle (float, out):: + .angle (real, out):: This pin indicates the angular position of the resolver. It is a number between 0 and 1 for each electrical rotation. -position (float, out):: + .position (real, out):: Calculated from the number of complete and partial revolutions since startup, reset, or index-reset multiplied by the scale parameter. -velocity (float, out):: + .velocity (real, out):: Calculated from the rotational velocity and the velocity-scale parameter. The default scale is electrical rotations per second. -velocity-rpm (float, out):: + .velocity-rpm (real, out):: Simply velocity scaled by a factor of 60 for convenience. -count (s32, out):: + .count (sint, out):: This pins outputs a simulated encoder count at 2^24^ counts per rev (16777216 counts). -rawcounts (s32, out):: + .rawcounts (sint, out):: This is identical to the counts pin, except it is not reset by the "index" or "reset" pins. This is the pin which would be linked to the bldc HAL component if the resolver was being used to commutate a motor. -reset (bit, in):: + .reset (bool, in):: Resets the position and counts pins to zero immediately. -joint-pos-fb (bit, in):: + .joint-pos-fb (real, in):: The Mesa resolver driver has the capability of emulating an absolute encoder using a position file (see the INI-config section of the manual) and the single-turn absolute operation of resolvers. @@ -626,21 +637,21 @@ joint-pos-fb (bit, in):: This should only be used on systems where axis movement in the unpowered state is unlikely. This feature will only work properly if the machine is initially homed to "index" and if the axis home positions are exactly zero. -index-enable (bit, in/out):: + .index-enable (bool, io):: When this pin is set high the position and counts pins will be reset the next time the resolver passes through the zero position. At the same time the pin is driven low to indicate to connected modules that the index has been seen, and that the counters have been reset. -error (bit, out):: + .error (bool, out):: Indicates an error in the particular channel. If this value is "True" then the reported position and velocity are invalid. *Parameters:* -scale (float, read/write):: The position scale, in machine units per resolver electrical revolution. + .scale (real, rw):: The position scale, in machine units per resolver electrical revolution. -velocity-scale (float, read/write):: The conversion factor between resolver rotation speed and machine velocity. + .velocity-scale (real, rw):: The conversion factor between resolver rotation speed and machine velocity. A value of 1 will typically give motor speed in RPS, a value of 0.01666667 will give (approximate) RPM. -index-divisor (default 1) (u32, read/write):: + .index-divisor (default 1) (uint, rw):: The resolver component emulates an index at a fixed point in the sin/cos cycle. Some resolvers have multiple cycles per rev (often related to the number of pole-pairs on the attached motor). LinuxCNC requires an index once per revolution for proper threading etc. @@ -649,7 +660,7 @@ index-divisor (default 1) (u32, read/write):: Do not expect to re-start a thread after restarting LinuxCNC. It is not appropriate to use this parameter for index-homing of axis drives. -excitation-khz (float, read/write):: + .excitation-khz (real, rw):: This pin sets the excitation frequency for the resolver. This pin is module-level rather than instance-level as all resolvers share the same excitation frequency. Valid values are 10 (ca. 10 kHz), 5 (ca. 5 kHz) and 2.5 (ca. 2.5 kHz). @@ -657,12 +668,12 @@ excitation-khz (float, read/write):: The parameter will be set to the closest available of the three frequencies. A value of -1 (the default) indicates that the current setting should be retained. -use-position-file (bit, read/write):: + .use-position-file (bool, rw):: In conjunction with *joint-pos-fb* (qv) emulate absolute encoders. === pwmgen -pwmgens have names like "**hm2_**____**.**____**.pwmgen.**____". +pwmgens have names like **hm2_**____**.**____**.pwmgen.**____. ____ is a two-digit number that corresponds to the HostMot2 pwmgen instance number. There are "num_pwmgens"-many instances, starting with 00. @@ -677,32 +688,32 @@ Each pwmgen instance has the following pins and parameters: *Pins:* -enable (bit input):: + .enable (bool, in):: If True, the pwmgen will set its Not-Enable pin False and output its pulses. If "enable" is False, pwmgen will set its Not-Enable pin True and not output any signals. -value (float input):: + .value (real, in):: The current pwmgen command value, in arbitrary units. *Parameters:* -scale (float rw):: + .scale (real, rw):: Scaling factor to convert "value" from arbitrary units to duty cycle: dc = value / scale. Duty cycle has an effective range of -1.0 to +1.0 inclusive, anything outside that range gets clipped. The default scale is 1.0. -output-type (s32 rw):: + .output-type (sint, rw):: This emulates the output_type load-time argument to the software pwmgen component. This parameter may be changed at runtime, but most of the time you probably want to set it at startup and then leave it alone. Accepted values are 1 (PWM on Out0 and Direction on Out1), 2 (Up on Out0 and Down on Out1), 3 (PDM mode, PDM on Out0 and Dir on Out1), and 4 (Direction on Out0 and PWM on Out1, "for locked antiphase"). -offset-mode (bit input):: + .offset-mode (bool, rw):: When True, offset-mode modifies the PWM behavior so that a PWM value of 0 results in a 50% duty cycle PWM output, a -1 value results in a 0% duty cycle and +1 results in a 100% duty cycle (with default scaling). This mode is used by some PWM motor drives and PWM to analog converters. Typically the direction signal is not used in this mode. -dither (bit input):: + .dither (bool, rw):: When True, dither causes the PWM output to dither between two adjacent PWM register values at the PWM frequency. This increases the PWM resolution when used for analog output purposes, increasing the @@ -713,7 +724,7 @@ dither (bit input):: In addition to the per-instance HAL Parameters listed above, there are a couple of HAL Parameters that affect all the pwmgen instances: -pwm_frequency (u32 rw):: + .pwm_frequency (uint, rw):: This specifies the PWM frequency, in Hz, of all the pwmgen instances running in the PWM modes (modes 1 and 2). This is the frequency of the variable-duty-cycle wave. Its effective range is from 1 Hz up to 386 @@ -725,7 +736,7 @@ pwm_frequency (u32 rw):: the max supported frequency of the board. Frequencies below about 5 Hz are not terribly accurate, but above 5 Hz they're pretty close. The default pwm_frequency is 20,000 Hz (20 kHz). -pdm_frequency (u32 rw):: + .pdm_frequency (uint, rw):: This specifies the PDM frequency, in Hz, of all the pwmgen instances running in PDM mode (mode 3). This is the "pulse slot frequency"; the frequency at which the pdm generator in the AnyIO board chooses @@ -748,7 +759,7 @@ Three-Phase PWM generators (3pwmgens) are intended for controlling the high-side and low-side gates in a 3-phase motor driver. The function is included to support the Mesa motor controller daughter-cards but can be used to control an IGBT or similar driver directly. 3pwmgens have names -like "hm2_____.____.3pwmgen.____" where +like **hm2_**____**.**____**.3pwmgen.**____ where ____ is a 2-digit number. There will be num_3pwmgens instances, starting at 00. Each instance allocates 7 output and one input pins on the Mesa card connectors. Outputs are: PWM A, PWM B, PWM C, /PWM A, /PWM @@ -762,24 +773,24 @@ Note that 0 corresponds to a 50% duty cycle and this is the initialization value *Pins:* -A-value, B-value, C-value (float input):: + .A-value, .B-value, .C-value (real, in):: The PWM command value for each phase, limited to +/- "scale". Defaults to zero which is 50% duty cycle on high-side and low-sidepins (but see the "deadtime" parameter). -enable (bit input):: + .enable (bool, in):: When high the PWM is enabled as long as the fault bit is not set by the external fault input pin. When low the PWM is disabled, with both high- side and low-side drivers low. This is not the same as 0 output (50% duty cycle on both sets of pins) or negative full scale (where the low side drivers are "on" 100% of the time). -fault (bit output):: + .fault (bool, out):: Indicates the status of the fault bit. This output latches high once set by the physical fault pin until the "enable" pin is set to high. *Parameters:* -deadtime (u32 rw):: + .deadtime (uint, rw):: Sets the dead-time between the high-side driver turning off and the low-side driver turning on and vice-versa. Deadtime is subtracted from on time and added to off time symmetrically. For example with 20 kHz PWM (50 µs period), 50% duty cycle and zero dead time, @@ -788,14 +799,14 @@ deadtime (u32 rw):: The value is specified in nanoseconds (ns) and defaults to a rather conservative 5000 ns. Setting this parameter to too low a value could be both expensive and dangerous as if both gates are open at the same time there is effectively a short circuit across the supply. -scale (float rw):: + .scale (real, rw):: Sets the half-scale of the specified 3-phase PWM generator. PWM values from -scale to +scale are valid. Default is +/- 1.0 -fault-invert (bit rw):: + .fault-invert (bool, rw):: Sets the polarity of the fault input pin. A value of 1 means that a fault is triggered with the pin high, and 0 means that a fault it triggered when the pin is pulled low. Default 0, fault = low so that the PWM works with the fault pin unconnected. -sample-time (u32 rw):: + .sample-time (real, rw):: Sets the time during the cycle when an ADC pulse is generated. 0 = start of PWM cycle and 1 = end. Not currently useful to LinuxCNC. Default is 0.5. @@ -803,7 +814,7 @@ sample-time (u32 rw):: In addition the per-instance parameters above there is the following parameter that affects all instances: -frequency (u32 rw):: Sets the master PWM frequency. + .frequency (uint, rw):: Sets the master PWM frequency. Maximum is approx 48 kHz, minimum is 1 kHz. Defaults to 20 kHz. === oneshot @@ -814,30 +825,30 @@ oneshot module includes 2 timers to allow variable pulse delays for applications like phase control. Trigger sources can be software, external inputs, the DPLL timer, a built in rate generator or the other timer. Oneshots have names like -"**hm2_**____**.**____**.oneshot.**____" +**hm2_**____**.**____**.oneshot.**____ where ____ is a 2-digit number. There will be num_oneshots instances, starting at 00. Each instance allocates up to two input and two output pins. *Pins:* -width1 (float rw):: + .width1 (real, in):: Sets the pulse width of timer1 in ms. Default is 1 ms (1/1000 s). -width2 (float rw):: + .width2 (real, in):: Sets the pulse width of timer2 in ms. Default is 1 ms (1/1000 s). -filter1 (float rw):: + .filter1 (real, in):: Sets digital filter time constant for timer1's external trigger input Filter time is in ms. Default filter time constant time is 0.1 ms. External trigger response will be delayed by the filter time setting. -filter2 (float rw):: + .filter2 (real, in):: Sets digital filter time constant for timer2's external trigger input Filter time is in ms. Default filter time constant time is 0.1 ms. External trigger response will be delayed by the filter time setting. -rate (float rw):: + .rate (real, in):: Sets the frequency of the built in rate generator (in Hz) -trigger_select1,trigger_select2 (u32 rw):: + .trigger_select1, .trigger_select2 (uint, in):: Sets the trigger source for timer1,timer2 respectively. Trigger sources are: - ++ .... 0 Trigger disabled 1 Software trigger: triggered when hal pin swtrigger1 is true @@ -848,25 +859,25 @@ trigger_select1,trigger_select2 (u32 rw):: 6 Timer2 trigger: triggered by timer2 output .... -trigger_on_rise1, trigger_on_rise2 (bit rw):: + .trigger_on_rise1, .trigger_on_rise2 (bool, in):: When true, triggers timer1, timer2 respectively on the rising edge of the trigger source. -trigger_on_fall1, trigger_on_fall2 (bit rw):: + .trigger_on_fall1, .trigger_on_fall2 (bool, in):: When true, triggers timer1, timer2 respectively on the falling edge of the trigger source. -retriggerable1, retriggerable2 (bit rw):: + .retriggerable1, .retriggerable2 (bool, in):: When true, the associated timer is retriggerable, meaning the timer will reset to full time on a trigger event even during the output pulse period. When false the timer is not retriggerable, meaning it will ignore trigger events during the output pulse period. -enable1, enable2 (bit rw):: + .enable1, .enable2 (bool, in):: Trigger enable for timer1 and timer2 respectively True to enable. -reset1, reset2 (bit rw):: + .reset1, .reset2 (bool, in):: If true, resets timer1 and timer2 respectively, aborting any pulse in progress. -out1,out2 (bit ro):: + .out1, .out2 (bool, out):: Pulse output status bits for timer1 and timer2. -exttrigger1, exttrigger2 (bit ro):: + .exttrigger1, .exttrigger2 (bool, out):: External trigger input status bits for timer1 and timer2. These monitor the filtered inputs. -swtrigger1, swtrigger2 (bit rw):: + .swtrigger1, .swtrigger2 (bool, in):: Software trigger inputs to trigger timer1 and timer2. === periodm @@ -877,43 +888,43 @@ average readings for noise filtering. *Pins:* -period_us (float r):: + .period_us (real, out):: Input period in microseconds. -width_us (float r):: + .width_us (real, out):: Input pulse width in microseconds. -duty_cycle (float r):: + .duty_cycle (real, out):: Input duty cycle (width/period) scaling and offset are changeable. -duty_cycle_scale (float rw):: + .duty_cycle_scale (real, in):: Sets the scale of the duty cycle value, default is 100. -duty_cycle_offset (float rw):: + .duty_cycle_offset (real, in):: Sets an offset to the duty cycle value, added after scaling. Default is 0. -averages (float rw):: Number of periods/widths to average. + .averages (uint, io):: Number of periods/widths to average. From 1 to 4095. Update rate of period, width, duty cycle, and frequency will be input frequency/averages. -frequency (float r):: Input frequency in Hz. + .frequency (real, out):: Input frequency in Hz. -minimum_frequency (float w):: Minimum input frequency in Hz, + .minimum_frequency (real, in):: Minimum input frequency in Hz, if input frequency is lower than this threshold, the valid bit will be cleared. -filtertc_us (float w):: + .filtertc_us (real, in):: The periodm input in conditioned with a digital filter for noise rejection. The time constant of this filter is settable via this pin in units of microseconds. Pulses shorter than this time constant will not be recognized. -valid (bit out):: + .valid (bool, out):: The valid output bit is true when the input signal is present and the input frequency exceeds the minimum frequency setting. -invert (bit in):: + .invert (bool, io):: The invert bit sets the input polarity, when false, the input is direct which means the input high time determines the width. When set true, the input is inverted so the input low time determines the width. -input_status (bit out):: + .input_status (bool, out):: The input_status bit reads the real time filtered input status (affected by invert pin). === rcpwmgen The rcpwmgen is a simple PWM generator optimized for use with standard RC servos that use pulse width to determine position. rcpwmgens have -names like "**hm2_**__**.**__**.rcpwmgen.**__" where +names like **hm2_**____**.**____**.rcpwmgen.**____ where __ is a 2-digit number. There will be __num_rcpwmgens__-many instances, starting at 00. Each instance allocates a single output pin. Unlike the standard PWM generator, @@ -923,18 +934,18 @@ Resolution is approximately 1/2000 for standard 1 to 2 ms range RC servos. *Pins:* -rate (float rw):: Sets the master RC PWM frequency. + .rate (real, in):: Sets the master RC PWM frequency. Maximum is 1 kHz, minimum is 0.01 Hz. Defaults to 50 Hz. -width (float rw):: Sets the per channel pulse width in (ms/scale). -offset (float rw):: Sets the per channel pulse width offset in ms. + .width (real, in):: Sets the per channel pulse width in (ms/scale). + .offset (real, in):: Sets the per channel pulse width offset in ms. This would be set to 1.5 ms for 1-2 ms servos for a 0 center position. -scale (float rw):: Sets the per channel pulse width scaling. + .scale (real, in):: Sets the per channel pulse width scaling. For example, setting the scale to 90 and the offset to 1.5 ms would result in a position range of +-45 degrees and scale in degrees for 1-2 ms servos with a full motion range of 90 degrees. === stepgen -stepgens have names like "**hm2_**__**.**__**.stepgen.**__". +stepgens have names like **hm2_**____**.**____**.stepgen.**____. ____ is a two-digit number that corresponds to the HostMot2 stepgen instance number. There are "num_stepgens"-many instances, starting with 00. @@ -950,74 +961,74 @@ Each stepgen instance has the following pins and parameters: *Pins:* -position-cmd (float input):: Target position of stepper motion, in arbitrary position units. + .position-cmd (real, in):: Target position of stepper motion, in arbitrary position units. This pin is only used when the stepgen is in position control mode (control-type=0). -velocity-cmd (float input):: + .velocity-cmd (real, in):: Target velocity of stepper motion, in arbitrary position units per second. This pin is only used when the stepgen is in velocity control mode (control-type=1). -counts (s32 output):: Feedback position in counts (number of steps). + .counts (sint, out):: Feedback position in counts (number of steps). -position-fb (float output):: Feedback position in scaled position units. + .position-fb (real, out):: Feedback position in scaled position units. This is similar to "counts/position_scale", but has finer than step resolution. -position-latched (float output):: latched-position in scaled position units. + .position-latch (real, out):: latched-position in scaled position units. This is similar to "counts/position_scale", but has finer than step resolution. -velocity-fb (float output):: Feedback velocity in arbitrary position units per second. + .velocity-fb (real, out):: Feedback velocity in arbitrary position units per second. -enable (bit input):: This pin enables the step generator instance. + .enable (bool, in):: This pin enables the step generator instance. When True, the stepgen instance works as expected. When False, no steps are generated and velocity-fb goes immediately to 0. If the stepgen is moving when enable goes False it stops immediately, without obeying the maxaccel limit. -position-reset (bit input):: Resets position to 0 when True. + .position-reset (bool, in):: Resets position to 0 when True. Useful for step/dir controlled spindles when switching between spindle and joint modes. -control-type (bit input):: + .control-type (bool, in):: Switches between position control mode (0) and velocity control mode (1). Defaults to position control (0). -index-enable (bit in/out):: + .index-enable (bool, io):: When this pin is set to True, the step count (and therefore also position) are reset to zero on the next stepgen index pulse. At the same time, index-enable is reset to zero to indicate that the pulse has occurred. -index-invert (bit r/w):: + .index-invert (bool, in):: If set to True, the rising edge of the index input pin triggers the position clear event (if index-enable is True). If set to False, the falling edge triggers. -probe-enable (bit in/out):: + .probe-enable (bool, io):: When this pin is set to True, the step count (and therefore also position) are latched on the the next stepgen probe active edge. At the same time, probe-enable is reset to zero to indicate that a latch event has occurred. -probe-invert (bit r/w):: + .probe-invert (bool, in):: If set to True, the rising edge of the probe input pin triggers the latch event (if probe-enable is True). If set to False, the falling edge triggers. *Parameters:* -position-scale (float r/w):: + .position-scale (real, rw):: Converts from counts to position units. position = counts / position_scale -maxvel (float r/w):: + .maxvel (real, rw):: Maximum speed, in position units per second. If set to 0, the driver will always use the maximum possible velocity based on the current step timings and position-scale. The max velocity will change if the step timings or position-scale changes. Defaults to 0. -maxaccel (float r/w):: + .maxaccel (real, rw):: Maximum acceleration, in position units per second per second. Defaults to 1.0. If set to 0, the driver will not limit its acceleration at all. This requires that the position-cmd or velocity-cmd pin is driven in a way that does not exceed the machine's capabilities. This is probably what you want if you are going to be using the LinuxCNC trajectory planner to jog or run G-code. -steplen (u32 r/w):: + .steplen (uint, rw):: Duration of the step signal, in nanoseconds. -stepspace (u32 r/w):: + .stepspace (uint, rw):: Minimum interval between step signals, in nanoseconds. -dirsetup (u32 r/w):: + .dirsetup (uint, rw):: Minimum duration of stable Direction signal before a step begins, in nanoseconds. -dirhold (u32 r/w):: + .dirhold (uint, rw):: Minimum duration of stable Direction signal after a step ends, in nanoseconds. -step_type (u32 r/w):: + .step_type (uint, rw):: Output format, like the step_type modparam to the software stepgen(9) component: 0 = Step/Dir, 1 = Up/Down, 2 = Quadrature, 3+ = table-lookup mode. In this mode the step_type parameter determines how long the step sequence is. @@ -1034,18 +1045,19 @@ cycle (00 → 01 → 11 → 10 → 00) for each "step" it takes, so the scale must be divided by 4 relative to standard step/dir. In table mode, up to 6 I/O pins are individually controlled in an arbitrary sequence up to 16 phases long. -swap_step_dir (bit input):: + .swap_step_dir (bool, rw):: This swaps the step and direction outputs on the selected stepgen. This parameter is only available if the firmware supports this option. -table-data-__N__ (u32 r/w):: + .table-data-__N__ (uint, rw):: There are 4 table-data-__N__ parameters, table-data-0 to table-data-3. These each contain 4 bytes corresponding to 4 stages in the step sequence. For example table-data-0 = 0x00000001 would set stepgen pin 0 (always called "Step" in the dmesg output) on the first phase of the step sequence, and table-data-4 = 0x20000000 would set stepgen pin 6 ("Table5Pin" in the dmesg output) on the 16th stage of the step sequence. -hm2_XXXX.__N.__stepgen.timer-number (default: -1) (s32 r/w):: + .timer-number (default: -1) (sint, in):: Sets the hm2dpll timer instance to be used to latch stepgen counts. + This pin is global to the stepgen module and has no instance number in the name. A setting of -1 does not latch stepgen counts. A setting of 0 latches at the same time as the main hostmot2 read. A setting of 1..4 uses a time offset from the main hostmot2 read @@ -1069,7 +1081,7 @@ Mesa 8i20 2.2 kW 3-phase drive or 7I64 48-way I/O cards to be connected to a sin The driver auto-detects the connected hardware port, channel and device type. Devices can be connected in any order to any active channel of an active port (see the config modparam definition above). -For full details of the smart-serial devices see *sserial*(9). +For full details of the smart-serial devices see sserial(9). === BSPI @@ -1107,14 +1119,14 @@ that exposes this flexibility. I/O pins that are owned by an active module instance are constrained by the requirements of the owning module, and have a restricted HAL interface. -GPIOs have names like "**hm2_**____**.**____**.gpio.**____". +GPIOs have names like **hm2_**____**.**____**.gpio.**____. ____ is a three-digit number. The mapping from ____ to connector and pin-on-that-connector is written to the syslog when the driver loads, and it is documented in Mesa's manual for the Anything I/O boards. So, for example, the HAL pin that has the current inverted input value read from GPIO 012 of the second 7I43 board is: -`hm2_7i43.1.gpio.012.in-not` (this assumes that the firmware in that board +`hm2_7i43.1.gpio.012.in_not` (this assumes that the firmware in that board is configured so that this HAL object is available). The HAL parameter that controls whether the last GPIO of the first 5I22 @@ -1126,16 +1138,16 @@ Digital Outputs described in the Canonical Device Interface (part of the HAL General Reference document). Each GPIO can have the following HAL Pins: -in & in_not (bit out):: + .in, .in_not (bool, out):: State (normal and inverted) of the hardware input pin. Both full GPIO pins and I/O pins used as inputs by active module instances have these pins. -out (bit in):: + .out (bool, in):: Value to be written (possibly inverted) to the hardware output pin. Only full GPIO pins have this pin. Each GPIO can have the following Parameters: -is_output (bit r/w):: + .is_output (bool, rw):: If set to 0, the GPIO is an input. The I/O pin is put in a high-impedance state (weakly pulled high), to be driven by other devices. The logic value on the I/O pin is available in the "in" and @@ -1143,7 +1155,7 @@ is_output (bit r/w):: parameter is set to 1, the GPIO is an output; its behavior then depends on the "is_opendrain" parameter. Only full GPIO pins have this parameter. -is_opendrain (bit r/w):: + .is_opendrain (bool, rw):: This parameter only has an effect if the "is_output" parameter is True. If this parameter is False, the GPIO behaves as a normal output pin: The I/O pin on the connector is driven to the value specified by @@ -1156,7 +1168,7 @@ is_opendrain (bit r/w):: resulting value on the I/O pin is available on the "in" and "in_not" pins. Only full GPIO pins and I/O pins used as outputs by active module instances have this parameter. -invert_output (bit r/w):: + .invert_output (bool, rw):: This parameter only has an effect if the "is_output" parameter is True. If this parameter is True, the output value of the GPIO will be the inverse of the value on the "out" HAL pin. Only full GPIO pins and @@ -1184,8 +1196,8 @@ pins 0 through 7. MPG A,B inputs use the filter time constants programmed for inputs 0..7. Each inm/inmux input pin can have a slow or fast filter constant. Filter time constants are specified in units of scan times. inms have names like -"**hm2_**__**.**__**.inm.**__". inmuxes have names -like "**hm2_**__**.**__**.inmux.**__". +**hm2_**____**.**____**.inm.**____. inmuxes have names +like **hm2_**____**.**____**.inmux.**____. "Instance" is a two-digit number that corresponds to the HostMot2 inm or inmux instance number. There are "num_inms" or numx_inmuxs" instances, starting with 00. @@ -1194,32 +1206,34 @@ identical except for pin names and the physical interface. *Pins:* -input and input-not (bit out):: True and inverted filtered input states. -raw-input and raw-input-not (bit out):: True and inverted unfiltered input states. -input-slow (bit in):: + .input-__MM__ (bool, out):: Filtered input state. + .input-__MM__-not (bool, out):: Inverted filtered input state. + .raw-input-__MM__ (bool, out):: Unfiltered input state. + .raw-input-__MM__-not (bool, out):: Inverted unfiltered input state. + .input-__MM__-slow (bool, in):: If True, selects the long time constant filter for the corresponding - input bit, if False the short time constant is used. + input, if False the short time constant is used. -enc0-count,enc1-count,enc2-count,enc3-count (s32 out):: + .enc0-count, .enc1-count, .enc2-count, .enc3-count (sint, out):: MPG counters 0 through 3. -enc0-reset,enc1-reset,enc2-reset,enc3-reset (bit in):: + .enc0-reset, .enc1-reset, .enc2-reset, .enc3-reset (bool, in):: Reset for MPG counters 0 through 3, count is forced to 0 if true. *Parameters:* -scan_rate (u32 in):: + .scan_rate (uint, rw):: This sets the input scan rate in Hz. Default scan rate is 20 kHz (50 µs scan period). -fast_scans (u32 in):: + .fast_scans (uint, rw):: This sets the fast time constant for all input pins. - This is the time constant used when the input-slow pin for the corresponding input is False. + This is the time constant used when the .input-__MM__-slow pin for the corresponding input is False. The range is 0 to 63 scan periods and the default value is 5 = 250 µs at the default 20 kHz scan_rate. -slow_scans (u32 in):: + .slow_scans (uint, rw):: This sets the slow time constant for all input pins. - This is the time constant used when the input-slow pin for the corresponding input is True. + This is the time constant used when the .input-__MM__-slow pin for the corresponding input is True. The range is 0 to 1023 scan periods and the default value is 500 = 25 ms at the default 20 kHz scan_rate. -enc0_4xmode, enc1_4xmode, enc2_4xmode, and enc3_4xmode (bit in):: + .enc0_4xmode, .enc1_4xmode, .enc2_4xmode, and .enc3_4xmode (bool, rw):: These set the MPG encoder operating modes to 4X when True and 1X when False. -scan_width (u32 out):: + .scan_width (uint, ro):: This read only parameter specifies the number of inputs scanned by the module. === led @@ -1228,13 +1242,13 @@ Creates HAL pins for the LEDs on the FPGA board. *Pins:* -**CR**____ (bit in):: + .**CR**____ (bool, in):: The pins are numbered from CR01 upwards with the name corresponding to the PCB silkscreen. Setting the bit to "True" or 1 lights the LED. === Solid State Relay -SSRs have names like "**hm2_**__**.**__**.ssr.**__". +SSRs have names like **hm2_**____**.**____**.ssr.**____. _Instance_ is a two-digit number that corresponds to the HostMot2 SSR instance number. There are __num_ssrs__ instances, starting with 00. @@ -1242,17 +1256,17 @@ Each instance has a rate control pin and between 1 and 32 output pins. **Pins:** -rate (u32 in):: + .rate (uint, in):: Set the internal frequency of the SSR instance, in Hz (approximate). The valid range is 25 kHz to 25 MHz. Values below the minimum will use the minimum, and values above the max will use the max. 1 MHz is a typical value, and appropriate for all Mesa cards, and is the default. Set to 0 to disable this SSR instance. -out-NN (bit in):: + .out-NN (bool, in):: The state of this SSR instance's NNth output. Set to 0 to make the output pins act like an open switch (no connection), set to 1 to make them act like a closed switch. -invert-NN (bit in):: + .invert-NN (bool, in):: Inverts the state of this SSR instance's NNth output, defaults to 0. When invert-NN is set to 1, SSR output NN is closed when the out-NN pin is 0 and open when the out-NN pin is 1. @@ -1260,7 +1274,7 @@ invert-NN (bit in):: === OutM Simple output module OutMs have names like -"**hm2_**__**.**__**.OutM.**__". _Instance_ is a +**hm2_**____**.**____**.outm.**____. _Instance_ is a two-digit number that corresponds to the HostMot2 OutM instance number. There are __num_outms__ instances, starting with 00. @@ -1268,11 +1282,11 @@ Each instance has between 1 and 32 output pins. **Pins:** -out-NN (bit in):: + .out-NN (bool, in):: The sets the state of this OutM instance's NNth output. Normally the output pin follows the state of this pin but may be inverted by the invert-nn HAL pin. -invert-NN (bit in):: + .invert-NN (bool, in):: Inverts the state of the this OutM instance's NNth output, defaults to 0. When invert-NN is set to 1, OutM output NN is high when the out-NN pin is 0 and low when the out-NN pin is 1. @@ -1281,45 +1295,44 @@ invert-NN (bit in):: The xy2mod is a xy2-100 galvanometer interface. It supports 16 and 18 bit data modes and includes parabolic interpolation to provide position -updates between servo thread invocations. +updates between servo thread invocations. xy2mod pins use the prefix +**hm2_**____**.**____**.xy2mod.**____. **Pins:** -posx_cmd, posy_cmd (float in):: X and Y position commands. - Full scale is +-posn_scale default full scale (set by posx_scale and posy_scale) is +- 1 -posx_fb, posy_fb (float out):: X and Y position feedback. + .posx-cmd, .posy-cmd (real, in):: X and Y position commands. + Full scale is +-posn_scale default full scale (set by posx-scale and posy-scale) is +- 1 + .posx-fb, .posy-fb (real, out):: X and Y position feedback. Full scale is +-posN_scale default full scale is +- 1. This is feedback from the interpolator not the galvanometer. -velx_cmd, vely_cmd (float in):: X and Y velocity commands in units of fullscale_position/second -velx_fb, vely_fb (float out):: X and Y velocity feedback in units of fullscale_position/second -accx_cmd, accy_cmd (float in):: X and Y acceleration commands in units of fullscale_position/second^2^ -posx_scale, posy_scale (float in):: This sets the full scale range of the position command and feedback, default is +- 1.0. -enable (bit in):: + .velx-cmd, .vely-cmd (real, in):: X and Y velocity commands in units of fullscale_position/second + .velx-fb, .vely-fb (real, out):: X and Y velocity feedback in units of fullscale_position/second + .accx-cmd, .accy-cmd (real, in):: X and Y acceleration commands in units of fullscale_position/second^2^ + .posx-scale, .posy-scale (real, in):: This sets the full scale range of the position command and feedback, default is +- 1.0. + .enable (bool, in):: When False, output data is 0, all interpolator values are set to 0 and overflow flags are cleared. Must be True for normal operation. -controlx, controly (u32 in):: These set the galvanometer control bits. + .controlx, .controly (uint, in):: These set the galvanometer control bits. There 3 bits per channel in 16 bit mode but just 1 control bit in 18 bit mode, so values from 0..7 are valid in 16 bit mode but only 0 and 4 are valid in 18 bit mode. -commandx, commandy (u32 in):: + .commandx, .commandy (uint, in):: These set the raw 16 bit data sent to the galvanometer in command mode. -commandmodex, commandmodey (bit in):: + .commandmodex, .commandmodey (bool, in):: When set, these enable the command mode where 16 bit command data is sent to the galvanometer. -18bitmodex, 18bitmodey (bit in):: + .18bitmodex, .18bitmodey (bool, in):: When True, these enable the 18 bit data mode for the respective channel. -posx-overflow, posy-overflow (bit out):: + .posx-overflow, .posy-overflow (bool, out):: When true, these indicate an attempted position move beyond the full scale value. -velx-overflow, vely-overflow (bit out):: + .velx-overflow, .vely-overflow (bool, out):: When True, these indicate an attempted velocity update move beyond the full scale value. -status (u32 out):: Raw 16 bit return status from galvanometer. - -*Parameters:* + .status (uint, out):: Raw 16 bit return status from galvanometer. -read-timer-number (s32 in):: + .read-timer-number (sint, in):: Selects the DPLL timer number for pre-read sampling of the position and velocity registers. If set to -1, pre-read sampling is disabled. -write-timer-number (s32 in):: + .write-timer-number (sint, in):: Selects the DPLL timer number for post write update of the position and velocity registers. If set to -1, post write update is disabled. @@ -1327,7 +1340,7 @@ write-timer-number (s32 in):: The HostMot2 firmware may include a watchdog Module; if it does, the hostmot2 driver will use it. The HAL representation of the watchdog is -named "**hm2_**__**.**__**.watchdog**". +named **hm2_**____**.**____**.watchdog**. The watchdog starts out asleep and inactive. Once you access the board the first time by running the hm2 write() HAL function (see below), the @@ -1349,14 +1362,14 @@ If the firmware includes a watchdog, the following HAL objects will be exported: *Pins:* -has_bit (bit in/out):: + .has_bit (bool, io):: True if the watchdog has bit, False if the watchdog has not bit. If the watchdog has bit and the has_bit bit is True, the user can reset it to False to resume operation. *Parameters:* -timeout_ns (u32 read/write):: + .timeout_ns (uint, rw):: Watchdog timeout, in nanoseconds. This is initialized to 5,000,000 (5 milliseconds) at module load time. If more than this amount of time passes between calls to the hm2 write() function, the watchdog will bite. @@ -1365,27 +1378,27 @@ timeout_ns (u32 read/write):: If the "enable_raw" config keyword is specified, some extra debugging pins are made available in HAL. The raw mode HAL pin names begin with -"**hm2_**__**.**__**.raw**". +**hm2_**____**.**____**.raw**. With Raw mode enabled, a user may peek and poke the firmware from HAL, and may dump the internal state of the hostmot2 driver to the syslog. *Pins:* -read_address (u32 in):: + .read_address (uint, in):: The bottom 16 bits of this is used as the address to read from. -read_data (u32 out):: + .read_data (uint, out):: Each time the hm2_read() function is called, this pin is updated with the value at .read_address. -write_address (u32 in):: + .write_address (uint, in):: The bottom 16 bits of this is used as the address to write to. -write_data (u32 in):: + .write_data (uint, in):: This is the value to write to .write_address. -write_strobe (bit in):: + .write_strobe (bool, in):: Each time the hm2_write() function is called, this pin is examined. If it is True, then value in .write_data is written to the address in .write_address, and .write_strobe is set back to False. -dump_state (bit in/out):: This pin is normally False. If it gets set to True, + .dump_state (bool, io):: This pin is normally False. If it gets set to True, the hostmot2 driver will write its representation of the board's internal state to the syslog, and set the pin back to False. @@ -1395,7 +1408,7 @@ See setsserial(9) for the current way to set smart-serial eeprom parameters. == FUNCTIONS -**hm2_**__**.**__**.read-request**:: +**hm2_**____**.**____**.read-request**:: On boards with long turn around time for reads (at the time of writing, this applies only to ethernet boards), this function sends a read request. When multiple boards are used, this can reduce the servo @@ -1411,25 +1424,25 @@ addf hm2_7i80.1.read which causes the read request to be sent to board 1 before waiting for the response to the read request to arrive from board 0. -**hm2_**__**.**__**.read**:: +**hm2_**____**.**____**.read**:: This reads the encoder counters, stepgen feedbacks, and GPIO input pins from the FPGA. -**hm2_**__**.**__**.write**:: +**hm2_**____**.**____**.write**:: This updates the PWM duty cycles, stepgen rates, and GPIO outputs on the FPGA. Any changes to configuration pins such as stepgen timing, GPIO inversions, etc., are also effected by this function. -**hm2_**__**.**__**.read_gpio**:: +**hm2_**____**.**____**.read_gpio**:: Read the GPIO input pins. Note that the effect of this function is a subset of the effect of the .read() function described above. Normally only .read() is used. The only reason to call this function is if you want to do GPIO things in a faster-than-servo thread. (This function is not available on the 7I43 due to limitations of the EPP bus.) -**hm2_**__**.**__**.write_gpio**:: +**hm2_**____**.**____**.write_gpio**:: Write the GPIO control registers and output pins. Note that the effect of this function is a subset of the effect of the .write() function described above. Normally only .write() is used. The only reason to call this function is if you want to do GPIO things in a faster-than-servo thread. (This function is not available on the 7I43 due to limitations of the EPP bus.) -**hm2_**__**.**__**.trigger-encoders**:: +**hm2_**____**.**____**.trigger-encoders**:: This function will only appear if the firmware contains a BiSS, Fanuc or SSI encoder module and if the firmware does not contain a hm2dpll module (qv) or if the modparam contains num_dplls=0. @@ -1444,7 +1457,7 @@ the response to the read request to arrive from board 0. == SEE ALSO -hm2_pci(9), hm2_eth(9), hm2_spi(9), hm2_rpspi(9), hm2_7i43(9), hm2_7i90(9) +sserial(9), hm2_pci(9), hm2_eth(9), hm2_spi(9), hm2_rpspi(9), hm2_7i43(9), hm2_7i90(9) Mesa's documentation for the Anything I/O boards, at https://www.mesanet.com. diff --git a/docs/src/man/man9/sserial.9.adoc b/docs/src/man/man9/sserial.9.adoc index a8c7a8ac583..ce6232d1e1b 100644 --- a/docs/src/man/man9/sserial.9.adoc +++ b/docs/src/man/man9/sserial.9.adoc @@ -28,11 +28,12 @@ channel port, but this is not necessarily always the case. == PORTS In addition to the per-channel/device pins detailed below there are -three per-port pins and three parameters. +three per-port pins and three parameters. These use the prefix +**hm2_**____**.**____**.sserial.port-**__N__. *Pins:* -.sserial.port-__N__.run (bit, in):: Enables the specific Smart Serial module. + .run (bool, in):: Enables the specific Smart Serial module. Setting this pin low will disable all boards on the port and puts the port in a pass-through mode where device parameter setting is possible. It is necessary to toggle the state of this pin if there is a @@ -41,20 +42,20 @@ three per-port pins and three parameters. However, toggling the pin low-to-high will re-enable a faulted drive, so the pin could usefully be connected to the `iocontrol.0.user-enable-out` pin. -.run_state (u32, ro):: Shows the state of the sserial communications state-machine. + .port_state (uint, out):: Shows the state of the sserial communications state-machine. This pin will generally show a value of 0x03 in normal operation, 0x07 in setup mode and 0x00 when the "run" pin is false. -.error-count (u32, ro):: Indicates the state of the Smart Serial error handler, see the parameters section for more details. + .fault-count (uint, out):: Indicates the state of the Smart Serial error handler, see the parameters section for more details. *Parameters:* -.fault-inc (u32 r/w):: Any over-run or handshaking error in the + .fault-inc (uint, rw):: Any over-run or handshaking error in the SmartSerial communications will increment the .fault-count pin by the amount specified by this parameter. Default = 10. -.fault-dec (u32 r/w):: Every successful read/write cycle decrements the fault counter by this amount. Default = 1. + .fault-dec (uint, rw):: Every successful read/write cycle decrements the fault counter by this amount. Default = 1. -.fault-lim (u32 r/w):: When the fault counter reaches this threshold the + .fault-lim (uint, rw):: When the fault counter reaches this threshold the Smart Serial interface on the corresponding port will be stopped and an error printed in dmesg. Together these three pins allow for control over the degree of fault- tolerance allowed in the interface. The default @@ -89,7 +90,7 @@ The following list of Smart Serial devices is by no means exhaustive. The 8I20 is a 2.2 kW three-phase drive for brushless DC motors and AC servo motors. 8I20 pins and parameters have names like -"hm2___.__.8i20.__.__.__", +**hm2_**____**.**____**.8i20.**____**.**____, for example "hm2_5i23.0.8i20.1.3.current" would set the phase current for the drive connected to the fourth channel of the second sserial port of the first 5I23 board. Note that the sserial ports do not necessarily @@ -97,7 +98,7 @@ correlate in layout or number to the physical ports on the card. *Pins:* -angle (float in):: + .angle (real, in):: The rotor angle of the motor in fractions of a full *phase* revolution. An angle of 0.5 indicates that the motor is half a turn / 180 degrees / π radians from the zero position. The zero position is taken to be the position that the motor adopts under no load with a @@ -105,90 +106,123 @@ angle (float in):: A 6 pole motor will have 3 zero positions per physical rotation. Note that the 8I20 drive automatically adds the phase lead/lag angle, and that this pin should see the raw rotor angle. There is a HAL module (bldc) which handles the complexity of differing motor and drive types. -current (float, in):: + .current (real, in):: The phase current command to the drive. This is scaled from -1 to +1 for forwards and reverse maximum currents. The absolute value of the current is set by the max_current parameter. -bus-voltage (float, ro):: + .bus-voltage (real, ro):: The drive bus voltage in V. This will tend to show 25.6 V when the drive is unpowered and the drive will not operate below about 50 V. -temp (float, ro):: The temperature of the driver in degrees C. -comms (u32, ro):: The communication status of the drive. See the manual for more details. -status and fault. (bit, ro):: The following fault/status bits are exported. - For further details see the 8I20 manual: + - fault.U-current / fault.U-current-not fault.V-current - / fault.V-current-not fault.W-current / fault.W-current-not - fault.bus-high / fault.bus-high-not fault.bus-overv / - fault.bus-overv-not fault.bus-underv / fault.bus-underv-not - fault.framingr / fault.framingr-not fault.module / fault.module-not - fault.no-enable / fault.no-enable-not fault.overcurrent / - fault.overcurrent-not fault.overrun / fault.overrun-not fault.overtemp - / fault.overtemp-not fault.watchdog / fault.watchdog-not + - + - status.brake-old / status.brake-old-not status.brake-on / - status.brake-on-not status.bus-underv / status.bus-underv-not - status.current-lim / status.current-lim-no status.ext-reset / - status.ext-reset-not status.no-enable / status.no-enable-not - status.pid-on / status.pid-on-not status.sw-reset / status.sw-reset-not - status.wd-reset / status.wd-reset-not + .temp (real, ro):: The temperature of the driver in degrees C. + .comms (uint, ro):: The communication status of the drive. See the manual for more details. + .status.* (bool, ro):: + The following status bits are exported, each with an inverted (-not) companion pin. + For further details see the 8I20 manual: + .brake-old, .brake-old-not;; + Brake has been applied status (sticky). + .brake-on, .brake-on-not;; + Current brake on status. + .bus-underv, .bus-underv-not;; + Bus undervoltage status. + .current-lim, .current-lim-not;; + Indicates that MAXCURRENT is not available due to 8I20 temperature/current limiting. + .ext-reset, .ext-reset-not;; + DSP startup due to external reset (sticky). + .no-enable, .no-enable-not;; + No external enable. + .pid-on, .pid-on-not;; + Current loop PID active. + .sw-reset, .sw-reset-not;; + DSP startup due to software reset (sticky). + .wd-reset, .wd-reset-not;; + DSP startup due to hardware watchdog timeout (sticky). + .fault.* (bool, ro):: + The following fault bits are exported, each with an inverted (-not) companion pin. + When a fault occurs the 8I20 turns off motor drive and the current control loop: + .U-current, .U-current-not;; + U phase current > 125% of MAXCURRENT. + .V-current, .V-current-not;; + V phase current > 125% of MAXCURRENT. + .W-current, .W-current-not;; + W phase current > 125% of MAXCURRENT. + .bus-high, .bus-high-not;; + High motor voltage fault (settable threshold). + .bus-overv, .bus-overv-not;; + High motor voltage fault (fixed at 400 V). + .bus-underv, .bus-underv-not;; + Low motor voltage fault. + .framingr, .framingr-not;; + 8I20 serial port framing error. + .module, .module-not;; + Module over temperature or low gate voltage. + .no-enable, .no-enable-not;; + No external enable fault. + .overcurrent, .overcurrent-not;; + 8I20 high side overcurrent fault. + .overrun, .overrun-not;; + 8I20 serial port overrun error. + .overtemp, .overtemp-not;; + 8I20 PCB temperature > 85 °C. + .watchdog, .watchdog-not;; + Communication timeout fault. *Parameters:*:: The following parameters are exported. See the PDF documentation downloadable from Mesa for further details: -hm2_5i25.0.8i20.0.1.angle-maxlim:: -hm2_5i25.0.8i20.0.1.angle-minlim:: -hm2_5i25.0.8i20.0.1.angle-scalemax:: -hm2_5i25.0.8i20.0.1.current-maxlim:: -hm2_5i25.0.8i20.0.1.current-minlim:: -hm2_5i25.0.8i20.0.1.current-scalemax:: -hm2_5i25.0.8i20.0.1.nvbrakeoffv:: -hm2_5i25.0.8i20.0.1.nvbrakeonv:: -hm2_5i25.0.8i20.0.1.nvbusoverv:: -hm2_5i25.0.8i20.0.1.nvbusundervmax:: -hm2_5i25.0.8i20.0.1.nvbusundervmin:: -hm2_5i25.0.8i20.0.1.nvkdihi:: -hm2_5i25.0.8i20.0.1.nvkdil:: -hm2_5i25.0.8i20.0.1.nvkdilo:: -hm2_5i25.0.8i20.0.1.nvkdp:: -hm2_5i25.0.8i20.0.1.nvkqihi:: -hm2_5i25.0.8i20.0.1.nvkqil:: -hm2_5i25.0.8i20.0.1.nvkqilo:: -hm2_5i25.0.8i20.0.1.nvkqp:: -hm2_5i25.0.8i20.0.1.nvmaxcurrent:: -hm2_5i25.0.8i20.0.1.nvrembaudrate:: -hm2_5i25.0.8i20.0.1.swrevision:: -hm2_5i25.0.8i20.0.1.unitnumber:: - -max_current (float, rw):: Sets the maximum drive current in Amps. + .angle-maxlim:: + .angle-minlim:: + .angle-scalemax:: + .current-maxlim:: + .current-minlim:: + .current-scalemax:: + .nvbrakeoffv:: + .nvbrakeonv:: + .nvbusoverv:: + .nvbusundervmax:: + .nvbusundervmin:: + .nvkdihi:: + .nvkdil:: + .nvkdilo:: + .nvkdp:: + .nvkqihi:: + .nvkqil:: + .nvkqilo:: + .nvkqp:: + .nvmaxcurrent:: + .nvrembaudrate:: + .swrevision:: + .unitnumber:: + + .max_current (real, rw):: Sets the maximum drive current in Amps. The default value is the maximum current programmed into the drive EEPROM. The value must be positive, and an error will be raised if a current in excess of the drive maximum is requested. -serial_number (u32, ro):: The serial number of the connected drive. This is also shown on the label on the drive. + .serial_number (uint, ro):: The serial number of the connected drive. This is also shown on the label on the drive. === 7I64 -The 7I64 is a 24-input 24-output IO card. 7I64 pins and parameters have -names like "hm2____.____.7i64.____.____.____", +The 7I64 is a 24-input 24-output IO card. 7I64 pins and parameters use the prefix +**hm2_**____**.**____**.7i64.**____**.**____, for example `hm2_5i23.0.7i64.1.3.output-01`. *Pins:* -7i64.0.0.output-__NN__ (bit, in):: + .output-__NN__ (bool, in):: Writing a 1 or TRUE to this pin will enable output driver _NN_. Note that the outputs are drivers (switches) rather than voltage outputs. The LED adjacent to the connector on the board shows the status. The output can be inverted by setting a parameter. -7i64.0.0.input-__NN__ (bit, out):: The value of input _NN_. + .input-__NN__ (bool, out):: The value of input _NN_. Note that the inputs are isolated and both pins of each input must be connected, typically to signal and the ground of the signal. (This need not be the ground of the board.) -7i64.0.0.input-__NN__-not (bit, out):: An inverted copy of the corresponding input. -7i64.0.0.analog0 & 7i64.0.0.analog1 (float, out):: The two analogue inputs (0 to 3.3 V) on the board. + .input-__NN__-not (bool, out):: An inverted copy of the corresponding input. + .analog0, .analog1 (real, out):: The two analogue inputs (0 to 3.3 V) on the board. *Parameters:* -7i64.0.0.output-__NN__-invert (bit, rw):: Setting this parameter to 1 / TRUE will invert the output value, + .output-__NN__-invert (bool, rw):: Setting this parameter to 1 / TRUE will invert the output value, such that writing 0 to `.gpio.NN.out` will enable the output and vice-versa. === 7I76 @@ -201,36 +235,36 @@ whereas the smart-serial pins are associated with the 7I76 (`hm2_5i25.0.7i76.0.0 *Pins:* -.7i76.0.0.analog__N__ (modes 1 and 2 only) (float out):: Analogue input values. -.7i76.0.0.fieldvoltage (mode 2 only) (float out):: Field voltage monitoring pin. -.7i76.0.0.spindir (bit in):: This pin provides a means to drive the spindle VFD direction terminals on the 7I76 board. -.7i76.0.0.spinena (bit in):: This pin drives the spindle-enable terminals on the 7I76 board. -.7i76.0.0.spinout (float in):: This controls the analogue output of the 7I76. + .7i76.0.0.analog__N__ (modes 1 and 2 only) (real, out):: Analogue input values. + .7i76.0.0.fieldvoltage (mode 2 only) (real, out):: Field voltage monitoring pin. + .7i76.0.0.spindir (bool, in):: This pin provides a means to drive the spindle VFD direction terminals on the 7I76 board. + .7i76.0.0.spinena (bool, in):: This pin drives the spindle-enable terminals on the 7I76 board. + .7i76.0.0.spinout (real, in):: This controls the analogue output of the 7I76. This is intended as a speed control signal for a VFD. -.7i76.0.0.output-__NN__ (bit out):: (_NN_ = 0 to 15). 16 digital outputs. + .7i76.0.0.output-__NN__ (bool, in):: (_NN_ = 0 to 15). 16 digital outputs. The sense of the signal can be set via a parameter. -.7i76.0.0.input-__NN__ (bit out):: (_NN_ = 0 to 31) 32 digital inputs. -.7i76.0.0.input-__NN__-not (bit in):: (_NN_ = 0 to 31) An inverted copy of the inputs provided for convenience. + .7i76.0.0.input-__NN__ (bool, out):: (_NN_ = 0 to 31) 32 digital inputs. + .7i76.0.0.input-__NN__-not (bool, out):: (_NN_ = 0 to 31) An inverted copy of the inputs provided for convenience. The two complementary pins may be connected to different signal nets. *Parameters:* -.7i76.0.0.nvbaudrate (u32 ro):: Indicates the vbaud rate. This probably should not be altered. -.7i76.0.0.nvunitnumber (u32 ro):: Indicates the serial number of the device and should match a sticker on the card. + .7i76.0.0.nvbaudrate (uint, ro):: Indicates the vbaud rate. This probably should not be altered. + .7i76.0.0.nvunitnumber (uint, ro):: Indicates the serial number of the device and should match a sticker on the card. This can be useful for working out which card is which. -.7i76.0.0.nvwatchdogtimeout (u32 ro):: The sserial remote watchdog timeout. + .7i76.0.0.nvwatchdogtimeout (uint, ro):: The sserial remote watchdog timeout. This is separate from the Anything-IO card timeout. This is unlikely to need to be changed. -.7i76.0.0.output-__NN__-invert (bit rw):: Invert the sense of the corresponding output pin. -.7i76.0.0.spindir-invert (bit rw):: Invert the senseof the spindle direction pin. -.7i76.0.0.spinena-invert (bit rw):: Invert the sense of the spindle-enable pin. -.7i76.0.0.spinout-maxlim (float rw):: The maximum speed request allowable -.7i76.0.0.spinout-minlim (float rw):: The minimum speed request. -.7i76.0.0.spinout-scalemax (float rw):: The spindle speed scaling. + .7i76.0.0.output-__NN__-invert (bool, rw):: Invert the sense of the corresponding output pin. + .7i76.0.0.spindir-invert (bool, rw):: Invert the senseof the spindle direction pin. + .7i76.0.0.spinena-invert (bool, rw):: Invert the sense of the spindle-enable pin. + .7i76.0.0.spinout-maxlim (real, rw):: The maximum speed request allowable + .7i76.0.0.spinout-minlim (real, rw):: The minimum speed request. + .7i76.0.0.spinout-scalemax (real, rw):: The spindle speed scaling. This is the speed request which would correspond to full-scale output from the spindle control pin. For example with a 10 V drive voltage and a 10000 RPM scalemax a value of 10,000 RPM on the spinout pin would produce 10 V output. However, if spinout-maxlim were set to 5000 RPM then no voltage above 5 V would be output. -.7i76.0.0.swrevision (u32 ro):: The onboard firmware revision number. + .7i76.0.0.swrevision (uint, ro):: The onboard firmware revision number. Utilities (man setsserial for details) exist to update and change this firmware. === 7I77 @@ -241,29 +275,29 @@ encoders and further details of them may be found in the hostmot2 manpage. *Pins:* -.7i77.0.0.input-__NN__ (bit out):: (_NN_ = 0 to 31) 32 digital inputs. -.7i77.0.0.input-__NN__-not (bit in):: (_NN_ = 0 to 31) An inverted copy of the inputs provided for convenience. The two complementary pins may be connected to different signal nets. -.7i77.0.0.output-__NN__ (bit out):: (_NN_ = 0 to 15). 16 digital outputs. The sense of the signal can be set via a parameter. -.7i77.0.0.spindir (bit in):: This pin provides a means to drive the spindle VFD direction terminals on the 7I76 board. -.7i77.0.0.spinena (bit in):: This pin drives the spindle-enable terminals on the 7I76 board. -.7i77.0.0.spinout (float in):: This controls the analog output of the 7I77. This is intended as a speed control signal for a VFD. -.7i77.0.1.analogena (bit in):: This pin drives the analog enable terminals on the 7I77 board. -.7i77.0.1.analogout__N__ (float in):: (_N_ = 0 to 5) This controls the analog output of the 7I77. + .7i77.0.0.input-__NN__ (bool, out):: (_NN_ = 0 to 31) 32 digital inputs. + .7i77.0.0.input-__NN__-not (bool, out):: (_NN_ = 0 to 31) An inverted copy of the inputs provided for convenience. The two complementary pins may be connected to different signal nets. + .7i77.0.0.output-__NN__ (bool, in):: (_NN_ = 0 to 15). 16 digital outputs. The sense of the signal can be set via a parameter. + .7i77.0.0.spindir (bool, in):: This pin provides a means to drive the spindle VFD direction terminals on the 7I76 board. + .7i77.0.0.spinena (bool, in):: This pin drives the spindle-enable terminals on the 7I76 board. + .7i77.0.0.spinout (real, in):: This controls the analog output of the 7I77. This is intended as a speed control signal for a VFD. + .7i77.0.1.analogena (bool, in):: This pin drives the analog enable terminals on the 7I77 board. + .7i77.0.1.analogout__N__ (real, in):: (_N_ = 0 to 5) This controls the analog output of the 7I77. *Parameters:* -.7i77.0.0.output-__NN__-invert (bit rw):: Invert the sense of the corresponding output pin. -.7i77.0.0.spindir-invert (bit rw):: Invert the sense of the spindle direction pin. -.7i77.0.0.spinena-invert (bit rw):: Invert the sense of the spindle-enable pin. -.7i77.0.0.spinout-maxlim (float rw):: The maximum speed request allowable -.7i77.0.0.spinout-minlim (float rw):: The minimum speed request. -.7i77.0.0.spinout-scalemax (float rw):: The spindle speed scaling. + .7i77.0.0.output-__NN__-invert (bool, rw):: Invert the sense of the corresponding output pin. + .7i77.0.0.spindir-invert (bool, rw):: Invert the sense of the spindle direction pin. + .7i77.0.0.spinena-invert (bool, rw):: Invert the sense of the spindle-enable pin. + .7i77.0.0.spinout-maxlim (real, rw):: The maximum speed request allowable + .7i77.0.0.spinout-minlim (real, rw):: The minimum speed request. + .7i77.0.0.spinout-scalemax (real, rw):: The spindle speed scaling. This is the speed request which would correspond to full-scale output from the spindle control pin. For example with a 10 V drive voltage and a 10000 RPM scalemax a value of 10000 RPM on the spinout pin would produce 10 V output. However, if spinout-maxlim were set to 5000 RPM then no voltage above 5 V would be output. -.7i77.0.0.analogout__N__-maxlim (float rw):: (_N_ = 0 to 5) The maximum speed request allowable -.7i77.0.0.analogout__N__-minlim (float rw):: (_N_ = 0 to 5) The minimum speed request. -.7i77.0.0.analogout__N__-scalemax (float rw):: (_N_ = 0 to 5) The analog speed scaling. + .7i77.0.0.analogout__N__-maxlim (real, rw):: (_N_ = 0 to 5) The maximum speed request allowable + .7i77.0.0.analogout__N__-minlim (real, rw):: (_N_ = 0 to 5) The minimum speed request. + .7i77.0.0.analogout__N__-scalemax (real, rw):: (_N_ = 0 to 5) The analog speed scaling. This is the speed request which would correspond to full-scale output from the spindle control pin. For example with a 10 V drive voltage and a 10000 RPM scalemax a value of 10000 RPM on the spinout pin would produce 10V output. However, if spinout-maxlim were set to 5000 RPM then no voltage above 5 V would be output. @@ -271,27 +305,34 @@ encoders and further details of them may be found in the hostmot2 manpage. === 7I69 The 7I69 is a 48 channel digital IO card. -It can be configured in four different modes: +7I69 pins and parameters use the prefix +**hm2_**____**.**____**.7i69.**____**.**____. +It can be configured in five different modes: -MODE 0:: Bidirectional mode (48 bits in 48 bits out) -MODE 1:: Input only mode (48 bits in) -MODE 2:: Output only mode (48 bits out) -MODE 3:: 24/24mode (24 bits in = bits 0..23 and 24 bits out = bits 24..47) -MODE 4:: Bidirectional mode (48 bits in 48 bits out) plus 4 MPG encoder channels oninputs 0 through 7 +.Modes +|=== +|Mode |Function + +|0 |Bidirectional mode (48 bits in, 48 bits out) +|1 |Input only mode (48 bits in) +|2 |Output only mode (48 bits out) +|3 |24/24 mode (24 bits in = bits 0..23 and 24 bits out = bits 24..47) +|4 |Bidirectional mode (48 bits in, 48 bits out) plus 4 MPG encoder channels on inputs 0 through 7 +|=== *Pins:* -.7i69.0.0.output-__NN__ (bit in):: Digital output. Sense can be inverted with the corresponding Parameter. -.7i69.0.0.input-__NN__ (bit out):: Digital input -.7i69.0.0.input-__NN__-not (bit out):: Digital input, inverted. + .output-__NN__ (bool, in):: Digital output. Sense can be inverted with the corresponding Parameter. + .input-__NN__ (bool, out):: Digital input + .input-__NN__-not (bool, out):: Digital input, inverted. *Parameters:* -.7i69.0.0.nvbaudrate (u32 ro):: Indicates the vbaud rate. This probably should not be altered. -.7i69.0.0.nvunitnumber (u32 ro):: Indicates the serial number of the device and should match a sticker on the card. This can be useful for working out which card is which. -.7i69.0.0.nvwatchdogtimeout (u32 ro):: The sserial remote watchdog timeout. This is separate from the Anything-IO card timeout. This is unlikely to need to be changed. -.7i69.0.0.output-__NN__-invert (bit rw):: Invert the sense of the corresponding output pin. -.7i69.0.0.swrevision (u32 ro):: The onboard firmware revision number. Utilities exist to update and change this firmware. + .nvbaudrate (uint, ro):: Indicates the vbaud rate. This probably should not be altered. + .nvunitnumber (uint, ro):: Indicates the serial number of the device and should match a sticker on the card. This can be useful for working out which card is which. + .nvwatchdogtimeout (uint, ro):: The sserial remote watchdog timeout. This is separate from the Anything-IO card timeout. This is unlikely to need to be changed. + .output-__NN__-invert (bool, rw):: Invert the sense of the corresponding output pin. + .swrevision (uint, ro):: The onboard firmware revision number. Utilities exist to update and change this firmware. === 7I70 @@ -306,24 +347,31 @@ select different sets of 7I70 data to be transferred between the host and the 7I70 during real time process data exchanges. For high speed applications, choosing the correct mode can reduced the data transfer sizes, resulting in higher maximum update rates. +7I70 pins and parameters use the prefix +**hm2_**____**.**____**.7i70.**____**.**____. + +.Modes +|=== +|Mode |Function -MODE 0:: Input mode (48 bits input data only) -MODE 1:: Input plus analog mode (48 bits input data plus 6 channels of analog data) -MODE 2:: Input plus field voltage +|0 |Input mode (48 bits input data only) +|1 |Input plus analog mode (48 bits input data plus 6 channels of analog data) +|2 |Input plus field voltage +|=== *Pins:* -.7i70.0.0.analog__N__ (modes 1 and 2 only) (float out):: Analogue input values. -.7i70.0.0.fieldvoltage (mode 2 only) (float out):: Field voltage monitoring pin. -.7i70.0.0.input-__NN__ (bit out):: (_NN_ = 0 to 47) 48 digital inputs. -.7i70.0.0.input-__NN__-not (bit in):: (_NN_ = 0 to 47) An inverted copy of the inputs provided for convenience. The two complementary pins may be connected to different signal nets. + .analog__N__ (modes 1 and 2 only) (real, out):: Analogue input values. + .fieldvoltage (mode 2 only) (real, out):: Field voltage monitoring pin. + .input-__NN__ (bool, out):: (_NN_ = 0 to 47) 48 digital inputs. + .input-__NN__-not (bool, out):: (_NN_ = 0 to 47) An inverted copy of the inputs provided for convenience. The two complementary pins may be connected to different signal nets. *Parameters:* -.7i70.0.0.nvbaudrate (u32 ro):: Indicates the vbaud rate. This probably should not be altered. -.7i70.0.0.nvunitnumber (u32 ro):: Indicates the serial number of the device and should match a sticker on the card. This can be useful for working out which card is which. -.7i70.0.0.nvwatchdogtimeout (u32 ro):: The sserial remote watchdog timeout. This is separate from the Anything-IO card timeout. This is unlikely to need to be changed. -.7i69.0.0.swrevision (u32 ro):: The onboard firmware revision number. Utilities exist to update and change this firmware. + .nvbaudrate (uint, ro):: Indicates the vbaud rate. This probably should not be altered. + .nvunitnumber (uint, ro):: Indicates the serial number of the device and should match a sticker on the card. This can be useful for working out which card is which. + .nvwatchdogtimeout (uint, ro):: The sserial remote watchdog timeout. This is separate from the Anything-IO card timeout. This is unlikely to need to be changed. + .swrevision (uint, ro):: The onboard firmware revision number. Utilities exist to update and change this firmware. === 7I71 @@ -333,27 +381,32 @@ current capability. All outputs have LED status indicators. The 7I71 has two software selectable modes. For high speed applications, choosing the correct mode can reduced the data transfer sizes, resulting -in higher maximum update rates: +in higher maximum update rates. +7I71 pins and parameters use the prefix +**hm2_**____**.**____**.7i71.**____**.**____. + +.Modes +|=== +|Mode |Function -MODE 0:: Output only mode (48 bits output data only) -MODE 1:: Outputs plus read back field voltage +|0 |Output only mode (48 bits output data only) +|1 |Outputs plus read back field voltage +|=== *Pins:* -.7i71.0.0.fieldvoltage (mode 2 only) (float out):: Field voltage monitoring pin. + .fieldvoltage (mode 2 only) (real, out):: Field voltage monitoring pin. -.7i71.0.0.output-__NN__ (bit out):: (_NN_ = 0 to 47) 48 digital outputs. - The sense may be inverted by the invert parameter. -.7i71.0.0.output-__NN__ (bit out):: (_NN_ = 0 to 47) 48 digital outputs. + .output-__NN__ (bool, in):: (_NN_ = 0 to 47) 48 digital outputs. The sense may be inverted by the invert parameter. *Parameters:* -.7i71.0.0.output-__NN__-invert (bit rw):: Invert the sense of the corresponding output pin. -.7i71.0.0.nvbaudrate (u32 ro):: Indicates the vbaud rate. This probably should not be altered. -.7i71.0.0.nvunitnumber (u32 ro):: Indicates the serial number of the device and should match a sticker on the card. This can be useful for determining which card is which. -.7i71.0.0.nvwatchdogtimeout (u32 ro):: The sserial remote watchdog timeout. This is separate from the Anything-IO card timeout. This is unlikely to need to be changed. -.7i69.0.0.swrevision (u32 ro):: The onboard firmware revision number. Utilities exist to update and change this firmware. + .output-__NN__-invert (bool, rw):: Invert the sense of the corresponding output pin. + .nvbaudrate (uint, ro):: Indicates the vbaud rate. This probably should not be altered. + .nvunitnumber (uint, ro):: Indicates the serial number of the device and should match a sticker on the card. This can be useful for determining which card is which. + .nvwatchdogtimeout (uint, ro):: The sserial remote watchdog timeout. This is separate from the Anything-IO card timeout. This is unlikely to need to be changed. + .swrevision (uint, ro):: The onboard firmware revision number. Utilities exist to update and change this firmware. === 7I73 @@ -369,44 +422,56 @@ The 7I73 has 3 software selectable process data modes. These different modes select different sets of 7I73 data to be transferred between the host and the 7I73 during real time process data exchanges. For high speed applications, choosing the correct mode can reduced the data -transfer sizes, resulting in higher maximum update rates +transfer sizes, resulting in higher maximum update rates. +7I73 pins and parameters use the prefix +**hm2_**____**.**____**.7i73.**____**.**____. +The analog inputs are on channel 0 of the card, the remaining pins on channel 1. + +.Modes +|=== +|Mode |Function -MODE 0:: I/O + ENCODER -MODE 1:: I/O + ENCODER + ANALOG IN -MODE 2:: I/O + ENCODER + ANALOG IN FAST DISPLAY +|0 |I/O + ENCODER +|1 |I/O + ENCODER + ANALOG IN +|2 |I/O + ENCODER + ANALOG IN FAST DISPLAY +|=== *Pins:* -.7i73.0.0.analogin__N__ (float out):: Analogue inputs. + .analogin__N__ (real, out):: Analogue inputs. Up to 8 channels may be available dependent on software and hardware configuration modes (see the PDF manual downloadable from https://www.mesanet.com). -.7i73.0.1.display (modes 1 and 2) (u32 in):: Data for LCD display. + .display (modes 1 and 2) (uint, in):: Data for LCD display. This pin may be conveniently driven by the HAL "lcd" component which allows the formatted display of the values any number of HAL pins and textual content. -.7i73.0.1.display32 (mode 2 only) (u32 in):: 4 bytes of data for LCD display. This mode is not supported by the HAL "lcd" component. -.7i73.0.1.encN (s32 out):: The position of the MPG encoder counters. -.7i73.0.1.input-__NN__ (bit out):: Up to 24 digital inputs (dependent on config) -.7i73.0.1.input-__NN__-not (bit out):: Inverted copy of the digital inputs -.7i73.0.1.output-__NN__ (bit in):: Up to 22 digital outputs (dependent on config) + .display32 (mode 2 only) (uint, in):: 4 bytes of data for LCD display. This mode is not supported by the HAL "lcd" component. + .enc__N__.count (sint, out):: The position of the MPG encoder counters. + .enc__N__.rawcounts (sint, out):: Raw count of the MPG encoder counters. + .enc__N__.position (real, out):: Scaled position of the MPG encoder counters. + .enc__N__.index-enable (bool, io):: Simulated index of the MPG encoder counters. + .enc__N__.reset (bool, io):: Reset of the MPG encoder counters. + .input-__NN__ (bool, out):: Up to 24 digital inputs (dependent on config) + .input-__NN__-not (bool, out):: Inverted copy of the digital inputs + .output-__NN__ (bool, in):: Up to 22 digital outputs (dependent on config) *Parameters:* -.7i73.0.1.nvanalogfilter (u32 ro):: -.7i73.0.1.nvbaudrate (u32 ro):: -.7i73.0.1.nvcontrast (u32 ro):: -.7i73.0.1.nvdispmode (u32 ro):: -.7i73.0.1.nvencmode0 (u32 ro):: -.7i73.0.1.nvencmode1 (u32 ro):: -.7i73.0.1.nvencmode2 (u32 ro):: -.7i73.0.1.nvencmode3 (u32 ro):: -.7i73.0.1.nvkeytimer (u32 ro):: -.7i73.0.1.nvunitnumber (u32 ro):: -.7i73.0.1.nvwatchdogtimeout (u32 ro):: -.7i73.0.1.output-00-invert (u32 ro):: + .nvanalogfilter (uint, ro):: + .nvbaudrate (uint, ro):: + .nvcontrast (uint, ro):: + .nvdispmode (uint, ro):: + .nvencmode0 (uint, ro):: + .nvencmode1 (uint, ro):: + .nvencmode2 (uint, ro):: + .nvencmode3 (uint, ro):: + .nvkeytimer (uint, ro):: + .nvunitnumber (uint, ro):: + .nvwatchdogtimeout (uint, ro):: + .output-00-invert (bool, rw):: For further details of the use of the above see the Mesa manual. -.7i73.0.1.output-01-invert (bit rw):: Invert the corresponding output bit. -.7i73.0.1.swrevision (s32 ro):: The version of firmware installed. + .output-01-invert (bool, rw):: Invert the corresponding output bit. + .swrevision (sint, ro):: The version of firmware installed.