Reading a tachometer signal
- gene_weber
- Offline
- Junior Member
Less
More
- Posts: 25
- Thank you received: 6
07 Jul 2023 18:17 #274944
by gene_weber
Replied by gene_weber on topic Reading a tachometer signal
I want to read spindle rpm into LinuxCNC. Based on this thread and the LinuxCNC Encode documentation which says:.
I am planning to tap into the spindle pickup that feeds a display on the mill and connect to the 7C81 card with the default 5ABOB program as shown.
From the documentation it sounds like the Quad-IDX input is a time base signal for counting. Must this be connected, or is it not needed in mode 1?
Setting mode 1 means put this line "encoder.0.counter-mode = 1" in the HAL file?
Thanks,
Gene
encoder has a one-phase, unidirectional mode called counter. In this mode, the phase-B input is ignored; the counts increase on each rising edge of phase-A. This mode may be useful for counting a unidirectional spindle with a single input line, though the noise-resistant characteristics of quadrature are lost
I am planning to tap into the spindle pickup that feeds a display on the mill and connect to the 7C81 card with the default 5ABOB program as shown.
From the documentation it sounds like the Quad-IDX input is a time base signal for counting. Must this be connected, or is it not needed in mode 1?
Setting mode 1 means put this line "encoder.0.counter-mode = 1" in the HAL file?
Thanks,
Gene
Attachments:
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17944
- Thank you received: 4812
07 Jul 2023 18:43 #274945
by PCW
Replied by PCW on topic Reading a tachometer signal
The index input is not used unless you are doing spindle synchronized motion
The software encoder documentation you quote is not correct for the
hardware encoder in the 7C81. The hardware encoder does use the B input
in mode 1 (for count direction) . On the 7C81 if B is left unconnected, it will be high
= count up.
If you started with a pncconf created hal file you probably have the
setp hm2_7c81.0.encoder.00.counter_mode 0
or
setp [HMOT](CARD0).encoder.00.counter_mode 0
statement already in your hal file, so you just need to change the 0 to 1
The software encoder documentation you quote is not correct for the
hardware encoder in the 7C81. The hardware encoder does use the B input
in mode 1 (for count direction) . On the 7C81 if B is left unconnected, it will be high
= count up.
If you started with a pncconf created hal file you probably have the
setp hm2_7c81.0.encoder.00.counter_mode 0
or
setp [HMOT](CARD0).encoder.00.counter_mode 0
statement already in your hal file, so you just need to change the 0 to 1
The following user(s) said Thank You: gene_weber
Please Log in or Create an account to join the conversation.
Time to create page: 0.069 seconds