Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: AJA on December 07, 2010, 05:31:21 PM

Title: Coordinate Shift When Thread Milling
Post by: AJA on December 07, 2010, 05:31:21 PM
Thread Milling Problems

When I attempt to run an old threading program (Mach 3 Wizards) my y-axis shifts about 4 inches.  When I returned to the center (eyeball) of the 6 mm shaft both the machine coordinates center, and the dro centers are off by approximately 4 inches.
I also lose the ability to jog, unless the shift key is used.
If I reload the program, using the machine coordinates I can return to the center of the shaft.

I have generated a new g code using Mach 3 Wizards with the same effect.

If I run an old circle g code, everything seems to work normally.

Any ideas as to what's going on?
AJ
Title: Re: Coordinate Shift When Thread Milling
Post by: Hood on December 07, 2010, 05:48:59 PM
Can you attach the code and your xml.

Hood
Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 07, 2010, 07:40:20 PM
See attached file
Title: Re: Coordinate Shift When Thread Milling
Post by: BR549 on December 07, 2010, 09:05:13 PM
Ran your code here it is fine. One note T0 is technically a reference point for the tool table and in general not a good idea to use it for actual use.

Please check your fixture offsets to make sure there is not a number in there that would represent the shift value.

Just a thought, (;-) TP
Title: Re: Coordinate Shift When Thread Milling
Post by: derekbpcnc on December 08, 2010, 03:04:55 AM
Hi,

I often use T0 when the program uses only one tool - never had a problem.
Only difference I can see is that when using T0, I never use G43. I dnot think an offset can be applied to T0 - maybe Mach is getting confused by that ????
I maybe way off, but you never know.

Also I always apply the tool length offset on the next line of the tool change...i.e
T1 M06
G43 H1

ATB
Derek
Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 08, 2010, 11:06:38 AM
Any ideas why the machine coordinates do not repeat when I return to the center shaft.  My understanding is that the machine coordinates in Mach are always repeatable as a reference to table position.  After I run this code, the machine coordinates change!
Title: Re: Coordinate Shift When Thread Milling
Post by: BR549 on December 08, 2010, 11:27:10 AM
THis is a problem for Brian to addresss. It seems there is a random coord shift occuring in several areas that I cannot get to to verify.

HUM?  now when you say the machine coords have changed do you mean the user Coords or the actual machine coords?? There is a difference.

I see where you wrote when you returned to the 6mm stub the values were different that would be users corrds unless you changed over to veiw the machine coords.

Every small tip may lead to the answer(;-)

Just a thought, (;-) TP
Title: Re: Coordinate Shift When Thread Milling
Post by: Hood on December 08, 2010, 01:56:58 PM
I am not sure if you saw it before but I will ask again,  please attach your xml and I will try and simulate here.

Hood
Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 08, 2010, 02:36:14 PM
The actual machine coordinates change.  

Operation:

When I center spindle over shaft:  MC x=17.9441, y=6.6080.   Zero user coordinates, x=0 y=0

Load code:  MC x=455.7804, y=167.8425  User coordinates x=437.8363, y=161.2346.  This change occurred without running the code.

If Mach 3 is shut down and restarted the shaft zero is again x=17.9441 and y=6.6080.  

Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 08, 2010, 02:39:34 PM
Hood,
I saw it but I don't know what the xml is.
Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 08, 2010, 03:58:11 PM
Hood,

Is this what you need?
Title: Re: Coordinate Shift When Thread Milling
Post by: Hood on December 08, 2010, 04:07:29 PM
The xml is a file that holds your configuration settings and can be found in the main Mach3 folder on your drive (not the xmlbackup folder) There will be a few xml files but the one you want is the one that has the name of the profile you are using, for example if you are using the standard Mill profile it will be called Mach3Mill.xml if you have a custom profile it will have that name.
 You will need to copy the xml to your desktop and rename so that the forum will accept it.
Hood
Title: Re: Coordinate Shift When Thread Milling
Post by: Overloaded on December 08, 2010, 04:07:45 PM
AJA,
  could be your native units... ? Is it set to INCH ?
The code is G21MM.
17.9441 x 25.4 = 455.780
Title: Re: Coordinate Shift When Thread Milling
Post by: Overloaded on December 08, 2010, 04:10:21 PM
Looks like it's just converting ... not really changing.
Just a thought
Title: Re: Coordinate Shift When Thread Milling
Post by: Hood on December 08, 2010, 04:12:25 PM
I would say that you are spot on there Russ good catch :)

Hood
Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 08, 2010, 04:23:00 PM
Overloaded,

The g21(mm) is line 03 in program.

The the values are in millimeters.

Is there somewhere else I need to change the millimeters?
Title: Re: Coordinate Shift When Thread Milling
Post by: Hood on December 08, 2010, 04:29:05 PM
Config menu then Native Units will tell you what you have set up in. If you are meant to be metric but have inch there then you will need to re do your motor tuning if you change it.
Hood
Title: Re: Coordinate Shift When Thread Milling
Post by: Overloaded on December 08, 2010, 04:41:09 PM
AJA, is the machine actually NOT moving to the correct position ? ? ? or, are the DRO's just showing the difference ?
Mach should handle the conversions ... regardless of the native settings.
Pretty sure anyway.
Hood ?
Title: Re: Coordinate Shift When Thread Milling
Post by: Hood on December 08, 2010, 04:46:05 PM
Russ, yes it should handle it but it could be that the native units are set to Inch and then the steps per unit are set so that 1 unit moves 1mm. If that is the case then things will screw up when code with a G21 in it is run.

AJA
 If you can attach your xml it should let me see if you have things set correctly regards native units and motor tuning.
Hood
Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 08, 2010, 05:10:55 PM
Hood,

I have to copy the file from one machine to another.  I have the file on the desktop of the machine connected to the internet, but can not attach it to my reply  -path does not exist ??
Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 08, 2010, 05:16:49 PM
Overloaded,

The machine is moving to the coordinates on the dro's which are about 4.5 inches from where they should be.
Title: Re: Coordinate Shift When Thread Milling
Post by: Hood on December 08, 2010, 05:25:26 PM
Not sure what that would mean unless you just have  a shortcut on your desktop?
Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 08, 2010, 05:37:39 PM
Hood
Need to leave for about 20 minutes.  How do I attach the file on the desktop to the reply.  See you in 20 minutes?
Title: Re: Coordinate Shift When Thread Milling
Post by: Hood on December 08, 2010, 05:39:40 PM
Use the additional options button on the reply page and browse to the xml and choose.
Hood
Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 08, 2010, 06:54:09 PM
Hood,
Tried that several times with no luck.
Title: Re: Coordinate Shift When Thread Milling
Post by: BR549 on December 08, 2010, 07:43:39 PM
Looking at the positional data the MC converted correctly when the G21 loaded , BUT the user Coord X0 Y0 did not reset back to X0 Y0 (;-) SO now if you push start the machine will go somewhere it should not go.   ???????  AND it still does not explain how the machine ended up 4.5 inches off the original coord base

QUOTE:
Operation:
When I center spindle over shaft:  MC x=17.9441, y=6.6080.   Zero user coordinates, x=0 y=0
Load code:  MC x=455.7804, y=167.8425  User coordinates x=437.8363, y=161.2346.  This change occurred without running the code.
If Mach 3 is shut down and restarted the shaft zero is again x=17.9441 and y=6.6080.

Just a thought, (;-) TP
Title: Re: Coordinate Shift When Thread Milling
Post by: Graham Waterworth on December 09, 2010, 03:10:49 AM
What are the values in the G54 fixture offset?

Graham
Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 09, 2010, 06:54:06 AM
Hood,
Finally !!
Title: Re: Coordinate Shift When Thread Milling
Post by: Hood on December 09, 2010, 07:11:49 AM
Ok from first looks it would seem you have your steps per unit set as mm, is that correct? ie if you command a move of 1 does it move one mm or one inch?
Hood
Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 09, 2010, 08:07:52 AM
Grham,

G54 offsets x=4.5 y=1.39
I zeroed g54 and started the program without tooling, it looks close to being right

Hood,

The spindle moves 1 mm
Title: Re: Coordinate Shift When Thread Milling
Post by: Hood on December 09, 2010, 08:10:58 AM
Ok so you have your native units set wrong, you have them set to inch and you should have it to mm. Config menu then Set Native Units and change to mm. Because you already have the motor tuning set to correspond to mm then it is likely you will not have to retune the motors but go carefully just in case it screws up.
Hood
Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 09, 2010, 08:23:13 AM
Hood,

Will try that.  I have a funeral to attend today, will get back tomorrow.
Thanks
AJ
Title: Re: Coordinate Shift When Thread Milling
Post by: BR549 on December 09, 2010, 06:03:27 PM
OK there is the 4.5 " offset in the g54. That was why I asked in the beginning about fixture offsets. I  Bet you have mach set to cancel all offsets on a M30 (;-) if so when the M30 ends the program it removed the 4.5" of fixture offset.

That could be part of the problem.

Still a little weird about the switch when it converts over to G21. It does it here as well, BUT if you rezero after it does it it does no harm. But IF you don't rezero it will go to another location.

Just a thought, (;-) TP
Title: Re: Coordinate Shift When Thread Milling
Post by: AJA on December 11, 2010, 01:26:37 PM
I reconfiged. the menu and changed to mm.  I removed the offset and zeroed all .  Program runs as it should.

Thanks to all for all the help.
AJ
Title: Re: Coordinate Shift When Thread Milling
Post by: Hood on December 11, 2010, 03:19:24 PM
Great to hear that.

Hood