Spindle encoder connections

More
30 Mar 2017 15:17 #90571 by andypugh

Pathpilot drops tracking the spindle over 1200 rpm.


You might need to turn off the encoder filter.

linuxcnc.org/docs/2.7/html/man/man9/hostmot2.9.html#encoder

15 clocks at 33Mhz = 2.2 Mhz
1024 counts @ 1200 rpm = 81kHz. So there should be lots of headroom even with the filter on.

Please Log in or Create an account to join the conversation.

More
31 Mar 2017 14:19 #90645 by remartinez
So you mean I have to edit the bit file?

Is there a guide or an easy way to do this?

Regards
Raul

Please Log in or Create an account to join the conversation.

More
31 Mar 2017 14:31 #90646 by PCW
Replied by PCW on topic Spindle encoder connections
The encoder filter mode is set in the hal file, but this by itself is not likely the problem
since the 7I76/FPGA card will count quadrature signals up to a few MHz with the encoder filter on.

I suspect your encoder count rate problem is either an encoder / encoder electrical interface issue or some hal file
setup issue.

Can you post your current hal/ini files here? That would help see if its a setup issue

Please Log in or Create an account to join the conversation.

More
31 Mar 2017 14:33 #90647 by remartinez
The files are attached on the first question in this thread.

Thanks again

Please Log in or Create an account to join the conversation.

More
31 Mar 2017 14:48 - 31 Mar 2017 14:48 #90648 by PCW
Replied by PCW on topic Spindle encoder connections
The tormach hal file deliberately slows the input filter for noise rejection reasons
just delete this entire section from the hal file:

# as per Peter Wallace to reduce encoder errors from noise
# use the 'raw' interface to set the encoder filter higher to ignore more noise
# this sets how long an encoder signal needs to be stable to be accepted
# register 0x3400 is QfilterRate decimal 13312
# count rate is ClockLow/(QfilterRate + 2)
# ClockLow is 33 MHz
# setting the filter to 38 (decimal) will allow the encoder to function well past 100 kHz
# lathe encoder is 1200 pulses per rev, 3000 RPM is 60 kHz
#
setp hm2_5i25.0.raw.write_address 13312
setp hm2_5i25.0.raw.write_data 38
setp hm2_5i25.0.raw.write_strobe TRUE
Last edit: 31 Mar 2017 14:48 by PCW.

Please Log in or Create an account to join the conversation.

More
02 Apr 2017 11:26 #90759 by remartinez
OK great that worked.

Pathpilot now tracks spindle above 1200 rpm.
The issue that I need to figure out now is that it will not cut threads. I programed a threading cycle on the conversation but it stops right before its going to start to cut threads. I did noticed that the Z index light does not blink when i turn the spindle by hand. Is this normal? I did test out if I had the right terminal. I grounded the terminal for the Z index and I did see it blink on the screen. I guessing that maybe I have an issue with the encoder but i am not sure. Any ideas.

Second question: How can i change the limit on the spindle. It only goes up to 2500 rpm. In the ini file I have the spindle max rpm at 3850.

Thanks again,
Raul

Please Log in or Create an account to join the conversation.

More
02 Apr 2017 13:25 #90762 by andypugh

The issue that I need to figure out now is that it will not cut threads. I programed a threading cycle on the conversation but it stops right before its going to start to cut threads.

Is motion.spindle-revs counting _up_. If it is counting down, then the the threading won't start.

I did noticed that the Z index light does not blink when i turn the spindle by hand. Is this normal?


It might be. Index pulses can be very short.

The best way to test is to set the index-enable of the encoder counter, then rotate the spindle by hand and see if it goes back to zero.

Please Log in or Create an account to join the conversation.

More
02 Apr 2017 13:56 #90765 by remartinez
right now the encoder numbers climb as i turn the spindle one way and decrease as i tun it the other way. I does not go to zero if i make a full turn. The numbers just keep on going.

What do you mean to set the index-enable of the encoder counter?

Below is how the hal file shows the encoder

set hm2_5i25.0.encoder.00.counter-mode 0
set hm2_5i25.0.encoder.00.scale [SPINDLE_9]ENCODER_SCALE
set hm2_5i25.0.encoder.00.filter 1
# see 'man hostmot2' for descriptions
set hm2_5i25.0.encoder.00.index-mask

net spindle-position hm2_5i25.0.encoder.00.position => motion.spindle-revs
net spindle-raw-velocity hm2_5i25.0.encoder.00.velocity => motion.spindle-speed-in lowpass.0.in
net spindle-velocity lowpass.0.out
net spindle-index-enable hm2_5i25.0.encoder.00.index-enable <=>emotion.spindle-index-enable

net spindle-phase-A hm2_5i25.o.gpio.016.in
net spindle-phase-A hm2_5i25.o.gpio.015.in
net spindle-phase-A hm2_5i25.o.gpio.014.in

Please Log in or Create an account to join the conversation.

More
02 Apr 2017 14:51 #90769 by andypugh

right now the encoder numbers climb as i turn the spindle one way and decrease as i tun it the other way. I does not go to zero if i make a full turn. The numbers just keep on going.


That is as it should be. But does the number climb in the FWD direction and reduce in REV?

net spindle-index-enable hm2_5i25.0.encoder.00.index-enable <=>emotion.spindle-index-enable
net spindle-phase-A hm2_5i25.o.gpio.016.in
net spindle-phase-A hm2_5i25.o.gpio.015.in
net spindle-phase-A hm2_5i25.o.gpio.014.in


Is that copy-paste or did you re-type it?

To check the index, open a terminal window then.
loadusr halmeter signal spindle-index-enable
sets spindle-index-enable 1
Then turn the spindle and see if the signal goes back to false.

Please Log in or Create an account to join the conversation.

More
02 Apr 2017 15:06 #90770 by remartinez
I type it. I see the i missed the p in the setp. the hal file is attached on the first post of this thread.

when i put in the command is the terminal it gives me an error

Loadusr: command not found

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.084 seconds
Powered by Kunena Forum