Hello Guest it is April 16, 2024, 02:26:22 AM

Author Topic: G code needed for lathe spindle used as rotary indexer  (Read 5940 times)

0 Members and 1 Guest are viewing this topic.

G code needed for lathe spindle used as rotary indexer
« on: September 12, 2010, 02:19:08 AM »
I have a step and direction servo for the lathe spindle but I also want to command the spindle to stop at specific angles of rotation (like 0, 90, 180 and 270 degrees). If I configure the spindle as a spindle in the motor outputs tab of the ports&pins menu I can use the M3 S500 command and the spindle will work as normal.

However I have to reconfigure the spindle as the A axis in the motor outputs tab and tune the new axis using the "calculate the new steps per unit" procedure to get it to stop at specific angles using the following:

G90
G0 A90  :  moves 90 degrees
G0 A180  : moves another 90 degrees

Is there a better way to be able to use the spindle for continuous high speed operation and have it stop at specific angles without having to reconfigure?

Bill

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: G code needed for lathe spindle used as rotary indexer
« Reply #1 on: September 12, 2010, 08:45:08 AM »
Bill,
I think Simpson has done more than anybody relative to manipulating an axis to do what you are asking. Hopefully he will chime in
and put it all into perspective for you. Here is a thread which contains a lot of info on what he was doing.

http://www.machsupport.com/forum/index.php/topic,11422.msg72469.html#msg72469

RICH

Re: G code needed for lathe spindle used as rotary indexer
« Reply #2 on: September 13, 2010, 10:31:11 AM »
Rich:

Thanks for the link. You are indeed correct. Simpson has quite a thread going. I'll spend weeks just reading it all. I think I'll find what I need in there.
Thanks again.

Bill

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: G code needed for lathe spindle used as rotary indexer
« Reply #3 on: September 13, 2010, 10:34:12 AM »
Bill,
Start at the end of the topic and work your way back....
You want to have a look at the macros and also the switching boards.

RICH
Re: G code needed for lathe spindle used as rotary indexer
« Reply #4 on: September 14, 2010, 02:20:19 AM »
Will do.

Thanks.

Bill

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: G code needed for lathe spindle used as rotary indexer
« Reply #5 on: September 14, 2010, 05:43:22 AM »
Bill,
Yes there is a lot  to sort thru. Take a look at replies 125,127,145,193,204 and get the swap axis macro's M940 and M950 that he posted.
I like the idea of doing it via the swap axis board. Haven't tried it all out, eventualy ...... I currently have two configs, one for indexing and another for rotary and use a stepper with gear reduction to temporarily drive the lathe spindle. Stepper use leaves something to be desired since as the motor rpm goes up torque decreases and the rpm is not linear and feedrate becomes limited and feedrate is also not linear. So need to get a servo and drive for the spindle, but that requires mods to my controller and wiring etc , etc......never ends...........

Also try out Phil's screen for the lathe ( you will see why as it is set up for A axis and other things) and also do a search for drilling macro's for the lathe.

RICH
Re: G code needed for lathe spindle used as rotary indexer
« Reply #6 on: September 16, 2010, 10:07:35 AM »
Thanks.

Sounds like a lot of research is still to be done. I'll especially investigate the swap axis board.

Thanks again.

Bill