Hangs on G33/G76 command

More
28 Dec 2013 08:27 #42090 by mtngun
Replied by mtngun on topic Hangs on G33/G76 command
I did some more air-testing of threading, with my Z accel cranked up to 0.5 and the spindle speed turned down to 68.7 rpm, which was as low as the display would read. It can spin a bit slower but EMC seems to require at least 60 rpm or so before the speed will display. I was air-cutting 5" long threads with various pitches.

Sometimes it behaved OK.

Other times the Z speed "hunted."

Other times the Z speed maxxed out for no apparent reason -- the speed was not proportonal to the pitch. Once it got into its max speed mode, sometimes it took quite a while for it to calm down and return to the appropriate speed. Sometimes several inches, sometimes several passes. So it was not just a matter of normal deceleration -- it was more like the accelerator pedal was stuck. :woohoo:

I tried monitoring the "spindle phase a" on the Hal meter and it was always solid when I was watching it. The displayed RPM rarely varied more than +/- 0.1 rpm. Once in a great while there would be a blip in the displayed RPM -- which would be followed by a blip in the Z axis speed, but that didn't happen often. The Z hunting incidents occurred more frequently than the blips in the display speed, so I wondered if the threading code was using a different signal than the displayed speed ?


Next time I will monitor the "motion.spindle-revs" pin instead.

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

More
28 Dec 2013 09:15 - 28 Dec 2013 09:17 #42091 by mtngun
Replied by mtngun on topic Hangs on G33/G76 command
More air-testing.

I was using G33 Z_ K.05, threading back and forth between Z2 and Z7, and sometimes varying K. VFD set at 68.7 rpm.

Several times the Z speed "hunted" in mid-thread even though the displayed RPM and the Hal scope "motion.spindle-revs" were solid at the time.

Here is a pic of the "motion.spindle-revs" scope taken while the Z speed was "hunting" in mid-thread. As you can see, there was no problem with the "motion.spindle-revs" signal.


I gradually increased K on each pass like this:

G33 Z2 K.05
G33 Z7 K.06
G33 Z2 K.07
..... and so on up to ....
G33 Z7 K.15

At that point it was running the max Z speed of 25 ipm for the entire 5" length of the thread, even though the "correct" speed should have been approximately 15 ipm.

Then I gradually decreased K on each pass:
G33 Z2 K.14
G33 Z7 K.13
G33 Z2 K.12
.... and so on.

Here is a pic snapped in mid-thread, K=.12, and it is running at the max Z speed of 25 ipm even though the "correct" speed would have been closer to 10 ipm.

It finally slowed to the correct speed with less than an inch left to thread.

As other EMC users have noted, low RPMs seem to produce more threading errors than high RPMs, even though you would think the opposite would be true, so I was deliberately torture-testing EMC by threading at the lowest possible RPM. Most of these problems seem to go away if you crank up the spindle speed to 500 rpm or so.

Still, it sure seems like there is a problem with the PID tuning or whatever is used to sync the Z axis with the spindle.

Does the PID tuning "adapt," and if so, does it "remember" the PID settings for the next threading pass? If so, that could explain why the maxxed out Z speed required several passes to return to normal. :huh:
Last edit: 28 Dec 2013 09:17 by mtngun.

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

More
28 Dec 2013 11:40 - 28 Dec 2013 11:59 #42095 by PCW
Replied by PCW on topic Hangs on G33/G76 command
Probably you are just running into the limitations of the interpolated
position code: the slower you go the worse this will get.

The best solution is not to guess the spindles rotary position but use an encoder
and _know_ where it is. Any other solution is rather mickey mouse.

(and at 60 RPM with a single sensor you are guessing for up to a second)

Thats is its pretty hard to gear the linear to rotary axis when you only get a
position update once a second.

Note that the 60 RPM minimum is determined by the encoder.N.min-velocity-estimate
setting on the encoder component.

(man encoder)
Last edit: 28 Dec 2013 11:59 by PCW.
The following user(s) said Thank You: mtngun

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

More
29 Dec 2013 00:20 #42117 by mtngun
Replied by mtngun on topic Hangs on G33/G76 command

The best solution is not to guess the spindles rotary position but use an encoder
and _know_ where it is. Any other solution is rather mickey mouse.

Point taken, PCW. An encoder is on my to-do list, but it will probably take quite a few months for me to assemble.

Any pics of homemade lathe encoders? Did you use a store bought encoder wheel, or did you make your own with a CNC mill? Optical or reflective?

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

More
30 Dec 2013 07:12 #42186 by andypugh
Replied by andypugh on topic Hangs on G33/G76 command

[Any pics of homemade lathe encoders? Did you use a store bought encoder wheel, or did you make your own with a CNC mill? Optical or reflective?


picasaweb.google.com/lh/photo/iHKPEhyEJB...pFm0?feat=directlink

Is one I made with a slitting saw. It used reflectiive sensors:
picasaweb.google.com/lh/photo/_hlZumHKbs...pFm0?feat=directlink

It wasn't a great success, as it seemed to need regular sensitivity adjustment. The slot-type work a lot more reliably.

Is there are metal gear on the lathe spindle? You can use that and magnetic sensors.
The following user(s) said Thank You: mtngun

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

More
30 Dec 2013 09:31 - 30 Dec 2013 09:43 #42190 by mtngun
Replied by mtngun on topic Hangs on G33/G76 command
I'd heard that the reflective type sensors could be noisy so I ordered the slot type.

I don't have a CNC mill (yet) to make an encoder disk but I do have an import spin indexer so I figure I can put the spin indexer on my manual mill and cut the slots that way.

Although .... since I added the debounce to the spindle index, I haven't had any more glitches while threading, at least for the 2 hours or so that I played with it this afternoon. B) The debounce seemed to make a big difference.

Nice job on your slotted encoder wheel, BTW. I never cease to be impressed with people who can make "real stuff."
Last edit: 30 Dec 2013 09:43 by mtngun.

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

More
11 Dec 2021 06:13 #228849 by Coordinates
can you plz shear the hal and ini file for the encoder which has 2 signals phase A and indexing i accidently rewritten them

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

More
12 Dec 2021 14:13 #228919 by andypugh
Replied by andypugh on topic Hangs on G33/G76 command
This thread was 8 years old. It is probably best to start a new thread with a description of your problem.

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

Time to create page: 0.147 seconds
Powered by Kunena Forum