Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: M250cnc on October 09, 2009, 11:44:04 AM

Title: Tool Changing problems on the lathe
Post by: M250cnc on October 09, 2009, 11:44:04 AM
I had an issue recently using an mpg to drill a hole when doing this i had what could only be described as an un-commanded toolchange mid drill which led to an estop and brown trousers, anyone heard of this ?

I have been trying to run some code but do not understand an un-commanded move after the tool change, below is the code.

Between the tool change and the M03 line the X axis runs towards the centreline the Z stays still, does that seem to be right ?

Then both axis move to the commanded positions on line N180

Now if i stop the program, rewind and run again the X axis will move to a different position ?

All the above was stepping through one line at a time.

OK now i let the program run completely at the end the axis move to the commanded positions BUT THEN THE TOOL CO ORDINATES CHANGE TO TOOL ONE BUT TOOL 05 IS STILL IN THE TOOL DRO. Is that correct behaviour ?

I have tried using my desktop as i am running this on a laptop with SS with the same results

I have the same issue with ver 3.042.029 as with 3.042.023 i have tried changing persistent tools unticked restarting Mach same problem.

Yet another issue is homing, i am using optical sensors and it works perfectly but occasionally it appears that the motors have retuned themselves as it doesn't back of the same distance restarting Mach will cure the problem.

I have completely lost confidence in the machine. :'( :'( :'(

I have attached my XML if someone could help

%
O0000
N90 G96 G94 G90 G80 G64 G54 G50 G49 G40 G21 G18 G00
N130 M06
N140 T0505
N150 G97 S500
N160 G95 F1.5
N170 M03
N180 G00 Z50. X60.
N190 Z1.
N200 X12.
N210 X9.8
N220 G32 Z-20. F1.5
N230 G00 X12.
N720 Z1.
N730 X60.
N740 Z50.
N750 G50
N760 M5
N770 M9
N780 (END TOOL)
N790 M30
%
Title: Re: Weird Lathe Problem ?
Post by: M250cnc on October 10, 2009, 08:22:09 AM
Nobody able to offer any insight.  :(
Title: Re: Tool Changing problems on the lathe
Post by: M250cnc on October 11, 2009, 05:13:41 AM
Maybe a change in title will get me some help
Title: Re: Tool Changing problems on the lathe
Post by: RICH on October 11, 2009, 08:11:04 AM
PHIL,
I have used the MPG to do move the axis to cut off, drill holes, and turn down small stuff and didn't
have any problems. Can't help because i don't use the tool changing or have limit swithes yet on the lathe.
I am sure someone will chime in.
RICH
Title: Re: Tool Changing problems on the lathe
Post by: M250cnc on October 12, 2009, 03:50:06 AM
Rich

Thanks for the encouragement, there are three questions/problems with this thread.

Phil
Title: Re: Tool Changing problems on the lathe
Post by: Hood on October 12, 2009, 05:42:44 AM
How is your MPG connected? Do you have Brains or Custom Macros?
Hood
Title: Re: Tool Changing problems on the lathe
Post by: ART on October 12, 2009, 10:15:07 AM
Sounds liek a macro thing.. Whats the m6.m1s look like? It may have some code in it to set tool length offsets or something.

When the T0505 is encountered, the offset #5 is applied, so the dro may change to reflect current coordinate. this makes the next move different from what youd assume
depending on whats in offset#5. But if theres any code in the m6.m1s then anything is possible.

  Dont know about homing, the system wont change the motor tuning unless your swapping between metric and english.. I take it the machine is setup in the coordinate system
that you use in the code?

Art
Title: Re: Tool Changing problems on the lathe
Post by: M250cnc on October 12, 2009, 11:19:26 AM
Hood & Art thanks for the help

So far the mpg problem has happened once as i say a completely new install so i haven't knowingly changed any macros.

My main concern is the code i have pasted

It is a screwcutting code it produced a perfect thread i have only shown the beginning and the end to keep the size down.

To run the code i do the following

I change to tool 05 manually

Set the Z Zero position

I run the code "perfect thread"

Now herein lies the problem at the end of the run

The tool dro displays 05 but the axis dro's display the offsets for tool one. This is what was so frustrating finding this problem. How do i know

Because if i now change the tool dro to 01 the axis dro's do not change But if i change them back to 05 the axis dro's change back to the correct position that was commanded in the gcode "N730 X60. N740 Z50."

I did make a video of this but cannot upload it anywhere as it is 3Mb

Now at the end of my code i have a G50 could this be making the problem

Thanks
Phil




Title: Re: Tool Changing problems on the lathe
Post by: ART on October 12, 2009, 11:36:05 AM
Phil:

  It could be. BAsically the program runs ahead of you, so the tool in the dro is simply the last tool commanded in the program usually.
Typing in a new tool to the dro wont change the offset register, youd be better of enter T0505 in the mdi line if you want to swap a tool
to see the effect. I think theres a config item "Remove offsets at end of program " as well, make sure if thats there, it isnt checked. It could
be the program is removing offsets at end of run.

Art
Title: Re: Tool Changing problems on the lathe
Post by: M250cnc on October 12, 2009, 11:45:28 AM
Art

Thanks i will try to find that setting and check it.

I will also change tools from the mdi line from now on.

I have become scared of this machine the last thing i want to see is the tool driving into the chuck

Phil
Title: Re: Tool Changing problems on the lathe
Post by: M250cnc on October 13, 2009, 06:29:11 AM
Art & Hood "Lathe & Screen4 Expert"

OK just ran the screwcutting code a couple of times

I have now set the parameter "Removed tick in remove tool offset at end of program"  :-[

I am now changing tools via mdi line and will accept for now that the mpg error was caused again by lack of knowledge by changing tools via tool number dro

Now at the being of the thread i posted some code

Running this code i still get the X axis moving at full speed to the centre line

If i scroll the code in the code window this code this move isn't shown in the toolpath window

Looking at the limits dro's it shows the X axis to be - 1.525
                                                                       + 24.3950

Now when the code runs the X moves at high speed from X60 to X24.4 then moves back to where it is supposed to be X60 and from then on it runs as it is coded

Is this what i should be expecting ?

Phil
 

Title: Re: Tool Changing problems on the lathe
Post by: Hood on October 13, 2009, 07:37:58 AM
What is in the M6Start.m1s macro? I suspect there may be code in it telling it to move to a toolchange position.
Also attach the full code unless you are getting the problem when using only the portion you posted.
Hood
Title: Re: Tool Changing problems on the lathe
Post by: M250cnc on October 13, 2009, 08:43:55 AM
Hood

I appreciate your efforts.

I modified the code to just run one line of the code as it is posted at the beginning.

Still the same rapid X move.

The M6Start.m1s macro contains the following

  tool = GetSelectedTool()
  SetCurrentTool( tool )

I also checked all the macro's in the different folders they were all the same ?

One other thing if i jog the X axis to a different position then do a regen the Max X Limit dro will show the actual position that the X axis will rapid to

Phil
Title: Re: Tool Changing problems on the lathe
Post by: Hood on October 13, 2009, 09:06:21 AM
Just tested the code you posted in the first post and it works exactly as expected.

Try putting this at the start of your m6Start.m1s macro

MsgBox("ToolChange")

let me know what happens.

Hood
Title: Re: Tool Changing problems on the lathe
Post by: M250cnc on October 13, 2009, 09:24:27 AM
Hood thanks,

Now i will tell you that i am using my own screen that i have modified from the standard screen.

Could that be the problem. ?

I have not knowingly changed any code except the home all routine which only homed one axis.

I will try as you asked and modify the code.

OK i ran the code still the same Rapid X move

I had a box popup asking to OK a tool change

Phil
Title: Re: Tool Changing problems on the lathe
Post by: M250cnc on October 13, 2009, 09:43:13 AM
Just ran the file with the standard screen same problem.

I changed to standard screen shut down, re started Mach3 exactly the same problem.

Phil
Title: Re: Tool Changing problems on the lathe
Post by: ART on October 13, 2009, 10:09:54 AM
Phil:


   Change the t0505 to t0500 , what happens then.

Art
Title: Re: Tool Changing problems on the lathe
Post by: Hood on October 13, 2009, 10:26:27 AM
I had a box popup asking to OK a tool change

Phil

Ok I was hoping you didnt see that,  it means you have been editing the correct macro ;D

Where did the rapid happen, was it before or after you OK'd the toolchange.

Hood


Title: Re: Tool Changing problems on the lathe
Post by: M250cnc on October 13, 2009, 10:55:08 AM
Art

Did as you said exactly the same

One thing i have just noticed if i set the  X axis from 10 to 60 in 10mm increments then do a regen the X plus limit is always 24.3950 and that is the erroneous rapid X move

But X70 then X limit = 29.3950 = erroneous rapid X move
      X80                    34.3950 = erroneous rapid X move
      X90                    39.3950 = erroneous rapid X move

If that info is any use

Hood after the tool change i hit cycle start again that move is the next move "erroneous rapid X move"

Phil
Title: Re: Tool Changing problems on the lathe
Post by: ART on October 13, 2009, 11:08:39 AM
hmm, if I load your program here, zero the x dro, and regen, I get X limits of 0.00 and 60.0 which seems correct. Did you try it on the release screenset.. I cant think of why its acting differently on yours..

Art
Title: Re: Tool Changing problems on the lathe
Post by: M250cnc on October 13, 2009, 11:46:16 AM
Art

I have already tried the standard screenset exactly the same even shut Mach down and then restarted

I just changed the code to tool 1 with all Zero offsets in the tooltable still same problem

Also get the problem with a desktop, i tried to eliminate every thing i could think of myself before asking here

I posted my xml at the beginning i don't know if Hood has tried that, there is never a move in Z only X

Phil
Title: Re: Tool Changing problems on the lathe
Post by: Hood on October 13, 2009, 01:31:56 PM
Dont see anything wrong with your xml and it seems to run fine here with your code.

Do you have any custom macros at all? or Brains?

Hood

Title: Re: Tool Changing problems on the lathe
Post by: M250cnc on October 14, 2009, 06:09:17 AM
Hood And Art

A big thank you for your patience with this problem.

I have solved the problem but i don't know exactly what the problem is or how it came about. :-[ :-[ :-[

Hood your last post convinced me that it was all my fault, naturally.

So i used the standard macro folder and renamed it to my profile after renaming the original folder BAD

I ran the code it worked as it should, i then copied over my tool folder from the bad folder into the standard renamed tool folder, ran again still OK

The problem is I have lots more macros in the bad folder and some that are missing.

Phil
Title: Re: Tool Changing problems on the lathe
Post by: Hood on October 14, 2009, 06:22:29 AM
Just have to copy the macros over one by one and see if the problem returns. Have a look at the m6End.m1s and see if there is anything in that, it should say something like Not used in Turn but maybe yours had something else in it, I am not sure if Turn would just ignore it regardless of what was in it or not.

Hood
Title: Re: Tool Changing problems on the lathe
Post by: M250cnc on October 14, 2009, 06:31:41 AM
Hood are you a sadist.

I have been wrestling with this problem for the last 4 weeks and i defiantly do not want it to return. ;D ;D ;D

Maybe when i have had it working for a while i might see what it was.

Phil