G76 -Somtimes- faults and does not synchronize

More
02 Jul 2019 14:17 #138398 by Gene1934
When I looked at how to encode the spindle on my new to me 70 yo Sheldon, my eyes kept coming back to the front bull gear thats locked to the spindle, Nothing else inside the headstock was locked to the spindle. So I silicone glued a 6-32 steel screw so it was aligned with a tooth of the gear effectively giving me one wide tooth I could used for an index. This was on the back edge of the gear.

Then I made from 1/2 fairly hard alu plate, a bracket I could mount with a 5mm bolt, that had an inside curve wrapped around about 40 degrees of this gear. And filed the back where it was pulled to the casting so when the bolt was tight, it cleared the teeth by 10 thou or so. Then I made 3 slots in the inside of the curve just deep enough to hide 3 ats-667 hall effect detectors in those slots. I reversed one of them so it detected the added screw rather than the teeth. Then found my math for spacing was bad and had to widen the slots until I was getting a 90 degree quadrature A/B signal, and glued everything into place with a heavily gelled superglue.

That was 2 years ago and it hasn't missed a count since. On my Sheldon thats a 60 tooth bull gear, so linuxcnc gets a new report that includes both direction and speed every 1.5 degrees. Everytime one of those hall detectors changes state

My .hal file does not do spindle speed feedback as I've put a 3 phase motor on a vfd in it so speed is pretty steady. but my "at speed" comparator is set to only go true when the speed is within 10% of requested. I normally set the right end of a G76 around 3 turns off the end of the bar, and generally it just works.

For G33.1 rigid tapping, since the hole is usually blind and the tap could hit the bottom of the hole and break it, I've some hal code that measures the distance and the spindle turns in the fwd direction after the reverse at the bottom of the hole has been issued, A definite problem when the chuck weighs 40 some lbs. The vfd is making the belts yelp while its doing the turnaround. So I make an air cut and note the overshoot and subtract that from the depth of the G33.1 move. Haven't broken a tap since. :)

I just don't trust something that works by position when there are pulleys and or belts involved. Get rid of them and make your own if possible. So thats what I did.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

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

More
10 Jul 2019 13:12 - 10 Jul 2019 13:25 #139000 by Vitran
Update
I machined a new sprocket. For price comparison, here are the quotes I got:
Hardinge - $1460.00 for sprocket + $1020.00 for new shaft as the shaft design changed (back order) + $2.34 for a new spring. (all in USD)
SDP - $156.00 USD for a sprocket with the wrong bore size. ETA 4 months
Amazon - $38 CAD, eta 2 months
Toronto Gear - $35 CAD +$20 shipping for a sprocket with the wrong bore size. ETA 1 week

I went with Toronto Gear.

Had to machine the gear down a bit to match the old gear. Overall it worked out. I now have a smooth signal on the rpm of the spindle. I think I consider that a success.




Now that I have that running I am having a bit of difficulty finding a PID tuning process for a spindle. As well the 'Calibrate' window shows axis 1-8, but the spindle is axis 9. I currently edit the *.ini and restart LinuxCNC each time I make a change. Is there a better window for this? Is there a tutorial everyone references for the spindle rpm tuning like people have for the servo position tuning?

I am currently watching the desired rps, the measured rps and the output voltage signal. I currently have a PID of .45/5/0.015 and a FF0* of .25. Increasing 'I' has the output voltage signal overshoot faster than the spindle can respond, but at low speeds (<1000rpm) it takes about 4 seconds to go from 5% off to 1% off. It is okay and no oscillations but not great enough for me. If I want to have constant surface speed I need a faster response.

*I put ff1, not FF0 here when I first wrote it
Last edit: 10 Jul 2019 13:25 by Vitran.

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

More
10 Jul 2019 13:18 #139002 by PCW
Usually Speed control loops use mainly FF0,P and I
(FF0 is adjusted for best open loop speed match with everything else 0
then P then I)

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

More
12 Jul 2019 14:09 #139176 by andypugh
You can use an interactive HAL window.
Open a terminal and "halcmd -kf" to link to the HAL of the running LinuxCNC instance.

Then you can "setp pid.2.Igain 200" and such to change the PID settings on the fly.

These won't be saved to the INI, so make a note of the good settings then edit them in to the INI.

You can read (getp) or set (setp) any HAL pins you like from the command line.

show pin pid* - will show all pins matching the pattern.
loadusr halmeter
loadusr halscope - open some handy tools
exit - will quit the halcmd session.

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

Time to create page: 0.089 seconds
Powered by Kunena Forum