. .

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Don't be afraid of macros they are not that difficult really.
    Keith I believe just controls his turret like another axis "A" axis set to Angular coordinates rather than linear and calls it from g-code with commnad like G1 G91 A90 which moves the axis in incremental mode 90deg. Or what ever amount of deg's he needs to reach the next tool.

    Keith is expereinced CNC lathe operator and used to writing his own G-code so gets away with this setup by inserting at the point in G-code he needs tool change.
    The more normal way would be to do a similair thing but have the commands to turn and control the turret written in a Macro. This Macro is known has the tool change macro and has a special code within G-code called M6.
    One of the reasons we have dedicated tool change macro is so that Cam software can output G-code that works on any machine without knowing or caring how the Machine actually goes about it's tool changing business.
    All the Machine specific details are written in the macro and the Cam software just enters M6 where ever it needs to do tool change.

    So the Macro side is just a list of commands to turn the turret and all that goes with it.
    So lets say for arguments sake your turret is locked with a solenoid which is connected to a relay controlled with output #1. Then you want turret to rotate 90deg positive then reverse 5deg upto a bump stop using the stepper motor which is connected to A axis. Then lock the turret again with solenoid.
    A Very basic macro to do the above would look something like this.

    ActivateSignal(OUTPUT1) . . . . . . . 'turn ON output #1 and Unlock Turret
    Code "G4 P1" . . . . . . . . . . . . . . . 'Pause 1s for output/relay to come on and turret unlock
    While IsMoving ()
    Wend. . . . . . . . . . . . . . . . . . . . . .'wait for pause command to finish
    Code "G00 G91 A90" . . . . . . . . . . . ' Move A axis 90deg
    While IsMoving ()
    Wend . . . . . . . . . . . . . . . . . . . . . . 'wait for motor to stop moving
    Code "G00 G91 A-5" . . . . . . . . . . . . ' Move A axis back 5deg
    While IsMoving ()
    Wend . . . . . . . . . . . . . . . . . . . .. . 'wait for motor to stop moving
    DeActivateSignal(OUTPUT1) . . . . . . . .'Turn off output#1 and Lock turret

    Your G-code would just call M6 and this file would run until finished all commands then return back to the G-code.

    Now in practice there would be a few more commands and variables etc in there to find which tool number and move the correct distance along with some house keeping dutys but it should show you that it's not rocket science and with a little research for the commnads and help you'll soon knock up a M6 toolchange macro thats custom to your machine.
    Last edited by JAZZCNC; 19-10-2015 at 07:46 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Mach lathe spindle speed control
    By GeoffV in forum Artsoft Mach (3 & 4)
    Replies: 7
    Last Post: 21-05-2014, 08:34 AM
  2. FOR SALE: pdmx 107 spindle speed control board
    By dazza in forum Items For Sale
    Replies: 0
    Last Post: 08-05-2014, 02:58 PM
  3. Spindle Speed Control
    By cncJim in forum Spindles & Drive Motors
    Replies: 15
    Last Post: 18-06-2013, 07:53 PM
  4. eBay: UIM2901-5A Mach3 breakout board with spindle speed control
    By Fivetide in forum Items On eBay UK
    Replies: 0
    Last Post: 05-02-2013, 07:25 PM
  5. Speed control
    By Saracen in forum Spindles & Drive Motors
    Replies: 2
    Last Post: 29-12-2012, 02:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •