Threading problem

More
10 years 10 months ago #66587 by brianbonedoc
Replied by brianbonedoc on topic Threading problem
I have an issue if the RPM is too high (>1700) i don't get a readout either. Maybe due to the speed of my Proximity switch used for the index pulse?
I have not bothered to investigate as mostly I am below that speed.

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

More
10 years 10 months ago - 10 years 10 months ago #66617 by Iron-Man
Replied by Iron-Man on topic Threading problem
I believe that this is the proper line in the post-gui hal file:
# spindle RPM during program execution comes from encoder
net spindle-velocity => tormach.spindle-speed-out

Threading is working, just no RPM display during active gcode running. When program stops, then the rpm shows in the window. Will dig deeper into the code and find out why rpm not showing.
I will move on to connect limit switches etc.
Will post some simple video and pictures.

Iron-Man
Last edit: 10 years 10 months ago by Iron-Man. Reason: sentence structure.

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

More
10 years 9 months ago - 10 years 9 months ago #67774 by brianbonedoc
Replied by brianbonedoc on topic Threading problem
I finally got to figuring out my RPM issue. As you recall I could view accurate RPM up to about 1700. Above that then the display wouldn't read properly. At first I thought it had to do w/ the index pulse or proximity sensor that I was using for the index pulse. This was incorrect as I am using the ENCODER pin for the velocity as Peter stated (hm2_5i25.0.encoder.00.velocity).

The issue was my filter setting. Here is the original HAL area:
# 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 1024 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

Because my encoder is 4x that of the original tormach one (1024) I figured the FILTER to 38 would have to come down a bit.

So I changed the 38 ---> 19 (arbitrarily) and Now I get accurate readings >2400.

(setp hm2_5i25.0.raw.write_data 19)
Last edit: 10 years 9 months ago by brianbonedoc.

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

Time to create page: 0.050 seconds
Powered by Kunena Forum