Strange Joint Following Error

More
08 Jan 2014 19:29 - 08 Jan 2014 20:30 #42491 by llrjt100
Thanks to the fantastic help from this forum, I now have a rotary table running in sync with a lathe spindle for hobbing :-)

I am confused as to why I get a rotary table 'joint following error' when I'm running the above hobbing configuration, but not getting it when I load the threading configuration which syncs the spindle to the linear Z axis.

I'm using the Pico-systems USC board, so the step pulsing shouldn't be an issue. The only thing I can think of is latency could be causing a problem with the sync stuff in the hobbing configuration HAL files.

The computer appears to have high latency - I ran the latency test for 15 mins and messed around with the web browser getting max jitter values of roughly 4,000,000 ns for servo thread and 2,300,000 ns for base thread. This high latency doesn't seem to affect normal lathe control with the USC board, nor threading, just the newly setup hobbing. I can't figure out what is going on!
Last edit: 08 Jan 2014 20:30 by llrjt100.

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

More
08 Jan 2014 20:02 #42495 by emcPT
Replied by emcPT on topic Strange Joint Following Error
My recommendation is to use the halscope. It is scarry at first sight, but after you use it, it is very good.
Open the signal(s) that you want, in this case I recommend ferror, position-cmd and position-fb, of the respective joint, and see why and when it goes higher than the defined ferror.
The following user(s) said Thank You: llrjt100

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

More
08 Jan 2014 20:39 - 08 Jan 2014 21:12 #42496 by llrjt100
Thanks for the recommendation - I ran Halscope and monitored ferror, which builds linearly until it reaches the FERROR or MIN_FERROR values (both the same) and the joint 1 following error is triggered. This explains nicely why the following error occurs instantaneously with FERROR=MIN_FERROR=1, more slowly when =10, and several seconds when =100.

I'll take a look at position-cmd and position-fb next.

Working now! - in adapting Andy's hobbing code, I dropped the final 'Reset logic' part of his .hal configuration, so I didn't have position-fb (pid.1.feedback) connected to scale.0.out! I've reset the .ini file FERROR=1 and MIN_FERROR=0.1 and checked the Halscope and all is well.

I'm very relieved I found it, and thank you again for pointing me in the right direction initially :-)
Last edit: 08 Jan 2014 21:12 by llrjt100.

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

More
08 Jan 2014 22:21 #42501 by andypugh

I've reset the .ini file FERROR=1 and MIN_FERROR=0.1 and checked the Halscope and all is well.


Those numbers are either very big or very small. A following error of 0.1 degrees might be hard to achieve in practice. A following-error of 0.1 revolutions could be several tooths-worth of gear. :-)

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

More
09 Jan 2014 00:17 #42506 by llrjt100
I can probably fine tune FERROR etc. but need to confirm that the spindle (hob) to rotary table (worm wheel blank) electronic gear ratio is correct first - it seems to low, and I'm struggling a little to find a way to measure. I'd be very grateful for a check of my calculations:

I want to hob a 200 tooth worm wheel, so the spindle (hob) needs to revolve 200 times for every 1 turn of the rotary table (worm wheel blank).

The spindle encoder outputs 10,000 pulses per revolution.

The rotary table stepper is 1.8 deg. (200 fullsteps per rev) driven at 1/8 microstep through the 90:1 rotary table - this gives 200 x 8 x 90 = 144,000 microsteps per rotary table revolution (400 microsteps per degree).

I need 200 revs of the rotary table for every 1 rev of the spindle, so the ratio of spindle encoder position to rotary table steps is 144,000 / (200 * 10,000) = 0.072, and I've set scale.0.gain to this value.

I'd like to perform a quick gear ratio cross check by comparing spindle and rotary table rpms - with the spindle at 200 rpm, the rotary table should be at 1 rpm.

My top spindle speed is 2,300 rpm, and I have simple potentiometer control over the spindle VFD (not connected to LinuxCNC yet) - this has a 1-10 scale, so when set to 1, the spindle is rotating at approximately 230 rpm. What signal do I need to monitor in Halscope to check this? If the gear ratio is right, the rotary table should rotate at (230/200) x 1 rpm = 1.15 rpm

The problem is the rotary table is turning way to slow at approximately 0.027 rpm (roughly 1/43 of the expected 1 rpm!)

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

More
09 Jan 2014 00:27 #42508 by andypugh

The spindle encoder outputs 10,000 pulses per revolution.
...
My top spindle speed is 2,300 rpm,

That is 400kHz encoder pulse frequency. The USC only claims to count 250kHz.
If you slow the spindle, does the table slow down, or does it remain at the same speed for a while?

The first test I would do would be to manually rotate the spindle by 10 turns and see how far the table moves (assuming it has degree marks)

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

More
09 Jan 2014 00:38 - 09 Jan 2014 01:10 #42509 by llrjt100
The USC 250 kHz limit gives me a 1500 rpm spindle limit - in practice I'm working well below this, probably no more than 500-600 rpm.

At 230 rpm (my test speed), the spindle encoder frequency is (230/60) * 10,000 = 38.3 kHz, so I'm well within the USC's 250 kHz limit.

The rotary table speeds up and slows down as I manually adjust the spindle speed, so the gearing appears to be working - the problem is the gear ratio seems to be wrong - it's ~ 1/40 what it should be...

For the test, I put a protractor on the rotary table, set spindle rpm to 230 and measured 68 degrees change in the rotary table angle over a rather arbitrary 420 seconds - that's 0.16 deg/s or 9.7 deg/min. Your idea with 10 turns of the spindle is good, but the rotary table movement will be so small, I don't think I'll see it - doing 100 turns will likely cause my arm to fall off!

If I change scale.0.gain from 0.072 to 3 (a factor of just over 40), I get 360 degrees in 52 seconds, which equates to 1.15 rpm and is correct. I don't understand why my calculation is out by a factor of 3/0.072 = 41.666...

I cross checked my rotary table SCALE is 200 x 8 x 90 = 144,000 in a simpler configuration and MDI'd a 360 degree move to ensure it was correct.

On another note, I now have FERROR = MIN_FERROR = 0.005 which equates to 1/200 degree or 2 microsteps and it's not generating a joint following error.
Last edit: 09 Jan 2014 01:10 by llrjt100.

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

More
09 Jan 2014 01:53 #42511 by jmelson

The spindle encoder outputs 10,000 pulses per revolution.
...
My top spindle speed is 2,300 rpm,

That is 400kHz encoder pulse frequency. The USC only claims to count 250kHz.
If you slow the spindle, does the table slow down, or does it remain at the same speed for a while?

The first test I would do would be to manually rotate the spindle by 10 turns and see how far the table moves (assuming it has degree marks)

The 250K is VERY conservative. The encoder digital filter samples at 1 MHz. Assuming some
noise, quadrature phase angle error, etc. it should count quite reliably up to nearly 500 K
counts/second before losing counts. Still, a 10 K count encoder on the spindle is
pretty radical. A couple hundred counts/rev is usually quite adequate.

Jon

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

More
09 Jan 2014 01:55 #42512 by jmelson


The rotary table speeds up and slows down as I manually adjust the spindle speed, so the gearing appears to be working - the problem is the gear ratio seems to be wrong - it's ~ 1/40 what it should be...

1/40TH? That's a very curious number! The worm gear in most rotary tables is 40:1
Have you accounted for this ratio?

Jon

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

More
09 Jan 2014 04:24 #42525 by llrjt100

The 250K is VERY conservative.


That's good to know - I'll probably swap the 10 k encoder for a 5 k at some point, so the maximum theoretical spindle rpm for 250 kHz is 3,000 - it's not really an issue at the moment because the threading and hobbing ops will be well below 1,000 rpm.

I'm interested in achieving the most accurate screw helix I possibly can for a worm gear, so I'll be looking at a servo direct drive for the spindle and using a Renishaw RGH24 and linear scale for the Z axis at some point in the future.

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

Time to create page: 0.140 seconds
Powered by Kunena Forum