Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: gabedrummin on May 05, 2020, 01:56:50 PM
-
I have an auto tool changer on my Lathe . Mach4 Pokeys 57e Motion controller . Macro from Mach .Macro works in Mid .I am able to change from tool to tool one direction . My turret is set up to home . From with in a g-code program it will change the first tool but then the next tool change Mach gets stuck . I have to re set the software to gain control again . I am very confused :-[
-
Can you post your tool change code? Maybe an example of Gcode with descriptions of what does or doesn't happen at each line.
-
I start at T0000 Machine will change to tool 1, runs the program ,rapids to home position G28 X0 Z0 .gets to line T0202 and Mach4 freezes at this line. No error message .I have to hit rest to gain control of Mach .In the offset display it changes to 2 the m06 light blinks .But it dose not change the tool . When I hit rest the tool number changes to 2 . So if I manually move the turret to the next tool which is tool 2 and run the program from tool 2 it will machine that operation then it will change to tool 3 machine that operation and freeze at tool 4 . Its as if it only wants to complete one tool change .I have spent the last year trying to make the turret work and now I find out it wont change the tools from a program . I can use mdi and it will change through the whole turret and home back to 0.Thanks for any help.
-
Turn logging on in diagnostics tab and put some messages into your code to see where it gets to. Better still post your code so we can help fix it.
-
Here it is
-
This is not the code we need, we need to see the M6.msc file, this is what controls the tool changer.
You can find this in the mach4/profiles/profilename/macros/m6.msc
-
Sorry every time I try to upload it an error generates and the mcs file gets deleted.
-
Try this version :-
-
Thank you sir .I will try this tonight when I get home. I appreciate your help sir ! Thank you ,have a blessed day sir .
-
I tried your Macro sir and she is doing the same thing .Hangs up on the tool change .Its going to be a Mach bug .Ive gone through two computers .I have lost count how many un-installs , installs I have done . I think it was a month ago I installed the latest's development version on Machs request to fix another issue. Thank you for your effort to help me.
-
Is the run time clock counting when you think its hung, it was working here but it took it a while to go from tool 1 to 2 and 2 to 4 and back to 1
Has this ever worked correctly.
Some pictures of the setup may help and a description of the tool changer function.
Go into the macro folder and delete all the .mcc files.
-
Yes the cycle timer is running . After 5 mins I shut Mach down . I have only used the the toolchanger in MDI. This is my first attempt to try it in a program . I have given up trying to make it go from 2 to 1 .The machine is a lathe Dyna Myte DM300 .Im using a cnc4pc m16 d with a pokeys 57e core board .The turret is gear driven by a nema 23 stepper motor . The motor drives a right angle gear set up . it is locked up against a pawl .The lock can be released by a solenoid .I have the solenoid connected to a relay tied to output 21 .I also have a software button that can toggle the relay that operates the solenoid . To go from 1 to 2 the solenoid is not needed it is only needed when going to a lower numeric number like from 2 to 1 . So I gave up on making that work when I discovered I cant change tools from a program .The turret moves clockwise when going from one to 2 . It passes the lock position then the turret backs up against the lock. To release the lock the turret motor has to rotate the opposite direction 1/16 of a motor revolution or so just enough to take the pressure off the pawl so the solenoid can pull up , then back the other way to complete the tool change .So when I gave up on that this other problem was discovered. I think this week end I will install the latest version of Mach and try to find on of the old Macros and try that .Thank you sir.
-
I would like to thank everyone who helped me .I figured out that its the M5 code causing the problems .Don't know how this wasn't caught .But when my system sees it ,,it stops everything .The spindle , motion Mach . Is this a bug...? I thought M5 just stops the spindle ?