📄 counter.9
字号:
.TH COUNTER "9" "2007-01-19" "EMC Documentation" "HAL Component".de TQ.br.ns.TP \\$1...SH NAMEcounter \- counts input pulses \fB(DEPRECATED)\fB.SH SYNOPSIS.B loadrt counter [num_chan=\fIN\fB].SH DESCRIPTION\fBcounter\fR is a deprecated HAL component and will be removed in a futurerelease. Use the \fBencoder\fR component with encoder.X.counter-mode set toTRUE.\fBcounter\fR is a HAL component that provides software-based counting that is useful for spindle position sensing andmaybe other things. Instead of using a real encoder that outputsquadrature, some lathes have a sensor that generates a simple pulsestream 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 itis not possible to sense the direction of rotation.\fBcounter\fR conforms to the "canonical encoder" interface describedin the HAL manual..SH FUNCTIONS.TP.B \fBcounter.capture-position\fR (uses floating-point)Updates the counts, position and velocity outputs based on internal counters..TP.B \fBcounter.update-counters\fRSamples the phase-A and phase-Z inputs and updates internal counters..SH PINS.TP.B \fBcounter.\fIN\fB.phase-A\fR bit inThe primary input signal. The internal counter is incremented on eachrising edge..TP.B \fBcounter.\fIN\fB.phase-Z\fR bit inThe index input signal. When the \fBindex-enable\fR pin is TRUE and a risingedge on \fBphase-Z\fR is seen, \fBindex-enable\fR is set to FALSE and theinternal counter is reset to zero..TP.B \fBcounter.\fIN\fB.index-enable\fR bit io.TQ.B \fBcounter.\fIN\fB.reset\fR bit io.TQ.B \fBcounter.\fIN\fB.counts\fR signed out.TQ.B \fBcounter.\fIN\fB.position\fR float out.TQ.B \fBcounter.\fIN\fB.velocity\fR float outThese pins function according to the canonical digital encoder interface..SH PARAMETERS.TP.B \fBcounter.\fIN\fB.position-scale\fR float rwThis parameter functions according to the canonical digital encoder interface..TP.B \fBcounter.\fIN\fB.rawcounts\fR signed roThe internal counts value, updated from \fBupdate-counters\fR and reflectedin the output pins at the next call to \fBcapture-position\fR..SH SEE ALSO\fBencoder(9)\fR. The HAL User Manual.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -