Hello Guest it is October 22, 2019, 08:08:05 AM

Author Topic: "Run from here" bug in combination with tool change  (Read 2911 times)

0 Members and 1 Guest are viewing this topic.

"Run from here" bug in combination with tool change
« on: October 19, 2014, 07:08:28 PM »
Hello,

I have serious problems with the "run from here" function in Mach3 Mill. In a program with tool changes, e.g. g43 hxx, t... and m6 commands, resuming a program is impossible and dangerous. Why? I set up my tool table as written in the manual, with the shortest as 0 and all other with the function in the offset screens. In a continous program, everything works fine. But if you have to stop and resume the program with "run from here", it goes south ... or, more precisely, straight down at full speed. Even if you have the matching tool in the machine (at this postion in the program), the correct offset and the DRO's show the right z position, the preparing move overshoot the Z value shown in the preparing move sceen (for example 50) and the DRO and plunges farther down (49,48,47 ...). I don't know how far ... I was lucky enough to avoid a crash so far. But I presume that it ignores the tool offset value and goes for the Z value in combination without Tool offset. I guess that everyone is working on Mach4, but this one should be corrected. The only solution so far is copying the remaining program in a new file and start from the beginning what is somewhat annoying - and that isn't speaking of the danger involved.

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: "Run from here" bug in combination with tool change
« Reply #1 on: October 20, 2014, 05:44:03 AM »
I dont recall seeing that issue before and I use RFH quite a lot on the Chiron, then again I always tend to resume at a toolchange.
Can you attach your xml and I will see if I can find the issue.
Also what version of Mach are you using so I can load that to test.

Hood
Re: "Run from here" bug in combination with tool change
« Reply #2 on: October 20, 2014, 05:33:01 PM »
Thank you for the help. I'm working with version 66, and here're the xml file and the gcode. If I go to line 43, 44 oder 45 with Tool offset #27 active, Z is already in position +50 and "run from here", it should do nothing at line 45, because the last command was z50, and goes up at lines 43 or 44 because the previous tools were longer and there was no Z command with the last tool. The ending is correct so far, but when I hit "Cycle start" after run from here, it proposes the correct Z value, but - and this is mysterious - goes first down to Z0 (with Tool offset
#27) and then up to the right Z value. I have no Idea where the Z0 command comes from ...

I'm also going to check this on turn - as far as I know, the first major difference is that Turn ignores a G49 command and uses the current tool (offset), even if G49 is programmed while Mill takes Tool 0 if G49 is programmed. Because I have a mill and a lathe, this was one bad surprise which I could stop just 4/10 of a Millimeter before impact.
Re: "Run from here" bug in combination with tool change
« Reply #3 on: October 20, 2014, 05:57:02 PM »
Check with Turn - RFH is okay there, it's just on Mill the additional Z0 command in the preparing move.

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: "Run from here" bug in combination with tool change
« Reply #4 on: October 25, 2014, 02:23:22 PM »
Sorry, been busy and just got back on here.
Can you comment out the text in the M6End.m1s macro and see if that makes a difference.
I will have a look at your xml in a bit and see if I get the same issue.
Hood

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: "Run from here" bug in combination with tool change
« Reply #5 on: October 25, 2014, 02:34:16 PM »
Ok try this, go to Config menu, then Safe Z setup  and enable Safe Z. Keep it at machine coords and zero (assuming you do home the Z) and that should be ok.
Hood
Re: "Run from here" bug in combination with tool change
« Reply #6 on: October 26, 2014, 06:07:14 PM »
It sounds like you are doing the RFH with a tool in the spindle,  somewhere in the program after the tool change operation. Perhaps I am mistaken, but RFH has never given me a problem, but follow a basic convention in all my programs as follows.

1. Before all M6 T## H## commands, I put a G53 Z-.05 line in.

   This moves the spindle to it's highest point, .05 inch below the Machine 0, before the tool change cycle.
   This is exactly what Hood is suggesting you do; in fact I learned this method from him in another post some time back.

2. The line after the G53, and before the M6 line,  I add; G0 X## Y##, position that moves the spindle closer to the front, away from the work surface.
    This moves the spindle out where my longest tool is easily put into the spindle, which might have been too close to the work before.

3. I preface the G53 line with a (Tool 6 - Boring Head) or some such tool name in parentheses , so when I scroll down to do the RFH line I can easily find the
    place I want to go.

4. This "name line" is the program line I use for RFH.

Doing the RFH

Remove the tool from the spindle.
Scroll to the name of the tool, highlighted.
Click on RFH
Do all the OK's for preparation move.
Machine goes to tool change position, and calls for tool change.
When proper tool is in spindle, hit Cycle Start. Spindle starts, spindle moves back to the work, and program starts where you want.

This is assuming you have run the whole program before without tools, and with tools, proving there are no "gotcha's" ready to crash you tool.

Mach3 has some various little problems, but RFH is not one of them.  I find having all my tool changes (for a knee mill) with this kind of additional
stuff, like the G53 moving the spindle way up, and moving away from the work to be a simple, and safe way to proceed through a program.

Just because you think the RFH should have all the right numbers in it's memory, at any given point in the program, it may not.
A lot of things Mach3 does are not documented, or totally sensible to our way of looking at things. It is an elaborate machine program, that has evolved over the years. With a conservative, cautious approach, Mach3 is a superb, amazing machining program that can be depended upon.

John


Re: "Run from here" bug in combination with tool change
« Reply #7 on: October 27, 2014, 09:22:23 AM »
@ Hood: Thank you! I could locate the issue. The "Preparation Move" Window has two versions: One with SafeZ enabled and one without. If SafeZ is enabled, the preparation move goes first to this position and then to the calculated position. With SafeZ not enabled, there is a "Rapid Height" Input field. I really don't know for what this one is for, but it is by default 0 - and that is the move the machine makes as first one. So, if I every time set the "Rapid Height" to the same value as shown in the "Z" field, nothing happens here. Do you know for what this "Rapid Height" Input is really designated and why it is by default 0? If I'd think for an application, if you check "preparation move at feed rate" (e.g. you are at Z-5) and you want to skip to Z0 at full speed - but with preparation move at feedrate enabled, it doesn't does that. Really strange, that one ...

@ mrprecise44:
Programming a tool change like you wrote is the really clean way. But nontheless, my machine isn't that fast and if I go every time I want to change from one drill to the next bigger one all the way up to the home position, I'm getting old on the way. And I really don't have anything against Mach3. But every programmer knows that while a program grows, new features sometimes have an unexpected impact on the old ones - and the natural state of any program is full of bugs and every single one has to be found and removed. (Look: Entropy ...) And it is quite clear that in Mach3 with it's long evolvement there're some surprises included. For example this "Rapid Height" field. What, by the way, isn't documentated. And I also had some trouble especially with Turn, where the G77/78 macros really weren't checked with the newer versions because somebody should have seen that the use of the T word for the Taper collides with the T word for the tool change. And why the default M6End macro for Turn also has a SafeZ value used while SafeZ isn't part of Turn. And why the Tool setup in Turn is different as documentated and G49 is ignored - but only in Turn. And why "reverse arcs in front post" is by default on. And so on ... But in my opinion, I'm helping the developers and the community with posting this. Because the next Mach3 Newbie without a homed Z axis also doesn't (couldn't) know what this "Rapid Height" means and gets a shock if his machine goes down instead of up ...

Edit:
I have to make a compromise between safety and time - as always. Most of the time, I make only one or two copies of a part. And given the decision to make them manually or with CNC, I can't do a double test run without tools etc ... given the time needed for the coding, then I would be faster manually. I have to trust the Tool Path simualtions. And I surely don't blame the controller for the mistakes I make - in Germany the saying is "wo gehobelt wird, da fallen Späne". But I have to expect that the CNC controller actually does what is programmed and documentated - nothing more and nothing less. And there can be some optimization.
« Last Edit: October 27, 2014, 09:36:02 AM by stephanbrunker »

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: "Run from here" bug in combination with tool change
« Reply #8 on: October 27, 2014, 11:46:06 AM »
I would imagine the difference is if you do not have safe Z set up you should set the  rapid height value, if you have a safe Z set up then that will be used.

I have safe Z set on my machines , it will first move up to the safe Z I have set (G53Z-5)  and then move to where it is meant in X and Y then back down in Z ready for me to press start.

Hood