diff --git a/docs/src/man/man9/classicladder.9.adoc b/docs/src/man/man9/classicladder.9.adoc index 71b2924f554..520b75cccc8 100644 --- a/docs/src/man/man9/classicladder.9.adoc +++ b/docs/src/man/man9/classicladder.9.adoc @@ -27,35 +27,35 @@ the outputs. == PINS -**classicladder.0.in-**_NN_ IN bit:: - These bit signal pins map to **%I**_NN_ variables in ClassicLadder. -**classicladder.0.out-**_NN_ OUT bit:: - These bit signal pins map to **%Q**_NN_ variables in ClassicLadder. +**classicladder.0.in-**_NN_ IN bool:: + These bool signal pins map to **%I**_NN_ variables in ClassicLadder. +**classicladder.0.out-**_NN_ OUT bool:: + These bool signal pins map to **%Q**_NN_ variables in ClassicLadder. Output from ClassicLadder. -**classicladder.0.s32in-**_NN_ IN s32:: +**classicladder.0.s32in-**_NN_ IN sint:: Integer input from ClassicLadder. - These s32 signal pins map to **%IW**_NN_ variables in ClassicLadder. -**classicladder.0.s32out-**_NN_ OUT s32:: + These sint signal pins map to **%IW**_NN_ variables in ClassicLadder. +**classicladder.0.s32out-**_NN_ OUT sint:: Integer output from ClassicLadder. - These s32 signal pins map to **%QW**_NN_ variables in ClassicLadder. -**classicladder.0.floatin-**_NN_ IN float:: + These sint signal pins map to **%QW**_NN_ variables in ClassicLadder. +**classicladder.0.floatin-**_NN_ IN real:: Integer input from ClassicLadder. - These float signal pins map to **%IF**_NN_ variables in ClassicLadder. + These real signal pins map to **%IF**_NN_ variables in ClassicLadder. These are truncated to S32 values internally, e.g. 7.5 will be 7. -**classicladder.0.floatout-**_NN_ OUT float:: - Float output from ClassicLadder. - These float signal pins map to **%QF**_NN_ variables in ClassicLadder. -**classicladder.0.hide_gui** IN bit:: - This bit pin hides the ClassicLadder window, while still having the non-realtime code run. +**classicladder.0.floatout-**_NN_ OUT real:: + Real output from ClassicLadder. + These real signal pins map to **%QF**_NN_ variables in ClassicLadder. +**classicladder.0.hide_gui** IN bool:: + This bool pin hides the ClassicLadder window, while still having the non-realtime code run. This is usually desirable when modbus is used, as modbus requires the non-realtime code to run. == PARAMETERS -*classicladder.0.refresh.time* RO s32:: +*classicladder.0.refresh.time* RO sint:: Tells you how long the last refresh took. -*classicladder.0.refresh.tmax* RW s32:: +*classicladder.0.refresh.tmax* RW sint:: Tells you how long the longest refresh took. -*classicladder.0.ladder-state* RO s32:: +*classicladder.0.ladder-state* RO sint:: Tells you if the program is running or not == FUNCTIONS diff --git a/docs/src/man/man9/counter.9.adoc b/docs/src/man/man9/counter.9.adoc index e308dbb16ff..1e9833a4125 100644 --- a/docs/src/man/man9/counter.9.adoc +++ b/docs/src/man/man9/counter.9.adoc @@ -36,29 +36,29 @@ HAL manual. == PINS -**counter.**_N_**.phase-A** bit in:: +**counter.**_N_**.phase-A** bool in:: The primary input signal. The internal counter is incremented on each rising edge. -**counter.**_N_**.phase-Z** bit in:: +**counter.**_N_**.phase-Z** bool in:: The index input signal. When the *index-enable* pin is TRUE and a rising edge on *phase-Z* is seen, *index-enable* is set to FALSE and the internal counter is reset to zero. -**counter.**_N_**.index-enable** bit io:: +**counter.**_N_**.index-enable** bool io:: + -**counter.**_N_**.reset** bit io:: +**counter.**_N_**.reset** bool in:: + -**counter.**_N_**.counts** signed out:: +**counter.**_N_**.counts** sint out:: + -**counter.**_N_**.position** float out:: +**counter.**_N_**.position** real out:: + -**counter.**_N_**.velocity** float out:: +**counter.**_N_**.velocity** real out:: These pins function according to the canonical digital encoder interface. -**counter.**_N_**.position-scale** float rw:: +**counter.**_N_**.position-scale** real io:: This parameter functions according to the canonical digital encoder interface. -**counter.**_N_**.rawcounts** signed ro:: +**counter.**_N_**.rawcounts** sint out:: The internal counts value, updated from *update-counters* and reflected in the output pins at the next call to *capture-position*. diff --git a/docs/src/man/man9/debounce.9.adoc b/docs/src/man/man9/debounce.9.adoc index 32f98996306..88816d9f956 100644 --- a/docs/src/man/man9/debounce.9.adoc +++ b/docs/src/man/man9/debounce.9.adoc @@ -39,10 +39,10 @@ signal to be present for _N_ samples before the output changes state. == PINS -**debounce.**_G_**.**_F_**.in** bit in:: +**debounce.**_G_**.**_F_**.in** bool in:: The F'th input pin in group G. -**debounce.**_G_**.**_F_**.out** bit out:: +**debounce.**_G_**.**_F_**.out** bool out:: The F'th output pin in group _G_. Reflects the last "stable" input seen on the corresponding input pin. -**debounce.**_G_**.delay** signed rw:: +**debounce.**_G_**.delay** sint rw:: Sets the amount of filtering for all pins in group _G_. diff --git a/docs/src/man/man9/demux_generic.9.adoc b/docs/src/man/man9/demux_generic.9.adoc index 01d75542fe8..9948af5df4d 100644 --- a/docs/src/man/man9/demux_generic.9.adoc +++ b/docs/src/man/man9/demux_generic.9.adoc @@ -8,7 +8,7 @@ demux_generic - routes a single input signal to one of multiple outputs **loadrt demux_generic config="**____[,____],...**"** -Types: **b** = bit, **f** = float, **s** = signed integer, **u** = unsigned integer +Types: **b** = bool, **f** = real, **s** = sint, **u** = uint Example: **loadrt demux_generic config="**bb8,fu12**"** @@ -16,7 +16,7 @@ Example: == FUNCTIONS -**demux-gen.**_NN_ Depending on the data types can run in either a floating point or non-floating point thread. +**demux-gen.**_NN_ Demultiplexer function. == PINS @@ -25,22 +25,22 @@ Example: demux-gen.NN.sel-bit-BB ───────────────┐ │ │ demux-gen.NN.sel-int ─────────────┐ │ │ │ ┌───────┴─┴─┴─┴───────┐ - │ / o───── ├───── demux-gen.NN.out-[bit/float/s32/u32]-00 -demux-gen.NN.in-[bit/float/s32/u32] ─────┤ ─────o o───── ├───── ... - │ o───── ├───── demux-gen.NN.out-[bit/float/s32/u32]-MM + │ / o───── ├───── demux-gen.NN.out-[bool/real/sint/uint]-00 +demux-gen.NN.in-[bool/real/sint/uint] ───┤ ─────o o───── ├───── ... + │ o───── ├───── demux-gen.NN.out-[bool/real/sint/uint]-MM demux-gen.NN.suppress-no-input ─────┤ │ demux-gen.NN.debounce-us ─────┤ │ └─────────────────────┘ -**demux-gen**.__N__.**suppress-no-input** bit in:: +**demux-gen**.__N__.**suppress-no-input** bool in:: This suppresses changing the output if all select lines are false. This stops unwanted jumps in output between transitions of input but makes in00 unavailable. -**demux-gen**.__N__.**debounce-us** unsigned in:: +**demux-gen**.__N__.**debounce-us** uint in:: sets debounce time in microseconds, e.g. 100000 = a tenth of a second. The selection inputs must be stable this long before the output changes. This helps to ignore 'noisy' switches. -**demux-gen**.__N__.**sel-bit-**__BB__ bit in (BB=0..bit width of _size_):: -**demux-gen**.__N__.**sel-int** unsigned in:: +**demux-gen**.__N__.**sel-bit-**__BB__ bool in (BB=0..bit width of _size_):: +**demux-gen**.__N__.**sel-int** uint in:: The sel-bit pins are only created when the size of the demux_gen component is an integer power of two. Together, these determine to which **out**-__MM__ the **in** value is forwarded. @@ -48,21 +48,20 @@ demux-gen.NN.in-[bit/float/s32/u32] ─────┤ ─────o o─ added on to the integer pin input. It is expected that either one or the other would normally be used. However, the possibility exists to use a higher-order bit to "shift" the values set by the integer pin. -**demux-gen**.__N__.**in-**[**bit**/**float**/**s32**/**u32**] variable-type in:: +**demux-gen**.__N__.**in-**[**bool**/**real**/**sint**/**uint**] variable-type in:: The input value which is routed to an output depending on the selection pins. -**demux-gen**.__N__.**out-**[**bit**/**float**/**s32**/**u32**]**-**__MM__ variable-type out (M=0..size-1):: +**demux-gen**.__N__.**out-**[**bool**/**real**/**sint**/**uint**]**-**__MM__ variable-type out (M=0..size-1):: According to the selection bits and/or the selection number, the selected output follows the **in** value. The other outputs retain the values they had before resp. zero if they have not been selected yet. Values will be - converted/truncated according to standard C rules. This means, for - example that a float input greater than 2147483647 will give an S32 - output of -2147483648. + converted and clamped. This means, for example that a REAL input greater + than (approx.) 2^63^-1 will give a SINT output of 2^63^-1. == PARAMETERS -**demux-gen**.__N__.**elapsed** float r:: +**demux-gen**.__N__.**elapsed** real r:: Current value of the internal debounce timer for debugging. -**demux-gen**.__N__.**selected** s32 r:: +**demux-gen**.__N__.**selected** sint r:: Current value of the internal selection variable after conversion for debugging. Possibly useful for setting up gray-code switches. @@ -73,26 +72,22 @@ 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 float-to-unsigned demux. +4-element bit-to-bit demux and a 12-element real-to-uint demux. The code letters are: -**b** = bit, -**f** = float, -**s** = signed integer and -**u** = unsigned integer. +**b** = bool (boolean), +**f** = real (floating point), +**s** = sint (signed integer) and +**u** = uint (unsigned integer). The first letter code is the input type, the second is the output type. The codes are not case-sensitive. The order of the letters is significant but the position in the string is not. Do not insert any -spaces in the config string. Any non-zero float value will be converted -to a "true" output in bit form. Be wary that float datatypes can be -very, very, close to zero and not actually be equal to zero. +spaces in the config string. Any non-zero real value will be converted +to a "true" output in bool form when it is more than ±2e-7 from zero. Each demux has its own HAL function and must be added to a thread -separately. If neither input nor output is of type float then the -function is base-thread (non floating-point) safe. Any demux_generic with -a floating point input or output can only be added to a floating-point -thread. +separately. == SEE ALSO diff --git a/docs/src/man/man9/encoder.9.adoc b/docs/src/man/man9/encoder.9.adoc index daf0b0ea380..8ac3735bb01 100644 --- a/docs/src/man/man9/encoder.9.adoc +++ b/docs/src/man/man9/encoder.9.adoc @@ -60,85 +60,85 @@ The *encoder*.__N__. format is shown in the following descriptions. == PINS -**encoder**.__N__.**counter-mode** bit i/o:: +**encoder**.__N__.**counter-mode** bool i/o:: Enables counter mode. When true, the counter counts each rising edge of the phase-A input, ignoring the value on phase-B. This is useful for counting the output of a single channel (non-quadrature) sensor. When false (the default), it counts in quadrature mode. -**encoder**.__N__.**counts** s32 out:: +**encoder**.__N__.**counts** sint out:: Position in encoder counts. -**encoder**.__N__.**index-enable** bit i/o:: +**encoder**.__N__.**index-enable** bool i/o:: When true, *counts* and *position* are reset to zero on the next rising edge of *Phase-Z*. At the same time, *index-enable* is reset to zero to indicate that the rising edge has occurred. -**encoder**.__N__.**min-speed-estimate** float in (default: 1.0):: +**encoder**.__N__.**min-speed-estimate** real in (default: 1.0):: Determine the minimum speed at which *velocity* will be estimated as nonzero and *postition-interpolated* will be interpolated. The units of *min-speed-estimate* are the same as the units of *velocity*. 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. -**encoder**.__N__.**phase-A** bit in:: +**encoder**.__N__.**phase-A** bool in:: Quadrature input for encoder channel _N_. -**encoder**.__N__.**phase-B** bit in:: +**encoder**.__N__.**phase-B** bool in:: Quadrature input. -**encoder**.__N__.**phase-Z** bit in:: +**encoder**.__N__.**phase-Z** bool in:: Index pulse input. -**encoder**.__N__.**position** float out:: +**encoder**.__N__.**position** real out:: Position in scaled units (see *position-scale*) -**encoder**.__N__.**position-interpolated** float out:: +**encoder**.__N__.**position-interpolated** real out:: Position in scaled units, interpolated between encoder counts. Only valid when velocity is approximately constant and above *min-speed-estimate*. Do not use for position control. -**encoder**.__N__.**position-scale** float i/o:: +**encoder**.__N__.**position-scale** real i/o:: Scale factor, in counts per length unit. For example, if *position-scale* is 500, then 1000 counts of the encoder will be reported as a position of 2.0 units. -**encoder**.__N__.**missing-teeth** s32 in:: +**encoder**.__N__.**missing-teeth** sint in:: The number of teeth missing from the index gap. For example a 60 tooth gear with two teeth shortened to form an index so that there are 58 pulses per revolution would use a position-scale of 60 and a missing-teeth of 2. -**encoder**.__N__.**rawcounts** s32 out:: +**encoder**.__N__.**rawcounts** sint out:: The raw count, as determined by *update-counters*. This value is updated more frequently than *counts* and *position*. It is also unaffected by *reset* or the index pulse. -**encoder**.__N__.**reset** bit in:: +**encoder**.__N__.**reset** bool in:: When true, *counts* and *position* are reset to zero immediately. -**encoder**.__N__.**velocity** float out:: +**encoder**.__N__.**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**.__N__.**velocity-rpm** float out:: - Velocity in scaled units per minute. Simply *encoder**.__N__.**velocity* +**encoder**.__N__.**velocity-rpm** real out:: + Velocity in scaled units per minute. Simply **encoder**.__N__.**velocity** scaled by a factor of 60 for convenience. -**encoder**.__N__.**x4-mode** bit i/o:: +**encoder**.__N__.**x4-mode** bool i/o:: Enables times-4 mode. When true (the default), the counter counts each edge of the quadrature waveform (four counts per full cycle). When false, it only counts once per full cycle. In *counter-mode*, this parameter is ignored. -**encoder**.__N__.**latch-input** bit in:: +**encoder**.__N__.**latch-input** bool in:: + -**encoder**.__N__.**latch-falling** bit in (default: *TRUE*):: +**encoder**.__N__.**latch-falling** bool in (default: *TRUE*):: + -**encoder**.__N__.**latch-rising** bit in (default: *TRUE*):: +**encoder**.__N__.**latch-rising** bool in (default: *TRUE*):: + -**encoder**.__N__.**counts-latched** s32 out:: +**encoder**.__N__.**counts-latched** sint out:: + -**encoder**.__N__.**position-latched** float out:: +**encoder**.__N__.**position-latched** real out:: Update *counts-latched* and *position-latched* on the rising and/or falling edges of *latch-input* as indicated by *latch-rising* and *latch-falling*. -**encoder**.__N__.**counter-mode** bit rw:: +**encoder**.__N__.**counter-mode** bool rw:: Enables counter mode. When true, the counter counts each rising edge of the phase-A input, ignoring the value on phase-B. This is useful for counting the output of a single channel (non-quadrature) sensor. When false (the default), it counts in quadrature mode. -**encoder**.__N__.**capture-position.tmax** s32 rw:: +**encoder**.__N__.**capture-position.tmax** sint rw:: Maximum time in ns it took to execute this function. == PARAMETERS diff --git a/docs/src/man/man9/encoder_ratio.9.adoc b/docs/src/man/man9/encoder_ratio.9.adoc index a9ba0ce7281..e15820811a1 100644 --- a/docs/src/man/man9/encoder_ratio.9.adoc +++ b/docs/src/man/man9/encoder_ratio.9.adoc @@ -39,18 +39,18 @@ The *encoder-ratio.N.* format is shown in the following descriptions. == PINS -**encoder-ratio.**_N_**.master-A** bit in:: +**encoder-ratio.**_N_**.master-A** bool in:: + -**encoder-ratio.**_N_**.master-B** bit in:: +**encoder-ratio.**_N_**.master-B** bool in:: + -**encoder-ratio.**_N_**.slave-A** bit in:: +**encoder-ratio.**_N_**.slave-A** bool in:: + -**encoder-ratio.**_N_**.slave-B** bit in:: +**encoder-ratio.**_N_**.slave-B** bool in:: The encoder channels of the master and slave axes. -**encoder-ratio.**_N_**.enable** bit in:: +**encoder-ratio.**_N_**.enable** bool in:: When the enable pin is FALSE, the error pin simply reports the slave axis position, in revolutions. As such, it would normally be connected to the feedback pin of a PID block for closed loop control of the @@ -60,18 +60,18 @@ The *encoder-ratio.N.* format is shown in the following descriptions. minus the scaled master position. The scale factor is the ratio of master teeth to slave teeth. As the master moves, error becomes non-zero, and the PID loop will drive the slave axis to track the master. -**encoder-ratio.**_N_**.error** float out:: +**encoder-ratio.**_N_**.error** real out:: The error in the position of the slave (in revolutions). == PARAMETERS -**encoder-ratio.**_N_**.master-ppr** unsigned rw:: +**encoder-ratio.**_N_**.master-ppr** uint rw:: -**encoder-ratio.**_N_**.slave-ppr** unsigned rw:: +**encoder-ratio.**_N_**.slave-ppr** uint rw:: The number of pulses per revolution of the master and slave axes. -**encoder-ratio.**_N_**.master-teeth** unsigned rw:: +**encoder-ratio.**_N_**.master-teeth** uint rw:: -**encoder-ratio.**_N_**.slave-teeth** unsigned rw:: +**encoder-ratio.**_N_**.slave-teeth** uint rw:: The number of "teeth" on the master and slave gears. == SEE ALSO diff --git a/docs/src/man/man9/enum.9.adoc b/docs/src/man/man9/enum.9.adoc index 66c9e7e4fc0..8dc5b320bea 100644 --- a/docs/src/man/man9/enum.9.adoc +++ b/docs/src/man/man9/enum.9.adoc @@ -40,7 +40,7 @@ Conversely, if *enum-encode.00.input* is set to 4 then the pin == OPTIONS Preceding the list of labels should be the control-codes "D" for decode -or "E" for encode. A D-type enum will set the value of HAL bit pins in +or "E" for encode. A D-type enum will set the value of HAL bool pins in response to changes to the enum-decode.NN.input value, whereas an E-type enum will set the value of the enum-encode.NN.output integer depending on which enum-encode.NN.label-bit value is set. @@ -58,12 +58,12 @@ E and D-type enumerations may be freely mixed in separate instances. == PINS -**enum-decode.**_NN_.input:: The integer value to be decoded +**enum-decode.**_NN_.input:: The uint integer value to be decoded **enum-decode.**_NN_.label-out:: Output bits of a decode instance -**enum-decode.**_NN_.label-val:: The enumeration value corresponding to - each specific bit output. These are +**enum-decode.**_NN_.label-val:: The uint enumeration value corresponding to + each specific bool output. These are populated in sequence during loading but may be over-ridden in HAL if convenient. @@ -71,12 +71,12 @@ E and D-type enumerations may be freely mixed in separate instances. **enum-encode.**_NN_**.label-in**:: input bits of a decode instance **enum-encode.**_NN_**.label-val**:: The enumeration value corresponding to - each specified bit input. These are + each specified bool input. These are populated in sequence during loading but may be over-ridden in HAL if convenient. -**enum-decode.**_NN_**.output**:: The integer value corresponding to the set bit input. +**enum-decode.**_NN_**.output**:: The uint integer value corresponding to the set bool input. == BUGS diff --git a/docs/src/man/man9/hal_bb_gpio.9.adoc b/docs/src/man/man9/hal_bb_gpio.9.adoc index 80f12f18c38..ddbc117cd1a 100644 --- a/docs/src/man/man9/hal_bb_gpio.9.adoc +++ b/docs/src/man/man9/hal_bb_gpio.9.adoc @@ -17,10 +17,10 @@ Empirically, these seem to be OR'd with whatever function is assigned to the LED === PINS -**bb_gpio.userled**_N_ bit in:: +**bb_gpio.userled**_N_ bool in:: + -**bb_gpio.userled**_N_**-invert** bit in:: +**bb_gpio.userled**_N_**-invert** bool in:: The associated LED is lit if **userled**_N_ xor **userled**_N_-invert is TRUE. == INPUT PINS @@ -37,10 +37,10 @@ system. === PINS -**bb_gpio.p**_N_**.in-**_NN_ bit out:: +**bb_gpio.p**_N_**.in-**_NN_ bool out:: + -**bb_gpio.p**_N_**.in-**_NN_**-invert** bit in:: +**bb_gpio.p**_N_**.in-**_NN_**-invert** bool in:: **in-**_NN_ is a snapshot of the value of the corresponding physical pin XOR the value of the corresponding **in-**_NN_**-invert** pin. @@ -56,10 +56,10 @@ system. === PINS -**bb_gpio.p**_N_**.out-**_NN_ bit out:: +**bb_gpio.p**_N_**.out-**_NN_ bool out:: + -**bb_gpio.p**_N_**.out-**_NN_**-invert** bit in:: +**bb_gpio.p**_N_**.out-**_NN_**-invert** bool in:: The corresponding physical pin is driven with the result of **in-**_NN_ xor **in-**_NN_**-invert**. diff --git a/docs/src/man/man9/hal_parport.9.adoc b/docs/src/man/man9/hal_parport.9.adoc index 7aca5ac2bb2..182ca9455bc 100644 --- a/docs/src/man/man9/hal_parport.9.adoc +++ b/docs/src/man/man9/hal_parport.9.adoc @@ -49,11 +49,11 @@ _x_:: The option allows ports with open collectorts on the control group pins to The pins created by the hal_parport component depends on how it is configured in the **cfg="" **string passed to it, see OPTIONS. -**parport**.__p__.**pin-**__n__**-out** (bit):: Drives a physical output pin. +**parport**.__p__.**pin-**__n__**-out** (bool):: Drives a physical output pin. -**parport**.__p__.**pin-**__n__**-in** (bit):: Tracks a physical input pin. +**parport**.__p__.**pin-**__n__**-in** (bool):: Tracks a physical input pin. -**parport**.__p__.**pin-**__n__**-in-not** (bit):: Tracks a physical input pin, but inverted. +**parport**.__p__.**pin-**__n__**-in-not** (bool):: Tracks a physical input pin, but inverted. For each pin created, **_p_** is the port number, and **_n_** is the physical pin number in the 25 pin D-shell connector. @@ -82,12 +82,12 @@ in the cfg="" string. == PARAMETERS -**parport**.__p__.**pin--out-invert** (bit):: +**parport**.__p__.**pin--out-invert** (bool):: Inverts an output pin. -**parport**.__p__.**pin--out-reset** (bit):: +**parport**.__p__.**pin--out-reset** (bool):: (only for out pins) TRUE if this pin should be reset when the .reset function is executed. -**parport**.__p__.**reset-time** (u32):: +**parport**.__p__.**reset-time** (uint):: The time (in nanoseconds) between a pin is set by write and reset by the reset function if it is enabled. diff --git a/docs/src/man/man9/hm2_modbus.9.adoc b/docs/src/man/man9/hm2_modbus.9.adoc index e8b81e5cb14..2c82facfa00 100644 --- a/docs/src/man/man9/hm2_modbus.9.adoc +++ b/docs/src/man/man9/hm2_modbus.9.adoc @@ -107,21 +107,21 @@ the practical limit will be effective communication speed and bus load. === PARAMETERS Exported parameters for driver instance `N`: -hm2_modbus.N.baudrate (u32, readonly):: +hm2_modbus.N.baudrate (uint, readonly):: The communication baudrate. -hm2_modbus.N.drivedelay (u32, readonly):: +hm2_modbus.N.drivedelay (uint, readonly):: The transmitter wait time between enabling the transmitter and start sending in bit-times. -hm2_modbus.N.icdelay (u32, readonly):: +hm2_modbus.N.icdelay (uint, readonly):: The maximum inter-character delay accepted in received frames in bit-times. Set to zero (0) when disabled. -hm2_modbus.N.parity' (u32, readonly):: +hm2_modbus.N.parity' (uint, readonly):: The communication parity (0=None, 1=Odd, 2=Even). -hm2_modbus.N.rxdelay (u32, readonly):: +hm2_modbus.N.rxdelay (uint, readonly):: The inter-frame delay required before a packet is accepted in bit-times. -hm2_modbus.N.stopbits (u32, readonly):: +hm2_modbus.N.stopbits (uint, readonly):: The communication number of stopbits (1 or 2). -hm2_modbus.N.txdelay (u32, readonly):: +hm2_modbus.N.txdelay (uint, readonly):: The inter-frame delay inserted after a packet in bit-times. The parameters are all read/only. There is normally no need to alter any @@ -132,16 +132,16 @@ parameters. Any tuning of values should be done in the mbccs/mbccb file. Each driver instance `N` exports the following pins to control the instance's operation and indicate the instance's status: -hm2_modbus.N.fault (bit, output):: +hm2_modbus.N.fault (bool, output):: Indicates a fault condition. -hm2_modbus.N.fault-command (u32, output):: +hm2_modbus.N.fault-command (uint, output):: The command index that caused the last fault condition. -hm2_modbus.N.last-error-code (u32, output):: +hm2_modbus.N.last-error-code (uint, output):: The errno value of the error that caused the fault condition. -hm2_modbus.N.reset (bit, input):: +hm2_modbus.N.reset (bool, input):: Reset all commands error counters and re-enable disabled commands on the rising edge of the input pin. -hm2_modbus.N.suspend (bit, input):: +hm2_modbus.N.suspend (bool, input):: Suspend all activity while set. The default can be set in the MBCCB file. + Suspended start (when set in the MBCCB file) can ensure that all HAL files and commands are parsed and executed (like setp and sets commands) before @@ -164,12 +164,12 @@ Each command in the MBCCB file (not init commands) will generate a set of pins to reflect the current state, where `MM` is the command number counting from zero (00): -hm2_modbus.N.command.MM.disable (bit, input):: +hm2_modbus.N.command.MM.disable (bool, input):: Disable this command on the rising edge of this pin. You need to use the command's corresponding reset pin to re-enable it. -hm2_modbus.N.command.MM.disabled (bit, output):: +hm2_modbus.N.command.MM.disabled (bool, output):: Set if the command is no longer sent in the commands loop. -hm2_modbus.N.command.MM.error-code (u32, output):: +hm2_modbus.N.command.MM.error-code (uint, output):: The errno code of the last error. The following error codes can be set: ** 5, 0x05 (EIO): The receiver detected an overrun, a false start-bit or wrong parity. @@ -186,11 +186,11 @@ hm2_modbus.N.command.MM.error-code (u32, output):: ** 90, 0x5a (EMSGSIZE): The message did not fit into the maximum PDU size of 253. ** 110, 0x6e (ETIMEDOUT): The command received no reply and timed out. -hm2_modbus.N.command.MM.errors (u32, output):: +hm2_modbus.N.command.MM.errors (uint, output):: The number of consecutive errors seen in this command. The command will be disabled when this count reaches five (5). The value will be reset to zero (0) when the command succeeds. -hm2_modbus.N.command.MM.reset (bit, input):: +hm2_modbus.N.command.MM.reset (bool, input):: Reset this command's error counter and re-enable the command on the rising edge of the input pin. + Note: Re-enabling the command will honor the 'writeflush' setting of the diff --git a/docs/src/man/man9/lcd.9.adoc b/docs/src/man/man9/lcd.9.adoc index 33559de4194..5fa3ab69ef1 100644 --- a/docs/src/man/man9/lcd.9.adoc +++ b/docs/src/man/man9/lcd.9.adoc @@ -15,22 +15,22 @@ lcd - Stream HAL data to an LCD screen == PINS -**lcd.**_NN_**.out** (u32) out:: +**lcd.**_NN_**.out** (uint) out:: The output byte stream is sent via this pin. One character is sent every thread invocation. There in no handshaking provided. -**lcd.**_NN_**.page.**_PP._**arg.**_NN_ (float/s32/u32/bit) in:: +**lcd.**_NN_**.page.**_PP._**arg.**_NN_ (real/sint/uint/bool) in:: The input pins have types matched to the format string specifiers. -**lcd.**_NN_**.page_num** (u32) in:: +**lcd.**_NN_**.page_num** (uint) in:: Selects the page number. Multiple layouts may be defined, and this pin switches between them. -**lcd.**_NN_**.contrast** (float) in:: +**lcd.**_NN_**.contrast** (real) in:: Attempts to set the contrast of the LCD screen using the byte sequence ESC C and then a value from 0x20 to 0xBF (matching the Mesa 7I73). The value should be between 0 and 1. == PARAMETERS -**lcd.**_NN_**.decimal-separator** (u32) rw:: +**lcd.**_NN_**.decimal-separator** (uint) rw:: Sets the decimal separator used for floating point numbers. The default value is 46 (0x2E) which corresponds to ".". If a comma is required then set this parameter to 44 (0x2C). @@ -121,26 +121,27 @@ The numerical formats supported are: variable format width, with a sign only shown for negative numbers. Both %f and %F create exactly the same format. -* *%i %d* (For example %+ 4d): Creates a signed (s32) HAL pin. The example +* *%i %d* (For example %+ 4d): Creates a signed (sint) HAL pin. The example would display the value at a fixed 4 characters, space padded, width including the "+" giving a range of +999 to -999. %i and %d create identical output. -* *%u* (for example %08u): Creates an unsigned (u32) HAL pin. +* *%u* (for example %08u): Creates an unsigned (uint) HAL pin. The example would be a fixed 8 characters wide, padded with zeros. -* *%x, %X*: Creates an unsigned (u32) HAL pin and displays the value in Hexadecimal. +* *%x, %X*: Creates an unsigned (uint) HAL pin and displays the value in Hexadecimal. Both %x and %X display capital letters for digits ABCDEF. - A width may be specified, though the u32 HAL type is only 8 hex digits wide. + A width may be specified. + Note that the uint HAL type is at most 16 hex digits wide. -* *%o*: Creates an unsigned (u32) pin and displays the value in octal representation. +* *%o*: Creates an unsigned (uint) pin and displays the value in octal representation. -* *%c*: Creates a u32 HAL pin and displays the character corresponding to +* *%c*: Creates a uint HAL pin and displays the character corresponding to the value of the pin. Values less than 32 (space) are suppressed. A width specifier may be used, for example %20c might be used to create a complete line of one character. -* *%b*: This specifier has no equivalent in printf. It creates a bit +* *%b*: This specifier has no equivalent in printf. It creates a bool (boolean) type HAL pin. The b should be followed by two characters and the display will show the first of these when the pin is true, and the second when false. Note that the characters follow, not precede the "b", diff --git a/docs/src/man/man9/lineardeltakins.9.adoc b/docs/src/man/man9/lineardeltakins.9.adoc index 9c1a757bfb3..6e110ba2780 100644 --- a/docs/src/man/man9/lineardeltakins.9.adoc +++ b/docs/src/man/man9/lineardeltakins.9.adoc @@ -22,7 +22,7 @@ extruder. == PINS -*lineardeltakins.R* float in:: +*lineardeltakins.R* real in:: Effective diameter of the platform. + The radius R is different than the distance from the center of the table to the @@ -31,7 +31,7 @@ RepRap delta parlance, R is DELTA_RADIUS which is computed as + DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET. -*lineardeltakins.L* float in:: +*lineardeltakins.L* real in:: Length of the rod connecting the carriage to the effector. In RepRap delta parlance, L is DELTA_DIAGONAL_ROD. diff --git a/docs/src/man/man9/matrix_kb.9.adoc b/docs/src/man/man9/matrix_kb.9.adoc index 47596eb8ec9..0093bade3b9 100644 --- a/docs/src/man/man9/matrix_kb.9.adoc +++ b/docs/src/man/man9/matrix_kb.9.adoc @@ -55,23 +55,23 @@ node of the matrix. == PINS -**matrix_kb.**_N_**.col-**_CC_**-in** bit in:: +**matrix_kb.**_N_**.col-**_CC_**-in** bool in:: The input pin corresponding to column C. -**matrix_kb.**_N_**.key.r**_R_**c**_C_ bit out:: +**matrix_kb.**_N_**.key.r**_R_**c**_C_ bool out:: The pin corresponding to the key at row R column C of the matrix. -**matrix_kb.**_N_**.keycode** unsigned in or out, depending on mode:: +**matrix_kb.**_N_**.keycode** uint in or out, depending on mode:: This pin should be connected to the scancode generator if hardware such as a 7I73 is being used. In this mode it is an input pin. In the internally-generated scanning mode this pin is an output, but will not normally be connected. -**matrix_kb.**_N_**.row-**_RR_**-out** bit out:: +**matrix_kb.**_N_**.row-**_RR_**-out** bool out:: The row scan drive pins. Should be connected to external hardware pins connected to the keypad. The row scan drive pins.Should be connected to external hardware pins connected to the keypad. == PARAMETERS -**matrix_kb.**_N_**.key_rollover** unsigned r/w (default 2):: +**matrix_kb.**_N_**.key_rollover** uint r/w (default 2):: With most matrix keyboards the scancodes are only unambiguous with 1 or 2 keys pressed. With more keys pressed phantom keystrokes can appear. Some keyboards are optimised to reduce this problem, and some @@ -79,7 +79,7 @@ node of the matrix. simultaneously. Increase the value of this parameter if such a keyboard is connected, or if phantom keystrokes are more acceptable than only two keys being active at one time. -**matrix_kb.**_N_**.negative-logic** bit r/w (default 1), only in scan mode:: +**matrix_kb.**_N_**.negative-logic** bool r/w (default 1), only in scan mode:: When no keys are pressed a typical digital input will float high. The input will then be pulled low by the keypad when the corresponding poll line is low. Set this parameter to 0 if the I/O in use requires one row at a time to be high, diff --git a/docs/src/man/man9/motion.9.adoc b/docs/src/man/man9/motion.9.adoc index 4d2c1840cb9..176e32450f2 100644 --- a/docs/src/man/man9/motion.9.adoc +++ b/docs/src/man/man9/motion.9.adoc @@ -105,47 +105,47 @@ digital pins and two analog pins. == MOTION PINS -*motion-command-handler.time* OUT S32:: +*motion-command-handler.time* OUT SINT:: Time (in ns) for the motion module motion-command-handler -*motion-controller.time* OUT S32:: +*motion-controller.time* OUT SINT:: Time (in ns) for the motion module motion-controller -*motion.adaptive-feed* IN FLOAT:: +*motion.adaptive-feed* IN REAL:: When adaptive feed is enabled with M52 P1, the commanded velocity is multiplied by this value. This effect is multiplicative with the NML-level feed override value and motion.feed-hold. Negative values are valid and will run the G-code path in reverse. -**motion.analog-in-**_NN_ IN FLOAT:: +**motion.analog-in-**_NN_ IN REAL:: These pins are used by M66 Enn wait-for-input mode. -**motion.analog-out-**_NN_ OUT FLOAT:: +**motion.analog-out-**_NN_ OUT REAL:: These pins are used by M67-68. -*motion.coord-error* OUT BIT:: +*motion.coord-error* OUT BOOL:: TRUE when motion has encountered an error, such as exceeding a soft limit -*motion.coord-mode* OUT BIT:: +*motion.coord-mode* OUT BOOL:: TRUE when motion is in "coordinated mode", as opposed to "teleop mode" -*motion.current-vel* OUT FLOAT:: +*motion.current-vel* OUT REAL:: Current cartesian velocity -**motion.digital-in-**_NN_ IN BIT:: +**motion.digital-in-**_NN_ IN BOOL:: These pins are used by M66 Pnn wait-for-input mode. -**motion.digital-out-**_NN_ OUT BIT:: +**motion.digital-out-**_NN_ OUT BOOL:: These pins are controlled by the M62 through M65 words. -*motion.distance-to-go* OUT FLOAT:: +*motion.distance-to-go* OUT REAL:: Distance remaining in the current move -*motion.enable* IN BIT:: - If this bit is driven FALSE, motion stops, the machine is placed in +*motion.enable* IN BOOL:: + If this bool is driven FALSE, motion stops, the machine is placed in the "machine off" state, and a message is displayed for the operator. - For normal motion, drive this bit TRUE. -*motion.eoffset-active* OUT BIT:: + For normal motion, drive this bool TRUE. +*motion.eoffset-active* OUT BOOL:: Indicates external offsets are active (non-zero) -*motion.eoffset-limited* OUT BIT:: +*motion.eoffset-limited* OUT BOOL:: Indicates motion with external offsets was limited by a soft limit constraint ([AXIS_L]MIN_LIMIT,MAX_LIMIT). -*motion.feed-hold* IN BIT:: - When Feed Stop Control is enabled with M53 P1, and this bit is TRUE, +*motion.feed-hold* IN BOOL:: + When Feed Stop Control is enabled with M53 P1, and this bool is TRUE, the feed rate is set to 0. Note: feed-hold applies to G-code commands -- not jogs. -*motion.feed-inhibit* IN BIT:: +*motion.feed-inhibit* IN BOOL:: When this pin is TRUE, machine motion is inhibited for G-code commands. If the machine is performing a spindle synchronized move when this pin @@ -161,7 +161,7 @@ Motion resumes when this pin goes FALSE. Note: feed-inhibit applies to G-code commands -- not jogs. -*motion.feed-upm* OUT FLOAT:: +*motion.feed-upm* OUT REAL:: Current feed rate in G-code program units per minute for motion.motion-type feed(2) and arc(3). Value is the G-code program F value multiplied by the current feed override value and the @@ -169,53 +169,53 @@ Note: feed-inhibit applies to G-code commands -- not jogs. motion.feed-hold or motion.feed-inhibit are asserted. If units (G20 or G21) are not specified in the G-code file then units will be the last units used. -*motion.feed-inches-per-minute* OUT FLOAT:: +*motion.feed-inches-per-minute* OUT REAL:: Current feed rate in inches per minute for motion.motion-type feed(2) and arc(3). Value is the inch equivalent of the G-code program F value multiplied by the current feed override value and the motion.adaptive-feed setting (if M52 active). Value is zero if motion.feed-hold or motion.feed-inhibit are asserted. -*motion.feed-inches-per-second* OUT FLOAT:: +*motion.feed-inches-per-second* OUT REAL:: Current feed rate in inches per second for motion.motion-type feed(2) and arc(3). Value is the inch equivalent of the G-code program F value multiplied by the current feed override value and the motion.adaptive-feed setting (if M52 active). Value is zero if motion.feed-hold or motion.feed-inhibit are asserted. -*motion.feed-mm-per-minute* OUT FLOAT:: +*motion.feed-mm-per-minute* OUT REAL:: Current feed rate in mm per minute for motion.motion-type feed(2) and arc(3). Value is the mm equivalent of the G-code program F value multiplied by the current feed override value and the motion.adaptive-feed setting (if M52 active). Value is zero if motion.feed-hold or motion.feed-inhibit are asserted. -*motion.feed-mm-per-second* OUT FLOAT:: +*motion.feed-mm-per-second* OUT REAL:: Current feed rate in mm per second for motion.motion-type feed(2) and arc(3). Value is the mm equivalent of the G-code program F value multiplied by the current feed override value and the motion.adaptive-feed setting (if M52 active). Value is zero if motion.feed-hold or motion.feed-inhibit are asserted. -*motion.homing-inhibit* IN BIT:: - If this bit is TRUE, initiation of any joint homing move (including "Home All") +*motion.homing-inhibit* IN BOOL:: + If this bool is TRUE, initiation of any joint homing move (including "Home All") is disallowed and an error is reported. By default, homing is allowed in joint mode whenever motion is enabled. -*motion.is-all-homed* OUT BIT:: +*motion.is-all-homed* OUT BOOL:: TRUE if all active joints is homed. -*motion.jog-inhibit* IN BIT:: - If this bit is TRUE, jogging of any joint or axis is disallowed and an error is reported. -*motion.jog-stop* IN BIT:: +*motion.jog-inhibit* IN BOOL:: + If this bool is TRUE, jogging of any joint or axis is disallowed and an error is reported. +*motion.jog-stop* IN BOOL:: If any jog is active when the pin state changes to TRUE then that jog will be stopped following the associated acceleration values. -*motion.jog-stop-immediate* IN BIT:: +*motion.jog-stop-immediate* IN BOOL:: If any jog is active when the pin state changes to TRUE then that jog will be stopped immediately. -*motion.jog-is-active* OUT BIT:: +*motion.jog-is-active* OUT BOOL:: TRUE if any joint or axis is jogging. -*motion.in-position* OUT BIT:: +*motion.in-position* OUT BOOL:: TRUE if the machine is in position (i.e., not currently moving towards the commanded position). -**motion.misc-error-**_NN_ IN BIT:: +**motion.misc-error-**_NN_ IN BOOL:: Extra error inputs for faults such as over-temperature sensors, low coolant warnings, custom HAL component errors. If driven TRUE this will disable a machine. Similar to spindle.amp-fault-in. -*motion.motion-enabled* OUT BIT:: +*motion.motion-enabled* OUT BOOL:: + -*motion.motion-type* OUT S32:: +*motion.motion-type* OUT SINT:: These values are from src/emc/nml_intf/motion_types.h: 0: Idle (no motion) @@ -233,24 +233,24 @@ Note: feed-inhibit applies to G-code commands -- not jogs. 6: Rotary unlock for traverse -*motion.on-soft-limit* OUT BIT:: -*motion.probe-input* IN BIT:: +*motion.on-soft-limit* OUT BOOL:: +*motion.probe-input* IN BOOL:: G38.n uses the value on this pin to determine when the probe has made contact. TRUE for probe contact closed (touching), FALSE for probe contact open. -*motion.program-line* OUT S32:: +*motion.program-line* OUT SINT:: The current program line while executing. Zero if not running or between lines while single stepping. -*motion.requested-vel* OUT FLOAT:: +*motion.requested-vel* OUT REAL:: The current requested velocity in user units per second. This value is the F-word setting from the G-code file, possibly reduced to accommodate machine velocity and acceleration limits. The value on this pin does not reflect the feed override or any other adjustments. -*motion.servo.last-period* OUT U32:: +*motion.servo.last-period* OUT UINT:: Time (in ns) between invocations of the servo thread. Typically, this number divided by the CPU speed gives the time in seconds, and can be used to determine whether the realtime motion controller is meeting its timing constraints -*motion.switchkins-type* IN float:: +*motion.switchkins-type* IN REAL:: Kinematics modules that define the functions kinematicsSwitchable() and kinematicsSwitch() receive the *integer* value of this pin to select the machine kinematics functions. Extra G-code commands are @@ -263,15 +263,15 @@ Note: feed-inhibit applies to G-code commands -- not jogs. deprecation once, the first time the pin is used to change the kinematics. The pin is in a grace period: it keeps working for now, but is meant to be removed in the future. -*motion.kins-type* OUT float:: +*motion.kins-type* OUT REAL:: The kinematics currently in force, whether it was selected by *G12.1*, by *G13.1* or from *motion.switchkins-type*. A kinematics type the module refuses is not reported here. -*motion.teleop-mode* OUT BIT:: +*motion.teleop-mode* OUT BOOL:: Motion mode is teleop (axis coordinate jogging available). -*motion.tooloffset.L* OUT FLOAT:: +*motion.tooloffset.L* OUT REAL:: Current tool offset for each axis where (*L* is the axis letter, one of: *x y z a b c u v w*) -*motion.tp-reverse* OUT BIT:: +*motion.tp-reverse* OUT BOOL:: Trajectory planning is reversed (reverse run) === Interpreter Metadata Pins @@ -280,10 +280,10 @@ These pins provide geometric intent and interpreter state for the segment of mot ==== Interpreter Status Pins -* `motion.interp.line-number` (s32, out) + +* `motion.interp.line-number` (sint, out) + The current G-code line number being executed. -* `motion.interp.motion-type` (s32, out) + +* `motion.interp.motion-type` (sint, out) + The type of motion currently in progress: ** 0: None ** 1: Rapid (G0) @@ -291,30 +291,30 @@ These pins provide geometric intent and interpreter state for the segment of mot ** 3: Arc (G2, G3) ** 4: Tool Change/Other -* `motion.interp.feedrate` (float, out) + +* `motion.interp.feedrate` (real, out) + The interpreted feedrate for the current segment in units per minute. ==== Interpreter Geometric Pins -* `motion.interp.heading` (float, out) + +* `motion.interp.heading` (real, out) + The XY plane heading of the current linear move in degrees. Measured counter-clockwise from the +X axis (0 to 360). This could be used to control a tangential knife. -* `motion.interp.arc-radius` (float, out) + +* `motion.interp.arc-radius` (real, out) + The radius of the current circular move. This value is 0.0 during linear moves. This could be used to modify plasma cutting parameters based on the arc radius and when hole cutting. -* `motion.interp.arc-center-x` (float, out) + +* `motion.interp.arc-center-x` (real, out) + The absolute X-coordinate of the center point for the current arc. 0 if in YZ plane -* `motion.interp.arc-center-y` (float, out) + +* `motion.interp.arc-center-y` (real, out) + The absolute Y-coordinate of the center point for the current arc. 0 if in XZ plane -* `motion.interp.arc-center-z` (float, out) + +* `motion.interp.arc-center-z` (real, out) + The absolute Y-coordinate of the center point for the current arc if in XZ or YZ plane. -* `motion.interp.normal-heading` (float, out) + +* `motion.interp.normal-heading` (real, out) + the heading from the current point back to the arc centre for the current arc. - * `motion.interp.iscircle` (bit, out) + + * `motion.interp.iscircle` (bool, out) + True if the current arc is a full circle and not a helix. [NOTE] @@ -324,52 +324,52 @@ These pins represent the *commanded geometric intent* from the interpreter and a (*L* is the axis letter, one of: *x y z a b c u v w*) -**axis.**_L_**.eoffset** OUT FLOAT:: +**axis.**_L_**.eoffset** OUT REAL:: Current external offset. -**axis.**_L_**.eoffset-clear** IN BIT:: +**axis.**_L_**.eoffset-clear** IN BOOL:: Clear external offset request -**axis.**_L_**.eoffset-counts** IN S32:: +**axis.**_L_**.eoffset-counts** IN SINT:: Counts input for external offset. The eoffset-counts are transferred to an internal register. The applied external offset is the product of the register counts and the eoffset-scale value. The register is *reset to zero at each machine startup*. If the machine is turned off with an external offset active, the eoffset-counts pin should be set to zero before restarting. -**axis.**_L_**.eoffset-enable** IN BIT:: +**axis.**_L_**.eoffset-enable** IN BOOL:: Enable for external offset (also requires INI file setting for [AXIS_L]OFFSET_AV_RATIO) -**axis.**_L_**.eoffset-request** OUT FLOAT:: +**axis.**_L_**.eoffset-request** OUT REAL:: Debug pin for requested external offset. -**axis.**_L_**.eoffset-scale** IN FLOAT:: +**axis.**_L_**.eoffset-scale** IN REAL:: Scale for external offset. -**axis.**_L_**.jog-accel-fraction** IN FLOAT:: +**axis.**_L_**.jog-accel-fraction** IN REAL:: Sets acceleration for wheel jogging to a fraction of the INI max_acceleration for the axis. Values greater than 1 or less than zero are ignored. -**axis.**_L_**.jog-counts** IN S32:: +**axis.**_L_**.jog-counts** IN SINT:: Connect to the "counts" pin of an external encoder to use a physical jog wheel. -**axis.**_L_**.jog-enable** IN BIT:: +**axis.**_L_**.jog-enable** IN BOOL:: When TRUE (and in manual mode), any change to "jog-counts" will result in motion. When false, "jog-counts" is ignored. -**axis.**_L_**.jog-scale** IN FLOAT:: +**axis.**_L_**.jog-scale** IN REAL:: Sets the distance moved for each count on "jog-counts", in machine units. -**axis.**_L_**.jog-vel-mode** IN BIT:: +**axis.**_L_**.jog-vel-mode** IN BOOL:: When FALSE (the default), the jogwheel operates in position mode. The axis will move exactly jog-scale units for each count, regardless of how long that might take. When TRUE, the wheel operates in velocity mode - motion stops when the wheel stops, even if that means the commanded motion is not completed. -**axis.**_L_**.kb-jog-active** OUT BIT:: +**axis.**_L_**.kb-jog-active** OUT BOOL:: (free planner axis jogging active (keyboard or halui)) -**axis.**_L_**.pos-cmd** OUT FLOAT:: +**axis.**_L_**.pos-cmd** OUT REAL:: The axis commanded position. There may be several offsets between the axis and motor coordinates: Backlash compensation, screw error compensation, and home offsets. External offsets are reported separately (axis._L_.eoffset). -**axis.**_L_**.teleop-pos-cmd** OUT FLOAT:: -**axis.**_L_**.teleop-tp-enable** OUT BIT:: +**axis.**_L_**.teleop-pos-cmd** OUT REAL:: +**axis.**_L_**.teleop-tp-enable** OUT BOOL:: TRUE when the "teleop planner" is enabled for this axis. -**axis.**_L_**.teleop-vel-cmd** OUT FLOAT:: +**axis.**_L_**.teleop-vel-cmd** OUT REAL:: The axis's commanded velocity. -**axis.**_L_**.teleop-vel-lim** OUT FLOAT:: +**axis.**_L_**.teleop-vel-lim** OUT REAL:: The velocity limit for the teleop planner. -**axis.**_L_**.wheel-jog-active** OUT BIT:: +**axis.**_L_**.wheel-jog-active** OUT BOOL:: + == JOINT PINS @@ -378,97 +378,97 @@ _N_ is the joint number (0 ... _num_joints_-1)) Note: Pins marked *(DEBUG)* serve as debugging aids and are subject to change or removal at any time. -**joint.**_N_**.acc-cmd** OUT FLOAT *(DEBUG)*:: +**joint.**_N_**.acc-cmd** OUT REAL *(DEBUG)*:: The joint's commanded acceleration. -**joint.**_N_**.active** OUT BIT *(DEBUG)*:: +**joint.**_N_**.active** OUT BOOL *(DEBUG)*:: TRUE when this joint is active. -**joint.**_N_**.amp-enable-out** OUT BIT:: +**joint.**_N_**.amp-enable-out** OUT BOOL:: TRUE if the amplifier for this joint should be enabled. -**joint.**_N_**.amp-fault-in** IN BIT:: +**joint.**_N_**.amp-fault-in** IN BOOL:: Should be driven TRUE if an external fault is detected with the amplifier for this joint. -**joint.**_N_**.backlash-corr** OUT FLOAT *(DEBUG)*:: +**joint.**_N_**.backlash-corr** OUT REAL *(DEBUG)*:: Backlash or screw compensation raw value. -**joint.**_N_**.backlash-filt** OUT FLOAT *(DEBUG)*:: +**joint.**_N_**.backlash-filt** OUT REAL *(DEBUG)*:: Backlash or screw compensation filtered value (respecting motion limits). -**joint.**_N_**.backlash-vel** OUT FLOAT *(DEBUG)*:: +**joint.**_N_**.backlash-vel** OUT REAL *(DEBUG)*:: Backlash or screw compensation velocity. -**joint.**_N_**.coarse-pos-cmd** OUT FLOAT *(DEBUG)*:: -**joint.**_N_**.error** OUT BIT *(DEBUG)*:: +**joint.**_N_**.coarse-pos-cmd** OUT REAL *(DEBUG)*:: +**joint.**_N_**.error** OUT BOOL *(DEBUG)*:: TRUE when t*his joint has encountered an error, such as a limit switch closing. -**joint.**_N_**.f-error** OUT FLOAT *(DEBUG)*:: +**joint.**_N_**.f-error** OUT REAL *(DEBUG)*:: The actual following error. -**joint.**_N_**.f-error-lim** OUT FLOAT *(DEBUG)*:: +**joint.**_N_**.f-error-lim** OUT REAL *(DEBUG)*:: The following error limit. -**joint.**_N_**.f-errored** OUT BIT *(DEBUG)*:: +**joint.**_N_**.f-errored** OUT BOOL *(DEBUG)*:: TRUE when this joint has exceeded the following error limit. -**joint.**_N_**.faulted** OUT BIT *(DEBUG)*:: -**joint.**_N_**.free-pos-cmd** OUT FLOAT *(DEBUG)*:: +**joint.**_N_**.faulted** OUT BOOL *(DEBUG)*:: +**joint.**_N_**.free-pos-cmd** OUT REAL *(DEBUG)*:: The "free planner" commanded position for this joint. -**joint.**_N_**.free-tp-enable** OUT BIT *(DEBUG)*:: +**joint.**_N_**.free-tp-enable** OUT BOOL *(DEBUG)*:: TRUE when the "free planner" is enabled for this joint. -**joint.**_N_**.free-vel-lim** OUT FLOAT *(DEBUG)*:: +**joint.**_N_**.free-vel-lim** OUT REAL *(DEBUG)*:: The velocity limit for the free planner. -**joint.**_N_**.home-state** OUT S32 *(DEBUG)*:: +**joint.**_N_**.home-state** OUT SINT *(DEBUG)*:: homing state machine state -**joint.**_N_**.home-sw-in** IN BIT:: +**joint.**_N_**.home-sw-in** IN BOOL:: Should be driven TRUE if the home switch for this joint is closed. -**joint.**_N_**.homed** OUT BIT *(DEBUG)*:: +**joint.**_N_**.homed** OUT BOOL *(DEBUG)*:: TRUE if the joint has been homed. -**joint.**_N_**.homing** OUT BIT:: +**joint.**_N_**.homing** OUT BOOL:: TRUE if the joint is currently homing. -**joint.**_N_**.in-position** OUT BIT *(DEBUG)*:: +**joint.**_N_**.in-position** OUT BOOL *(DEBUG)*:: TRUE if the joint is using the "free planner" and has come to a stop. -**joint.**_N_**.index-enable** IO BIT:: +**joint.**_N_**.index-enable** IO BOOL:: Should be attached to the index-enable pin of the joint's encoder to enable homing to index pulse. -**joint.**_N_**.is-unlocked** IN BIT:: +**joint.**_N_**.is-unlocked** IN BOOL:: Indicates joint is unlocked (see JOINT UNLOCK PINS). -**joint.**_N_**.jog-accel-fraction** IN FLOAT:: +**joint.**_N_**.jog-accel-fraction** IN REAL:: Sets acceleration for wheel jogging to a fraction of the INI max_acceleration for the joint. Values greater than 1 or less than zero are ignored. -**joint.**_N_**.jog-counts** IN S32:: +**joint.**_N_**.jog-counts** IN SINT:: Connect to the "counts" pin of an external encoder to use a physical jog wheel. -**joint.**_N_**.jog-enable** IN BIT:: +**joint.**_N_**.jog-enable** IN BOOL:: When TRUE (and in manual mode), any change to "jog-counts" will result in motion. When false, "jog-counts" is ignored. -**joint.**_N_**.jog-scale** IN FLOAT:: +**joint.**_N_**.jog-scale** IN REAL:: Sets the distance moved for each count on "jog-counts", in machine units. -**joint.**_N_**.jog-vel-mode** IN BIT:: +**joint.**_N_**.jog-vel-mode** IN BOOL:: When FALSE (the default), the jogwheel operates in position mode. The joint will move exactly jog-scale units for each count, regardless of how long that might take. When TRUE, the wheel operates in velocity mode - motion stops when the wheel stops, even if that means the commanded motion is not completed. -**joint.**_N_**.kb-jog-active** OUT BIT *(DEBUG)*:: +**joint.**_N_**.kb-jog-active** OUT BOOL *(DEBUG)*:: (free planner joint jogging active (keyboard or halui)) -**joint.**_N_**.motor-offset** OUT FLOAT *(DEBUG)*:: +**joint.**_N_**.motor-offset** OUT REAL *(DEBUG)*:: joint motor offset established when joint is homed. -**joint.**_N_**.motor-pos-cmd** OUT FLOAT:: +**joint.**_N_**.motor-pos-cmd** OUT REAL:: The commanded position for this joint. -**joint.**_N_**.motor-pos-fb** IN FLOAT:: +**joint.**_N_**.motor-pos-fb** IN REAL:: The actual position for this joint. -**joint.**_N_**.neg-hard-limit** OUT BIT *(DEBUG)*:: +**joint.**_N_**.neg-hard-limit** OUT BOOL *(DEBUG)*:: The negative hard limit for the joint -**joint.**_N_**.neg-lim-sw-in** IN BIT:: +**joint.**_N_**.neg-lim-sw-in** IN BOOL:: Should be driven TRUE if the negative limit switch for this joint is tripped. -**joint.**_N_**.pos-cmd** OUT FLOAT:: +**joint.**_N_**.pos-cmd** OUT REAL:: The joint (as opposed to motor) commanded position. There may be several offsets between the joint and motor coordinates: backlash compensation, screw error compensation, and home offsets. -**joint.**_N_**.pos-fb** OUT FLOAT:: +**joint.**_N_**.pos-fb** OUT REAL:: The joint feedback position. This value is computed from the actual motor position minus joint offsets. Useful for machine visualization. -**joint.**_N_**.pos-hard-limit** OUT BIT *(DEBUG)*:: +**joint.**_N_**.pos-hard-limit** OUT BOOL *(DEBUG)*:: The positive hard limit for the joint. -**joint.**_N_**.pos-lim-sw-in** IN BIT:: +**joint.**_N_**.pos-lim-sw-in** IN BOOL:: Should be driven TRUE if the positive limit switch for this joint is tripped. -**joint.**_N_**.unlock** OUT BIT:: +**joint.**_N_**.unlock** OUT BOOL:: TRUE if the axis is a locked joint (typically a rotary) and a move is commanded (see JOINT UNLOCK PINS). -**joint.**_N_**.vel-cmd** OUT FLOAT *(DEBUG)*:: +**joint.**_N_**.vel-cmd** OUT REAL *(DEBUG)*:: The joint's commanded velocity. -**joint.**_N_**.jerk-cmd** OUT FLOAT *(DEBUG)*:: +**joint.**_N_**.jerk-cmd** OUT REAL *(DEBUG)*:: The joint's commanded jerk (rate of change of acceleration). Only active when S-curve trajectory planning is enabled (INI file [TRAJ]PLANNER_TYPE=1 and [TRAJ]MAX_LINEAR_JERK>0). Jerk limits are set via INI file [JOINT_N]MAX_JERK or via the ini.N.max_jerk HAL pin. -**joint.**_N_**.wheel-jog-active** OUT BIT *(DEBUG)*:: +**joint.**_N_**.wheel-jog-active** OUT BOOL *(DEBUG)*:: + == JOINT posthome pins @@ -491,78 +491,78 @@ Example: loadrt motmod ... **unlock_joints_mask=**0x38 creates unlock pins for j (_M_ is the spindle number (*0* ... *num_spindles-1*)) -**spindle.**_M_**.amp-fault-in** IN BIT:: +**spindle.**_M_**.amp-fault-in** IN BOOL:: Should be driven TRUE if an external fault is detected with the amplifier for this spindle. -**spindle.**_M_**.at-speed** IN BIT:: +**spindle.**_M_**.at-speed** IN BOOL:: Motion will pause until this pin is TRUE, under the following conditions: Before the first feed move after each spindle start or speed change; before the start of every chain of spindle-synchronized moves; and if in CSS mode, at every rapid->feed transition. -**spindle.**_M_**.brake** OUT BIT:: +**spindle.**_M_**.brake** OUT BOOL:: TRUE when the spindle brake should be applied. -**spindle.**_M_**.forward** OUT BIT:: +**spindle.**_M_**.forward** OUT BOOL:: TRUE when the spindle should rotate forward. -**spindle.**_M_**.index-enable** I/O BIT:: +**spindle.**_M_**.index-enable** IO BOOL:: For correct operation of spindle synchronized moves, this signal must be hooked to the index-enable pin of the spindle encoder. -**spindle.**_M_**.inhibit** IN BIT:: +**spindle.**_M_**.inhibit** IN BOOL:: When TRUE, the spindle speed is set and held to 0. -**spindle.**_M_**.is-oriented** IN BIT:: +**spindle.**_M_**.is-oriented** IN BOOL:: Acknowledge pin for spindle-orient. Completes orient cycle. If spindle-orient was true when spindle-is-oriented was asserted, the spindle-orient pin is cleared and the spindle-locked pin is asserted. Also, the spindle-brake pin is asserted. -**spindle.**_M_**.locked** OUT BIT:: +**spindle.**_M_**.locked** OUT BOOL:: Spindle orient complete pin. Cleared by any of M3, M4 or M5. -**spindle.**_M_**.on** OUT BIT:: +**spindle.**_M_**.on** OUT BOOL:: TRUE when spindle should rotate. -**spindle.**_M_**.orient** OUT BIT:: +**spindle.**_M_**.orient** OUT BOOL:: Indicates start of spindle orient cycle. Set by M19. Cleared by any of M3, M4 or M5. If spindle-orient-fault is not zero during spindle-orient true, the M19 command fails with an error message. -**spindle.**_M_**.orient-angle** OUT FLOAT:: +**spindle.**_M_**.orient-angle** OUT REAL:: Desired spindle orientation for M19. Value of the M19 R word parameter plus the value of the [RS274NGC]ORIENT_OFFSET INI parameter. -**spindle.**_M_**.orient-fault** IN S32:: +**spindle.**_M_**.orient-fault** IN SINT:: Fault code input for orient cycle. Any value other than zero will cause the orient cycle to abort. -**spindle.**_M_**.orient-mode** OUT BIT:: +**spindle.**_M_**.orient-mode** OUT BOOL:: Desired spindle rotation mode. Reflects M19 P parameter word. -**spindle.**_M_**.reverse** OUT BIT:: +**spindle.**_M_**.reverse** OUT BOOL:: TRUE when the spindle should rotate backward. -**spindle.**_M_**.revs** IN FLOAT:: +**spindle.**_M_**.revs** IN REAL:: For correct operation of spindle synchronized moves, this signal must be hooked to the position pin of the spindle encoder. -**spindle.**_M_**.speed-cmd-rps** FLOAT OUT:: +**spindle.**_M_**.speed-cmd-rps** OUT REAL:: Commanded spindle speed in units of revolutions per second. -**spindle.**_M_**.speed-in** IN FLOAT:: +**spindle.**_M_**.speed-in** IN REAL:: Actual spindle speed feedback in revolutions per second; used for G96 (constant surface speed) and G95 (feed per revolution) modes. -**spindle.**_M_**.speed-out** OUT FLOAT:: +**spindle.**_M_**.speed-out** OUT REAL:: Desired spindle speed in rotations per minute. -**spindle.**_M_**.speed-out-abs** OUT FLOAT:: +**spindle.**_M_**.speed-out-abs** OUT REAL:: Desired spindle speed in rotations per minute, always positive regardless of spindle direction. -**spindle.**_M_**.speed-out-rps** OUT FLOAT:: +**spindle.**_M_**.speed-out-rps** OUT REAL:: Desired spindle speed in rotations per second. -**spindle.**_M_**.speed-out-rps-abs** OUT FLOAT:: +**spindle.**_M_**.speed-out-rps-abs** OUT REAL:: Desired spindle speed in rotations per second, always positive regardless of spindle direction. == MOTION PARAMETERS Many of the parameters serve as debugging aids, and are subject to change or removal at any time. -*motion-command-handler.tmax* RW S32:: +*motion-command-handler.tmax* RW SINT:: Show information about the execution time of these HAL functions in ns. -*motion-command-handler.tmax-increased* RO BIT:: +*motion-command-handler.tmax-increased* RO BOOL:: -*motion-controller.tmax* RW S32:: +*motion-controller.tmax* RW SINT:: Show information about the execution time of these HAL functions in ns. -*motion-controller.tmax-increased* RO BIT:: +*motion-controller.tmax-increased* RO BOOL:: + **motion.debug-**_*_:: diff --git a/docs/src/man/man9/mux_generic.9.adoc b/docs/src/man/man9/mux_generic.9.adoc index 16f28d729c9..d32e0baaffe 100644 --- a/docs/src/man/man9/mux_generic.9.adoc +++ b/docs/src/man/man9/mux_generic.9.adoc @@ -8,13 +8,13 @@ mux_generic - select one from several inputs and forwards it to a single output **loadrt mux_generic config="**____[,____],...**"** -Types: **b** = bit, **f** = float, **s** = signed integer, **u** = unsigned integer +Types: **b** = bool, **f** = real, **s** = sint, **u** = uint Example: **loadrt mux_generic config="**bb8,fu12**"** == FUNCTIONS -**mux-gen.**_NN_ Depending on the data types can run in either a floating point or non-floating point thread. +**mux-gen.**_NN_ Multiplexer function. == PINS @@ -23,23 +23,23 @@ Example: **loadrt mux_generic config="**bb8,fu12**"** mux-gen.NN.sel-bit-BB ───────────────┐ │ │ mux-gen.NN.sel-int ─────────────┐ │ │ │ ┌───────┴─┴─┴─┴───────┐ -mux-gen.NN.in-[bit/float/s32/u32]-00 ─────┤ ─────o \ │ - ... ─────┤ ─────o o───── ├───── mux-gen.NN.out-[bit/float/s32/u32] -mux-gen.NN.in-[bit/float/s32/u32]-MM ─────┤ ─────o │ +mux-gen.NN.in-[bool/real/sint/uint]-00 ───┤ ─────o \ │ + ... ─────┤ ─────o o───── ├───── mux-gen.NN.out-[bool/real/sint/uint] +mux-gen.NN.in-[bool/real/sint/uint]-MM ───┤ ─────o │ │ │ mux-gen.NN.suppress-no-input ─────┤ │ mux-gen.NN.debounce-us ─────┤ │ └─────────────────────┘ -**mux-gen**.__N__.**suppress-no-input** bit in:: +**mux-gen**.__N__.**suppress-no-input** bool in:: This suppresses changing the output if all select lines are false. This stops unwanted jumps in output between transitions of input but makes in00 unavailable. -**mux-gen**.__N__.**debounce-us** unsigned in:: +**mux-gen**.__N__.**debounce-us** uint in:: sets debounce time in microseconds, e.g. 100000 = a tenth of a second. The selection inputs must be stable this long before the output changes. This helps to ignore 'noisy' switches. -**mux-gen**.__N__.**sel-bit-**__BB__ bit in (BB=0..bit width of _size_):: -**mux-gen**.__N__.**sel-int** unsigned in:: +**mux-gen**.__N__.**sel-bit-**__BB__ bool in (BB=0..bit width of _size_):: +**mux-gen**.__N__.**sel-int** uint in:: Together, these determine which **in**__M__ value is copied to *output*. The bit pins are interpreted as binary bits, and the result is simply added on to the integer pin input. It is expected that either one or @@ -49,20 +49,19 @@ mux-gen.NN.in-[bit/float/s32/u32]-MM ─────┤ ─────o component is an integer power of two. This component (unlike mux16) does not offer the option of decoding Gray-code, however the same effect can be achieved by arranging the order of the input values to suit. -**mux-gen**.__N__.**in-**[**bit**/**float**/**s32**/**u32**]**-**__MM__ variable-type in:: +**mux-gen**.__N__.**in-**[**bool**/**real**/**sint**/**uint**]**-**__MM__ variable-type in:: The possible output values that are selected by the selection pins. -**mux-gen**.__N__.**out-**[**bit**/**float**/**s32**/**u32**] variable-type out:: +**mux-gen**.__N__.**out-**[**bool**/**real**/**sint**/**uint**] variable-type out:: Follows the value of one of the **in**__N__ values according to the selection bits and/or the selection number. Values will be - converted/truncated according to standard C rules. This means, for - example that a float input greater than 2147483647 will give an S32 - output of -2147483648. + converted and clamped. This means, for example that a REAL input greater + than (approx.) 2^63^-1 will give a SINT output of 2^63^-1. == PARAMETERS -**mux-gen**.__N__.**elapsed** float r:: +**mux-gen**.__N__.**elapsed** real r:: Current value of the internal debounce timer for debugging. -**mux-gen**.__N__.**selected** s32 r:: +**mux-gen**.__N__.**selected** sint r:: Current value of the internal selection variable after conversion for debugging. Possibly useful for setting up gray-code switches. @@ -73,20 +72,16 @@ components. It allows the creation of arbitrary-size multiplexers (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 mux and a 12-element float-to-unsigned mux. The -code letters are **b** = bit, **f** = float, **s** = signed integer, **u** = unsigned +4-element bool-to-bool mux and a 12-element real-to-uint mux. The +code letters are **b** = bool, **f** = real, **s** = sint, **u** = uint integer. The first letter code is the input type, the second is the output type. The codes are not case-sensitive. The order of the letters is significant but the position in the string is not. Do not insert any -spaces in the config string. Any non-zero float value will be converted -to a "true" output in bit form. Be wary that float datatypes can be -very, very, close to zero and not actually be equal to zero. +spaces in the config string. Any non-zero real value will be converted +to a "true" output in bool form when it is more than ±2e-7 from zero. Each mux has its own HAL function and must be added to a thread -separately. If neither input nor output is of type float then the -function is base-thread (non floating-point) safe. Any mux_generic with -a floating point input or output can only be added to a floating-point -thread. +separately. == SEE ALSO diff --git a/docs/src/man/man9/pid.9.adoc b/docs/src/man/man9/pid.9.adoc index 7a148cd8923..5ae8a02315b 100644 --- a/docs/src/man/man9/pid.9.adoc +++ b/docs/src/man/man9/pid.9.adoc @@ -42,7 +42,7 @@ the feedback match the command. As such, for a position loop 'output' is a velocity, in inches/sec, mm/sec, degrees/sec, etc. Each loop has several other pins as well. 'error' is equal to 'command' -minus 'feedback'. 'enable' is a bit that enables the loop. If 'enable' +minus 'feedback'. 'enable' is a bool that enables the loop. If 'enable' is false, all integrators are reset, and the output is forced to zero. If 'enable' is true, the loop operates normally. @@ -167,50 +167,50 @@ The *pid.N.* format is shown in the following descriptions. == PINS -**pid.**_N_**.command** float in:: +**pid.**_N_**.command** real in:: The desired (commanded) value for the control loop. -**pid.**_N_**.Pgain** float in:: +**pid.**_N_**.Pgain** real in:: Proportional gain. Results in a contribution to the output that is the error multiplied by *Pgain*. -**pid.**_N_**.Igain** float in:: +**pid.**_N_**.Igain** real in:: Integral gain. Results in a contribution to the output that is the integral of the error multiplied by *Igain*. For example an error of 0.02 that lasted 10 seconds would result in an integrated error (*errorI*) of 0.2, and if *Igain* is 20, the integral term would add 4.0 to the output. -**pid.**_N_**.Dgain** float in:: +**pid.**_N_**.Dgain** real in:: Derivative gain. Results in a contribution to the output that is the rate of change (derivative) of the error multiplied by *Dgain*. For example an error that changed from 0.02 to 0.03 over 0.2 seconds would result in an error derivative (*errorD*) of of 0.05, and if *Dgain* is 5, the derivative term would add 0.25 to the output. -**pid.**_N_**.feedback** float in:: +**pid.**_N_**.feedback** real in:: The actual (feedback) value, from some sensor such as an encoder. -**pid.**_N_**.output** float out:: +**pid.**_N_**.output** real out:: The output of the PID loop, which goes to some actuator such as a motor. -**pid.**_N_**.command-deriv** float in:: +**pid.**_N_**.command-deriv** real in:: The derivative of the desired (commanded) value for the control loop. If no signal is connected then the derivative will be estimated numerically. -**pid.**_N_**.feedback-deriv** float in:: +**pid.**_N_**.feedback-deriv** real in:: The derivative of the actual (feedback) value for the control loop. If no signal is connected then the derivative will be estimated numerically. When the feedback is from a quantized position source (e.g., encoder feedback position), behavior of the D term can be improved by using a better velocity estimate here, such as the velocity output of encoder(9) or hostmot2(9). -**pid.**_N_**.error-previous-target** bit in:: +**pid.**_N_**.error-previous-target** bool in:: Use previous invocation's target vs. current position for error calculation, like the motion controller expects. This may make torque-mode position loops and loops requiring a large I gain easier to tune, by eliminating velocity-dependent following error. -**pid.**_N_**.error** float out:: +**pid.**_N_**.error** real out:: The difference between command and feedback. -**pid.**_N_**.enable** bit in:: +**pid.**_N_**.enable** bool in:: When true, enables the PID calculations. When false, *output* is zero, and all internal integrators, etc, are reset. -**pid.**_N_**.index-enable** bit in:: +**pid.**_N_**.index-enable** bool in:: On the falling edge of *index-enable*, pid does not update the internal command derivative estimate. On systems which use the encoder index pulse, this pin should be connected to the index-enable signal. @@ -218,7 +218,7 @@ The *pid.N.* format is shown in the following descriptions. command causes a single-cycle spike in the PID output. On systems which use exactly one of the *-deriv* inputs, this affects the D term as well. -**pid.**_N_**.bias** float in:: +**pid.**_N_**.bias** real in:: *bias* is a constant amount that is added to the output. In most cases it should be left at zero. However, it can sometimes be useful to compensate for offsets in servo amplifiers, or to balance the weight @@ -226,34 +226,34 @@ The *pid.N.* format is shown in the following descriptions. loop is disabled, just like all other components of the output. If a non-zero output is needed even when the PID loop is disabled, it should be added with an external HAL sum2 block. -**pid.**_N_**.FF0** float in:: +**pid.**_N_**.FF0** real in:: Zero order feed-forward term. Produces a contribution to the output that is *FF0* multiplied by the commanded value. For position loops, it should usually be left at zero. For velocity loops, *FF0* can compensate for friction or motor counter-EMF and may permit better tuning if used properly. -**pid.**_N_**.FF1** float in:: +**pid.**_N_**.FF1** real in:: First order feed-forward term. Produces a contribution to the output that is *FF1* multiplied by the derivative of the commanded value. For position loops, the contribution is proportional to speed, and can be used to compensate for friction or motor CEMF. For velocity loops, it is proportional to acceleration and can compensate for inertia. In both cases, it can result in better tuning if used properly. -**pid.**_N_**.FF2** float in:: +**pid.**_N_**.FF2** real in:: Second order feed-forward term. Produces a contribution to the output that is *FF2* multiplied by the second derivative of the commanded value. For position loops, the contribution is proportional to acceleration, and can be used to compensate for inertia. For velocity loops, the contribution is proportional to jerk, and should usually be left at zero. -**pid.**_N_**.FF3** float in:: +**pid.**_N_**.FF3** real in:: Third order feed-forward term. Produces a contribution to the output that is *FF3* multiplied by the third derivative of the commanded value. For position loops, the contribution is proportional to jerk, and can be used to compensate for residual errors during acceleration. For velocity loops, the contribution is proportional to snap(jounce), and should usually be left at zero. -**pid.**_N_**.deadband** float in:: +**pid.**_N_**.deadband** real in:: Defines a range of "acceptable" error. If the absolute value of *error* is less than *deadband*, it will be treated as if the error is zero. When using feedback devices such as encoders that are inherently @@ -264,95 +264,95 @@ The *pid.N.* format is shown in the following descriptions. subtracted from the error before performing the loop calculations, to prevent a step in the transfer function at the edge of the deadband (see *BUGS*). -**pid.**_N_**.maxoutput** float in:: +**pid.**_N_**.maxoutput** real in:: Output limit. The absolute value of the output will not be permitted to exceed *maxoutput*, unless *maxoutput* is zero. When the output is limited, the error integrator will hold instead of integrating, to prevent windup and overshoot. -**pid.**_N_**.maxerror** float in:: +**pid.**_N_**.maxerror** real in:: Limit on the internal error variable used for P, I, and D. Can be used to prevent high *Pgain* values from generating large outputs under conditions when the error is large (for example, when the command makes a step change). Not normally needed, but can be useful when tuning non-linear systems. -**pid.**_N_**.maxerrorD** float in:: +**pid.**_N_**.maxerrorD** real in:: Limit on the error derivative. The rate of change of error used by the *Dgain* term will be limited to this value, unless the value is zero. Can be used to limit the effect of *Dgain* and prevent large output spikes due to steps on the command and/or feedback. Not normally needed. -**pid.**_N_**.maxerrorI** float in:: +**pid.**_N_**.maxerrorI** real in:: Limit on error integrator. The error integrator used by the *Igain* term will be limited to this value, unless it is zero. Can be used to prevent integrator windup and the resulting overshoot during/after sustained errors. Not normally needed. -**pid.**_N_**.maxcmdD** float in:: +**pid.**_N_**.maxcmdD** real in:: Limit on command derivative. The command derivative used by *FF1* will be limited to this value, unless the value is zero. Can be used to prevent *FF1* from producing large output spikes if there is a step change on the command. Not normally needed. -**pid.**_N_**.maxcmdDD** float in:: +**pid.**_N_**.maxcmdDD** real in:: Limit on command second derivative. The command second derivative used by *FF2* will be limited to this value, unless the value is zero. Can be used to prevent *FF2* from producing large output spikes if there is a step change on the command. Not normally needed. -**pid.**_N_**.maxcmdDDD** float in:: +**pid.**_N_**.maxcmdDDD** real in:: Limit on command third derivative. The command third derivative used by *FF3* will be limited to this value, unless the value is zero. Can be used to prevent *FF3* from producing large output spikes if there is a step change on the command. Not normally needed. -**pid.**_N_**.saturated** bit out:: +**pid.**_N_**.saturated** bool out:: When true, the current PID output is saturated. That is, + *output* = ± *maxoutput*. -**pid.**_N_**.saturated-s** float out:: +**pid.**_N_**.saturated-s** real out:: -**pid.**_N_**.saturated-count** s32 out:: +**pid.**_N_**.saturated-count** sint out:: When true, the output of PID was continually saturated for this many seconds (*saturated-s*) or periods (*saturated-count*). === Additional auto tuning pins -**pid.**_N_**.tune-mode** bit in:: +**pid.**_N_**.tune-mode** bool in:: When true, enables auto tune mode. When false, normal PID calculations are performed. -**pid.**_N_**.tune-start** bit io:: +**pid.**_N_**.tune-start** bool io:: When set to true, starts auto tuning. Cleared when the auto tuning completes. -**pid.**_N_**.tune-type* u32 rw:: +**pid.**_N_**.tune-type** uint rw:: When set to 0, *Pgain/Igain/Dgain* are calculated. When set to 1, *Pgain/Igain/FF1* are calculated. -**pid.**_N_**.tune-cycles** u32 rw:: +**pid.**_N_**.tune-cycles** uint rw:: Determines the number of cycles to run to characterize the process. *tune-cycles* actually sets the number of half cycles. More cycles results in a more accurate characterization as the average of all cycles is used. -**pid.**_N_**.tune-effort** float rw:: +**pid.**_N_**.tune-effort** real rw:: The maximum output value used during automatic tuning. Determines the effort used in setting up the limit cycle in the process. *tune-effort* should be set to a positive value less than *maxoutput*. Start with something small and work up to a value that results in a good portion of the maximum motor current being used. The smaller the value, the smaller the amplitude of the limit cycle. -**pid.**_N_**.ultimate-gain** float ro (only if debug=1):: +**pid.**_N_**.ultimate-gain** real ro (only if debug=1):: Determined from process characterization. *ultimate-gain* is the ratio of *tune-effort* to the limit cycle amplitude multiplied by 4.0 divided by Pi. -**pid.**_N_**.ultimate-period** float ro (only if debug=1):: +**pid.**_N_**.ultimate-period** real ro (only if debug=1):: Determined from process characterization. *ultimate-period* is the period of the limit cycle. == PARAMETERS -**pid.**_N_**.errorI** float ro (only if debug=1):: +**pid.**_N_**.errorI** real ro (only if debug=1):: Integral of error. This is the value that is multiplied by *Igain* to produce the Integral term of the output. -**pid.**_N_**.errorD** float ro (only if debug=1):: +**pid.**_N_**.errorD** real ro (only if debug=1):: Derivative of error. This is the value that is multiplied by *Dgain* to produce the Derivative term of the output. -**pid.**_N_**.commandD** float ro (only if debug=1):: +**pid.**_N_**.commandD** real ro (only if debug=1):: Derivative of command. This is the value that is multiplied by *FF1* to produce the first order feed-forward term of the output. -**pid.**_N_**.commandDD** float ro (only if debug=1):: +**pid.**_N_**.commandDD** real ro (only if debug=1):: Second derivative of command. This is the value that is multiplied by *FF2* to produce the second order feed-forward term of the output. -**pid.**_N_**.commandDDD** float ro (only if debug=1):: +**pid.**_N_**.commandDDD** real ro (only if debug=1):: Third derivative of command. This is the value that is multiplied by *FF3* to produce the third order feed-forward term of the output. diff --git a/docs/src/man/man9/pwmgen.9.adoc b/docs/src/man/man9/pwmgen.9.adoc index 7eead2af2a4..981d7bb3b5a 100644 --- a/docs/src/man/man9/pwmgen.9.adoc +++ b/docs/src/man/man9/pwmgen.9.adoc @@ -49,43 +49,43 @@ type 2: up/down:: == PINS -**pwmgen.**_N_**.enable** bit in:: +**pwmgen.**_N_**.enable** bool in:: Enables PWM generator _N_ - when false, all **pwmgen.**_N_ output pins are low. -**pwmgen.**_N_**.value** float in:: +**pwmgen.**_N_**.value** real in:: Commanded value. When *value* = 0.0, duty cycle is 0%, and when *value* = ±**scale**, duty cycle is ± 100% (subject to *min-dc* and *max-dc* limitations). -**pwmgen.**_N_**.pwm* bit out (output types 0 and 1 only):: +**pwmgen.**_N_**.pwm** bool out (output types 0 and 1 only):: PWM/PDM waveform. -**pwmgen.**_N_**.dir** bit out (output type 1 only):: +**pwmgen.**_N_**.dir** bool out (output type 1 only):: Direction output: low for forward, high for reverse. -**pwmgen.**_N_**.up** bit out (output type 2 only):: +**pwmgen.**_N_**.up** bool out (output type 2 only):: PWM/PDM waveform for positive input values, low for negative inputs. -**pwmgen.**_N_**.down** bit out (output type 2 only):: +**pwmgen.**_N_**.down** bool out (output type 2 only):: PWM/PDM waveform for negative input values, low for positive inputs. -**pwmgen.**_N_**.curr-dc** float out:: +**pwmgen.**_N_**.curr-dc** real out:: The current duty cycle, after all scaling and limits have been applied. Range is from -1.0 to +1.0. -**pwmgen.**_N_**.max-dc** float in/out:: +**pwmgen.**_N_**.max-dc** real in/out:: The maximum duty cycle. A value of 1.0 corresponds to 100%. This can be useful when using transistor drivers with bootstrapped power supplies, since the supply requires some low time to recharge. -**pwmgen.**_N_**.min-dc** float in/out:: +**pwmgen.**_N_**.min-dc** real in/out:: The minimum duty cycle. A value of 1.0 corresponds to 100%. Note that when the pwm generator is disabled, the outputs are constantly low, regardless of the setting of *min-dc*. -**pwmgen.**_N_**.scale** float in/out:: +**pwmgen.**_N_**.scale** real in/out:: -**pwmgen.**_N_**.offset** float in/out:: +**pwmgen.**_N_**.offset** real in/out:: These parameters provide a scale and offset from the *value* pin to the actual duty cycle. The duty cycle is calculated according to _dc = (value/scale) + offset_, with 1.0 meaning 100%. -**pwmgen.**_N_**.pwm-freq** float in/out:: +**pwmgen.**_N_**.pwm-freq** real in/out:: PWM frequency in Hz. The upper limit is half of the frequency at which *make-pulses* is invoked, and values above that limit will be changed to the limit. If *dither-pwm* is false, the value will be changed to the nearest integer submultiple of the *make-pulses* frequency. A value of zero produces Pulse Density Modulation instead of Pulse Width Modulation. -**pwmgen.**_N_**.dither-pwm** bit in/out:: +**pwmgen.**_N_**.dither-pwm** bool in/out:: Because software-generated PWM uses a fairly slow timebase (several to many microseconds), it has limited resolution. For example, if *make-pulses* is called at a 20 kHz rate, and *pwm-freq* is 2 kHz, @@ -95,4 +95,4 @@ type 2: up/down:: PWM cycle. If *dither-pwm* is true, the output duty cycle will be dithered between the two closest values, so that the long-term average is closer to the desired level. *dither-pwm* has no effect if - *pwm-freq* is zero (PDM mode), since PDM is an inherently dithered process. \ No newline at end of file + *pwm-freq* is zero (PDM mode), since PDM is an inherently dithered process. diff --git a/docs/src/man/man9/rosekins.9.adoc b/docs/src/man/man9/rosekins.9.adoc index f9c38fcd225..d60a029b6f5 100644 --- a/docs/src/man/man9/rosekins.9.adoc +++ b/docs/src/man/man9/rosekins.9.adoc @@ -17,12 +17,12 @@ spindle (workholding, not tool holding, e.g. not a highspeed spindle) == PINS -*rosekins.revolutions* float out:: +*rosekins.revolutions* real out:: Count of crossings of the negative X axis. Clockwise crossings increment revolutions by 1, counterclockwise crossings decrement by 1. -*rosekins.theta_degrees* float out:: +*rosekins.theta_degrees* real out:: Principal value for arctan(Y/X) -*rosekins.bigtheta_degrees* float out:: +*rosekins.bigtheta_degrees* real out:: Accumulated angle (theta + revolutions * 360) == NOTES diff --git a/docs/src/man/man9/sampler.9.adoc b/docs/src/man/man9/sampler.9.adoc index ba6a5f41dcc..04b8000b6c3 100644 --- a/docs/src/man/man9/sampler.9.adoc +++ b/docs/src/man/man9/sampler.9.adoc @@ -31,10 +31,10 @@ where it can be redirected to a file or piped to some other program. commas. *sampler* exports one pin for each character in _string._ Legal characters are: -- *F, f* (float pin) -- *B, b* (bit pin) -- *S, s* (s32 pin) -- *U, u* (u32 pin) +- *F*, *f*, *R*, *r* (real pin) +- *B*, *b* (bool pin) +- *S*, *s*, *L*, *l* (sint pin) +- *U*, *u*, *K*, *k* (uint pin) == FUNCTIONS @@ -47,23 +47,23 @@ where it can be redirected to a file or piped to some other program. Pin for the data that will wind up in column _M_ of FIFO _N_ (and in column _M_ of the output file). The pin type depends on the config string. -**sampler.**_N_**.curr-depth** s32 output:: +**sampler.**_N_**.curr-depth** sint output:: Current number of samples in the FIFO. When this reaches _depth_ new data will begin overwriting old data, and some samples will be lost. -**sampler.**_N_**.full** bit output:: +**sampler.**_N_**.full** bool output:: TRUE when the FIFO _N_ is full, FALSE when there is room for another sample. -**sampler.**_N_**.enable** bit input:: +**sampler.**_N_**.enable** bool input:: When TRUE, samples are captured and placed in FIFO _N_, when FALSE, no samples are acquired. Defaults to TRUE. == PARAMETERS -**sampler.**_N_**.overruns** s32 read/write:: +**sampler.**_N_**.overruns** sint read/write:: The number of times that *sampler* has tried to write data to the HAL pins but found no room in the FIFO. It increments whenever *full* is true, and can be reset by the *setp* command. -**sampler.**_N_**.sample-num** s32 read/write:: +**sampler.**_N_**.sample-num** sint read/write:: A number that identifies the sample. It is automatically incremented for each sample, and can be reset using the *setp* command. The sample number can optionally be printed in the first column of the output diff --git a/docs/src/man/man9/siggen.9.adoc b/docs/src/man/man9/siggen.9.adoc index ee39b4ea260..6768c753069 100644 --- a/docs/src/man/man9/siggen.9.adoc +++ b/docs/src/man/man9/siggen.9.adoc @@ -43,37 +43,37 @@ The **siggen.**_N_**.** format is shown in the following descriptions. == PINS -**siggen.**_N_**.frequency** float in:: +**siggen.**_N_**.frequency** real in:: The output frequency for signal generator _N_, in Hertz. The default value is 1.0 Hertz. -**siggen.**_N_**.amplitude** float in:: +**siggen.**_N_**.amplitude** real in:: The output amplitude for signal generator _N_. If *offset* is zero, the outputs will swing from -*amplitude* to +**amplitude**. The default value is 1.00. -**siggen.**_N_**.offset** float in:: +**siggen.**_N_**.offset** real in:: The output offset for signal generator _N_. This value is added directly to the output signal. The default value is zero. -**siggen.**_N_**.reset** bit in:: +**siggen.**_N_**.reset** bool in:: Resets output pins to predetermined states: + *sine*: 0 + *sawtooth*: 0 + *square*: -1 * amplitude + *cosine*: -1 * amplitude + *triangle*: -1 * amplitude -**siggen.**_N_**.clock** bit out:: - The clock output. Bit type clock signal output at the commanded frequency. -**siggen.**_N_**.square** float out:: +**siggen.**_N_**.clock** bool out:: + The clock output. Boolean type clock signal output at the commanded frequency. +**siggen.**_N_**.square** real out:: The square wave output. Positive while *triangle* and *cosine* are ramping upwards, and while *sine* is negative. -**siggen.**_N_**.sine** float out:: +**siggen.**_N_**.sine** real out:: The sine output. Lags *cosine* by 90 degrees. -**siggen.**_N_**.cosine** float out:: +**siggen.**_N_**.cosine** real out:: The cosine output. Leads *sine* by 90 degrees. -**siggen.**_N_**.triangle** float out:: +**siggen.**_N_**.triangle** real out:: The triangle wave output. Ramps up while *square* is positive, and down while *square* is negative. Reaches its positive and negative peaks at the same time as *cosine*. -**siggen.**_N_**.sawtooth** float out:: +**siggen.**_N_**.sawtooth** real out:: The sawtooth output. Ramps upwards to its positive peak, then instantly drops to its negative peak and starts ramping again. The drop occurs when *triangle* and *cosine* are at their positive peaks, diff --git a/docs/src/man/man9/sim_encoder.9.adoc b/docs/src/man/man9/sim_encoder.9.adoc index 22666604009..8a4ce856813 100644 --- a/docs/src/man/man9/sim_encoder.9.adoc +++ b/docs/src/man/man9/sim_encoder.9.adoc @@ -47,25 +47,25 @@ The *sim-encoder.N.* format is shown in the following descriptions. == PINS -**sim-encoder.**_N_**.phase-A** bit out:: +**sim-encoder.**_N_**.phase-A** bool out:: One of the quadrature outputs. -**sim-encoder.**_N_**.phase-B** bit out:: +**sim-encoder.**_N_**.phase-B** bool out:: The other quadrature output. -**sim-encoder.**_N_**.phase-Z** bit out:: +**sim-encoder.**_N_**.phase-Z** bool out:: The index pulse. -**sim-encoder.**_N_**.speed** float in:: +**sim-encoder.**_N_**.speed** real in:: The desired speed of the encoder, in user units per per second. This is divided by *scale*, and the result is used as the encoder speed in revolutions per second. == PARAMETERS -**sim-encoder.**_N_**.ppr** u32 rw:: +**sim-encoder.**_N_**.ppr** uint rw:: The pulses per revolution of the simulated encoder. Note that this is pulses, not counts, per revolution (ppr). Each pulse or cycle from the encoder results in four counts, because every edge is counted. Default value is 100 ppr, or 400 counts per revolution. -**sim-encoder.**_N_**.scale** float rw:: +**sim-encoder.**_N_**.scale** real rw:: Scale factor for the *speed* input. The *speed* value is divided by *scale* to get the actual encoder speed in revolutions per second. For example, if *scale* is set to 60, then *speed* is in revolutions per diff --git a/docs/src/man/man9/stepgen.9.adoc b/docs/src/man/man9/stepgen.9.adoc index 16e5b6d3cb4..5e118a14254 100644 --- a/docs/src/man/man9/stepgen.9.adoc +++ b/docs/src/man/man9/stepgen.9.adoc @@ -96,66 +96,66 @@ type 15: user-specified:: == PINS -**stepgen.**__N__**.counts** s32 out:: +**stepgen.**__N__**.counts** sint out:: The current position, in counts, for channel _N_. Updated by *capture-position*. -**stepgen.**__N__**.position-fb** float out:: +**stepgen.**__N__**.position-fb** real out:: The current position, in length units (see parameter *position-scale*). Updated by *capture-position*. The resolution of *position-fb* is much finer than a single step. If you need to see individual steps, use *counts*. -**stepgen.**__N__**.enable** bit in:: +**stepgen.**__N__**.enable** bool in:: Enables output steps - when false, no steps are generated. -**stepgen.**__N__**.velocity-cmd** float in (velocity mode only):: +**stepgen.**__N__**.velocity-cmd** real in (velocity mode only):: Commanded velocity, in length units per second (see parameter *position-scale*). -**stepgen.**__N__**.position-cmd** float in (position mode only):: +**stepgen.**__N__**.position-cmd** real in (position mode only):: Commanded position, in length units (see parameter *position-scale)*. -**stepgen.**__N__**.step** bit out (step type 0 only):: +**stepgen.**__N__**.step** bool out (step type 0 only):: Step pulse output. -**stepgen.**__N__**.dir** bit out (step type 0 only):: +**stepgen.**__N__**.dir** bool out (step type 0 only):: Direction output: low for forward, high for reverse. -**stepgen.**__N__**.up** bit out (step type 1 only):: +**stepgen.**__N__**.up** bool out (step type 1 only):: Count up output, pulses for forward steps. -**stepgen.**__N__**.down** bit out (step type 1 only):: +**stepgen.**__N__**.down** bool out (step type 1 only):: Count down output, pulses for reverse steps. -**stepgen.**__N__**.phase-A** thru *phase-E* bit out (step types 2-14 only):: +**stepgen.**__N__**.phase-A** thru *phase-E* bool out (step types 2-14 only):: Output bits. `phase-A` and `phase-B` are present for step types 2-14, `phase-C` for types 3-14, `phase-D` for types 5-14, and `phase-E` for types 11-14. Behavior depends on selected stepping type. == PARAMETERS -**stepgen.**_N_**.frequency** float ro:: +**stepgen.**_N_**.frequency** real ro:: The current step rate, in steps per second, for channel _N_. -**stepgen.**_N_**.maxaccel** float rw:: +**stepgen.**_N_**.maxaccel** real rw:: The acceleration/deceleration limit, in length units per second squared. -**stepgen.**_N_**.maxvel** float rw:: +**stepgen.**_N_**.maxvel** real rw:: The maximum allowable velocity, in length units per second. If the requested maximum velocity cannot be reached with the current combination of scaling and *make-pulses* thread period, it will be reset to the highest attainable value. -**stepgen.**_N_**.position-scale** float rw:: +**stepgen.**_N_**.position-scale** real rw:: The scaling for position feedback, position command, and velocity command, in steps per length unit. -**stepgen.**_N_**.rawcounts** s32 ro:: +**stepgen.**_N_**.rawcounts** sint ro:: The position in counts, as updated by *make-pulses*. (Note: this is updated more frequently than the *counts* pin.) -**stepgen.**_N_**.steplen** u32 rw:: +**stepgen.**_N_**.steplen** uint rw:: The length of the step pulses, in nanoseconds. Measured from rising edge to falling edge. -**stepgen.**_N_**.stepspace** u32 rw (step types 0 and 1 only):: +**stepgen.**_N_**.stepspace** uint rw (step types 0 and 1 only):: The minimum space between step pulses, in nanoseconds. Measured from falling edge to rising edge. The actual time depends on the step rate and can be much longer. If *stepspace* is 0, then *step* can be asserted every period. This can be used in conjunction with *hal_parport*'s auto-resetting pins to output one step pulse per period. In this mode, *steplen* must be set for one period or less. -**stepgen.**_N_**.dirsetup** u32 rw (step type 0 only):: +**stepgen.**_N_**.dirsetup** uint rw (step type 0 only):: The minimum setup time from direction to step, in nanoseconds periods. Measured from change of direction to rising edge of step. -**stepgen.**_N_**.dirhold** u32 rw (step type 0 only):: +**stepgen.**_N_**.dirhold** uint rw (step type 0 only):: The minimum hold time of direction after step, in nanoseconds. Measured from falling edge of step to change of direction. -**stepgen.**_N_**.dirdelay** u32 rw (step types 1 and higher only):: +**stepgen.**_N_**.dirdelay** uint rw (step types 1 and higher only):: The minimum time between a forward step and a reverse step, in nanoseconds. == TIMING diff --git a/docs/src/man/man9/streamer.9.adoc b/docs/src/man/man9/streamer.9.adoc index a05257da4f1..cb784361940 100644 --- a/docs/src/man/man9/streamer.9.adoc +++ b/docs/src/man/man9/streamer.9.adoc @@ -26,10 +26,10 @@ streamer - stream file data into HAL in real time *streamer* exports one pin for each character in _string_. Legal characters are: - * *F*, *f* (float pin) - * *B*, *b* (bit pin) - * *S*, *s* (s32 pin) - * *U*, *u* (u32 pin) + * *F*, *f*, *R*, *r* (real pin) + * *B*, *b* (bool pin) + * *S*, *s*, *L*, *l* (sint pin) + * *U*, *u*, *K*, *k* (uint pin) == FUNCTIONS *streamer*._N_:: @@ -41,25 +41,25 @@ One function is created per FIFO, numbered from zero. Data from column _M_ of the data in FIFO _N_ appears on this pin. The pin type depends on the config string. -*streamer*._N_.*curr-depth* s32 output:: +*streamer*._N_.*curr-depth* sint output:: Current number of samples in the FIFO. When this reaches zero, new data will no longer be written to the pins. -*streamer*._N_.*empty* bit output:: +*streamer*._N_.*empty* bool output:: TRUE when the FIFO _N_ is empty, FALSE when valid data is available. -*streamer*._N_.*enable* bit input:: +*streamer*._N_.*enable* bool input:: When TRUE, data from FIFO _N_ is written to the HAL pins. When false, no data is transferred. Defaults to TRUE. -*streamer*._N_.*underruns* s32 read/write:: +*streamer*._N_.*underruns* sint read/write:: The number of times that *sampler* has tried to write data to the HAL pins but found no fresh data in the FIFO. It increments whenever *empty* is true, and can be reset by the *setp* command. -*streamer*._N_.*clock bit input:: +*streamer*._N_.*clock bool input:: Clock for data as specified by the clock-mode pin. -*streamer*._N_.*clock-mode s32 input:: +*streamer*._N_.*clock-mode sint input:: Defines behavior of clock pin: * 0 (*default*) free run at every iteration diff --git a/docs/src/man/man9/supply.9.adoc b/docs/src/man/man9/supply.9.adoc index d2693c26e04..193edb1f3c9 100644 --- a/docs/src/man/man9/supply.9.adoc +++ b/docs/src/man/man9/supply.9.adoc @@ -34,15 +34,15 @@ loaded. If *numchan* is not specified, the default value is one. == PINS -**supply.**_N_**.q** bit out:: - Output bit, copied from parameter **supply.**_N_**.d**. -**supply.**_N_**._q** bit out:: - Output bit, inverted copy of parameter **supply.**_N_**.d**. -**supply.**_N_**.variable** float out:: +**supply.**_N_**.q** bool out:: + Output value, copied from parameter **supply.**_N_**.d**. +**supply.**_N_**._q** bool out:: + Output value, inverted copy of parameter **supply.**_N_**.d**. +**supply.**_N_**.variable** real out:: Analog output, copied from parameter **supply.**_N_**.value**. -**supply.**_N_**._variable** float out:: +**supply.**_N_**._variable** real out:: Analog output, equal to -1.0 times parameter **supply.**_N_**.value**. -**supply.**_N_**.d** bit rw:: +**supply.**_N_**.d** bool io:: Data source for *q* and *_q* output pins. -**supply.**_N_**.value** bit rw:: +**supply.**_N_**.value** real io:: Data source for *variable* and *_variable* output pins. diff --git a/docs/src/man/man9/watchdog.9.adoc b/docs/src/man/man9/watchdog.9.adoc index c2ad6d09c40..d6a9a4f44ce 100644 --- a/docs/src/man/man9/watchdog.9.adoc +++ b/docs/src/man/man9/watchdog.9.adoc @@ -18,20 +18,20 @@ Each input has a separate timeout value. input has no transition within its timeout period. This function does not use floating point, and should be added to a fast thread. *set-timeouts*:: - Check for timeout changes, and convert the float timeout inputs to int values + Check for timeout changes, and convert the real timeout inputs to integer values that can be used in *process*. This function also monitors `enable-in` for false to true transitions, and re-enables monitoring when such a transition is detected. This function does use floating point, and it is appropriate to add it to the servo thread. == PINS -**watchdog.input-**__N__ bit in:: - Input number _N_. The inputs are numbered from 0 to *num_inputs*-1. -**watchdog.enable-in** bit in (default: FALSE):: +**watchdog.input-**__N__ bool in:: + Input number _N_. The inputs are numbered from 0 to **num_inputs**-1. +**watchdog.enable-in** bool in (default: FALSE):: If TRUE, forces out-ok to be false. Additionally, if a timeout occurs on any input, this pin must be set FALSE and TRUE again to re-start the monitoring of input pins. -*watchdog.ok-out* bit out (default: FALSE):: +*watchdog.ok-out* bool out (default: FALSE):: OK output. This pin is true only if enable-in is TRUE and no timeout has been detected. This output can be connected to the enable input of a *charge_pump* or *stepgen* (in v mode), to provide a heartbeat @@ -39,7 +39,7 @@ Each input has a separate timeout value. == PARAMETERS -**watchdog.timeout-**_N_ float in:: +**watchdog.timeout-**_N_ real in:: Timeout value for input number _N_. The inputs are numbered from 0 to **num_inputs**-1. The timeout is in seconds, and may not be below zero. diff --git a/docs/src/man/man9/weighted_sum.9.adoc b/docs/src/man/man9/weighted_sum.9.adoc index dfd1593cad8..ff4ada4e70e 100644 --- a/docs/src/man/man9/weighted_sum.9.adoc +++ b/docs/src/man/man9/weighted_sum.9.adoc @@ -14,11 +14,11 @@ Creates weighted sum groups each with the given number of input bits (_size_). The weighted_sum converts a group of bits to an integer. The conversion is the sum of the weights of the bits that are on plus any offset. The -weight of the m-th bit is 2^m. This is similar to a binary coded decimal +weight of the m-th bit is 2\^m. This is similar to a binary coded decimal but with more options. The hold bit stops processing the input changes so the sum will not change. -The default value for each weight is 2^m where m is the bit number. +The default value for each weight is 2\^m where m is the bit number. This results in a binary to unsigned conversion. There is a limit of 8 weighted summers and each may have up to 16 input bits. @@ -30,19 +30,19 @@ There is a limit of 8 weighted summers and each may have up to 16 input bits. == PINS -**wsum.**_N_**.bit.**_M_**.in** bit in:: +**wsum.**_N_**.bit.**_M_**.in** bool in:: The __m__^th^ input of weighted summer _n_. -**wsum.**_N_**.hold** bit in:: +**wsum.**_N_**.hold** bool in:: When TRUE, the _sum_ output does not change. When FALSE, the _sum_ output tracks the _bit_ inputs according to the weights and offset. -**wsum.**_N_**.sum** signed out:: +**wsum.**_N_**.sum** sint out:: The output of the weighted summer. -**wsum.**_N_**.bit.**_M_**.weight** signed rw:: +**wsum.**_N_**.bit.**_M_**.weight** sint rw:: The weight of the __m__^th^ input of weighted summer _n_. The default value is 2^__m__^. -**wsum.**_N_**.offset** signed rw:: +**wsum.**_N_**.offset** sint rw:: The offset is added to the weights corresponding to all TRUE inputs to give the final sum. == SEE ALSO -scaled_s32_sums(9), sum2(9) +scaled_sint_sums(9), sum2(9)