- Posts: 97
- Thank you received: 0
Spindle speed feedback
setp hm2_5i25.0.encoder.05.scale 1.0
setp hm2_5i25.0.encoder.05.counter-mode true
net spindle-position hm2_5i25.0.encoder.05.position => motion.spindle-revs
net spindle-velocity hm2_5i25.0.encoder.05.velocity => motion.spindle-speed-in
net spindle-velocity gmoccapy.spindle_feedback_bar
Please Log in to join the conversation.
If you _only_ want speed feedback then you can remove the position and velocity links to motion, and then set the encoder scale to 1/60 to get RPM straight out of the encoder module.
If you want to use feed-per rev and/or spindle-synched motion (which requires an index channel) then you will need a "scale" function to multiply the RPS by 60 to give RPM before displaying.
Please Log in to join the conversation.
I DO want to tap with this machine so that's the route I want to go. As far as an index pulse I'm not sure the best way to acquire that. The machine only has the one sensor and it's reading the teeth on the spindle cartridge ( not really a cartridge ) The machine was equiped for rigid tapping pre-retrofit but did not have a tool changer, the tool changer was optional when these were new. So presumably there's some way to index the thing, just not sure how at the moment.
Please Log in to join the conversation.
loadrt scale count=1
addf scale.0 servo-thread
setp scale.gain 60
setp hm2_5i25.0.encoder.05.scale 36.0
setp hm2_5i25.0.encoder.05.counter-mode true
setp hm2_5i25.0.encoder.05.min-speed-estimate 50
net spindle-rev-count hm2_5i25.0.encoder.05.position => motion.spindle-revs
net spindle-raw-velocity hm2_5i25.0.encoder.05.velocity => scale.0.in
net spindle-velocity motion.spindle-speed-in <= scale.0.out
Please Log in to join the conversation.
The sensor may have slow enough edges that you get double counts
if enabling the filter does not help (or its already enabled) you can increase the filtering by lowering the encoder sample frequency. This is a global setting so will affect all encoder channels.
A good way to get more filtering on specific channels is to disable the filter on "fast" channels and enable it on slow channels and then lower the sample frequency as low as it can go without impacting the fast channels
Please Log in to join the conversation.
Please Log in to join the conversation.
basically just change the 1 to a 0 in the following line for the correct encoder:
setp hm2_5i25.0.encoder.00.filter 1
Please Log in to join the conversation.
biqut2 wrote: So I effectively need to implement what I see on this page: wiki.linuxcnc.org/cgi-bin/wiki.pl?Closed...pindle_Speed_Control
I DO want to tap with this machine so that's the route I want to go. As far as an index pulse I'm not sure the best way to acquire that. The machine only has the one sensor and it's reading the teeth on the spindle cartridge ( not really a cartridge ) The machine was equiped for rigid tapping pre-retrofit but did not have a tool changer, the tool changer was optional when these were new. So presumably there's some way to index the thing, just not sure how at the moment.
If you want to rigid tap you will need a real encoder with A/B/Z. If not, you may be able to add another sensor to the gear teeth that reads half a tooth offset from the one already there. You would still need to figure out an index signal also.
If it is not too difficult to put an encoder on the machine, they are extremely cheap for a suitable one.. here is one example
Please Log in to join the conversation.
Please Log in to join the conversation.
What PCW was saying is to try turning the filter off on fast channels, and turn it on for your prox sensor. Then lower the sampling frequency in the value hm2_5i25.0.encoder.muxed-sample-frequency
I'm not sure how much to lower it? you could try 1/2 and increase if necessary. I think the default is 0x007F2815 so maybe try 0x003F940A
Please Log in to join the conversation.
