| COUNTER(9) | HAL Component | COUNTER(9) |
counter - counts input pulses (DEPRECATED)
loadrt counter [num_chan=N]
counter is a deprecated HAL component and will be removed in a future release. Use the encoder component with encoder.X.counter-mode set to TRUE.
counter is a HAL component that provides software- based counting that is useful for spindle position sensing and maybe other things. Instead of using a real encoder that outputs quadrature, some lathes have a sensor that generates a simple pulse stream as the spindle turns and an index pulse once per revolution. This component simply counts up when a "count" pulse (phase-A) is received, and if reset is enabled, resets when the "index" (phase-Z) pulse is received.
This is of course only useful for a unidirectional spindle, as it is not possible to sense the direction of rotation.
counter conforms to the "canonical encoder" interface described in the HAL manual.
encoder(9). in the LinuxCNC documentation.
| 2007-01-19 | LinuxCNC Documentation |