Having figured out how control x and y axis and even the auto changer using a bob i don't know how to proceed with the spindle control speed and direction . .I still have the original motor and inverter fitted and all the switch gear and wiring .How do i connect this up to the cnc control through the bob. thanks
Hi, iam sorry to say i am unable to help you with your problem but you may be able to help me with mine! I have a TCL160 that i am looking to convert and one of the things stumping me at the moment is how to control the tool turret, i have read that macros need to be written for it but to be honest that is all may beyond me, can i ask how you have done it?
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 06:46 PM.
Thank you for taking the time to write your reply. I am quite the " Noob " at CNC but your clear and concise reply has made what seemed like the impossible this morning quite possible as i sit here now. Im sure there will be a lot of trial and error in the process but i now have a starting point that i can understand ! Thank you so much, it is truly appreciated !
The 160 has no way of knowing which tool is loaded, so always end your programs with gcode which will return the turret to the Tool1 position.
I have a cheat sheet of the the number of moves to get from T1 to T2, T1 to T3 etc. The further it turns forwards, the more I have to move it back to be certain it has locked. I could work out the moves better but I prefer to work in whole numbers.
Most of the work on a lathe is pretty simple so I too write the gcode directly without needing CAM software. I've pretty much mastered simple cuts and threading and am starting to incorporate curves now.
I've found using delrin really helps for initial runs because inadvisable tool moves then just break the plastic, rather than the machine.
Last edited by Saracen; 19-10-2015 at 10:20 PM.
10 mins work will save hours of coding and remove any possible chance of error from a typo or brain fart.!!
Hmm, something to think about once I've got the wiring all tidied up.
I think I have a limit location left on the controller which would be suitable.
By GeoffV in forum Artsoft MachReplies: 7Last Post: 21-05-2014, 07:34 AM
FOR SALE: pdmx 107 spindle speed control boardBy deisel in forum Items For SaleReplies: 0Last Post: 08-05-2014, 01:58 PM
By cncJim in forum Routers, Spindles & ControllersReplies: 15Last Post: 18-06-2013, 06:53 PM
By Fivetide in forum Items On eBay UKReplies: 0Last Post: 05-02-2013, 06:25 PM
By Saracen in forum Routers, Spindles & ControllersReplies: 2Last Post: 29-12-2012, 01:18 PM