Machine home zeroing with no motion from G code.

More
02 Sep 2011 05:29 #12903 by jodhner
I'm using a stepper spindle on my lathe for threading, and it works great, but I have to unwind the spindle back to the home position or the machine limit will eventually be reached. Setting A to zero with G54 does no good because the machine limit is unchanged.

Is there a way to set the machine home position to zero, with no motion, from within a G code program?

Sherline lathe
Gecko drivers
Standard XYZA (Y unused) stepper setup wizard settings.
No HAL tweaking done.

I'm working in G91 mode, and manually writing the G code.

You should see the nice lead-ins and lead-outs on these threads -- perfect! I could bore and thread a hole, and fill it perfectly with a threaded rod. ("perfect" meaning "theoretically/mathematically/geometrically perfect, with so-so execution")

Thanks.

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

More
02 Sep 2011 09:25 #12904 by Rick G

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

More
02 Sep 2011 12:21 #12905 by BigJohnT
jodhner wrote:

Is there a way to set the machine home position to zero, with no motion, from within a G code program?


No, that is not possible.

Are you trying to thread without any position feedback from the spindle?

John

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

More
02 Sep 2011 12:37 #12907 by andypugh
jodhner wrote:

I'm using a stepper spindle on my lathe for threading, and it works great, but I have to unwind the spindle back to the home position or the machine limit will eventually be reached. Setting A to zero with G54 does no good because the machine limit is unchanged.

You could set the machine limit very high indeed, that might work. I doubt that any of us will live long enough to see 10^38 spindle revs.

Are you using an encoder and index, or using G-code with coordinated Z,A moves?

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

More
02 Sep 2011 18:26 #12909 by jodhner
Whoa, just lost my reply when I hit "submit". It said "Code not correct". I'll have to recompose my reply ...

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

More
02 Sep 2011 18:37 #12910 by jodhner
I'm using open loop steppers with no spindle encoder.
Everything is coordinated.

This is a hobby where the process is just as important to me as the product.

If I were vanilla threading I'd use a spindle encoder and canned cycles, but I'm particular about my threads, and I will also be making worms, ornamental turning, and who knows what else. I'm using the spindle more like a fast rotary table.

If the machine limit parameter is astronomical I'll just zero with G54, but my object oriented sensitivities will suffer. I'd like my subs to leave the machine as they found it.

You guys do a lot of work, and I appreciate your attention. Thank you.

--Justin

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

More
02 Sep 2011 18:38 #12911 by andypugh
jodhner wrote:

Whoa, just lost my reply when I hit "submit". It said "Code not correct". I'll have to recompose my reply ...


Yeah, this site is all a bit flaky, but outside our control.
It's a good insurance to select-all / copy your reply before hitting the button.

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

More
02 Sep 2011 18:39 #12912 by jodhner
Think you could sneak in a G code for no motion machine zeroing? G666?

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

More
02 Sep 2011 20:24 #12914 by andypugh
jodhner wrote:

If the machine limit parameter is astronomical I'll just zero with G54, but my object oriented sensitivities will suffer.


The internal representation of the pulse counter is a long long, or signed-64.
At 200 steps per rev, and 8x microstepping it will wrap at 5.7 quadrillion revolutions (5764607523034234 to be exact)
You will find that your floating point representation of position gets a bit granular rather sooner, though. That is a double, so has 16 decimal digits of precision, meaning you will not be able to read the angle to less than 0.01 degrees after only about 30 billion revs. :-)

I have looked at the code, and there is no way to zero the stepgen accumulator (which is what you would need to do) . Also, zeroing the accumulator would probably lose steps.

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

More
02 Sep 2011 21:15 #12917 by jodhner
Dang, I was going to make an EMC2 based "Long Now 10,000 Year Clock", but I'd only get about 1000 years with a double.
Thanks for your time and expertise. I really appreciate it.

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

Time to create page: 0.100 seconds
Powered by Kunena Forum