Page 1 of 1
G900.PRG
Posted:
Wed Jul 08, 2009 8:24 pm
by hdscarbro
This macro doesn't appear to function the same as the built-in G90. With external G90 macro enabled, X motion is 1/2 what is specified. For example, run this program with the external G90 enabled:
G00 X1.0 Z0.0
G90 X0.5 Z1.0
Select the plot line produced by the G90 and it's location is:
Line at Feed
Tool 0
Start Z0.0 X0.25
End Z1.0 X0.25
Length 1.0
Delta Z 1.0
Delta X 0.0
Re: G900.PRG
Posted:
Fri Jul 10, 2009 6:25 pm
by scottmartinez
It seems OK on v2.07b1, what version do you see this on?
Scott
Re: G900.PRG
Posted:
Tue Jul 14, 2009 10:46 am
by hdscarbro
Hi Scott,
I'm running v2.07b1 and have tried it both on my desktop and laptop machines with the same result. Here are the steps I used to reproduce the problem:
1) Set machine configuration to Lathe Diameter
2) Make G90 a G Code macro
3) Enter and run the following:
g00 x1.0 z00.0
g90 x0.95 z1.0
X for the G90 is 0.475
I've attached a screen capture that shows what I'm seeing.
David
Re: G900.PRG
Posted:
Sun Jul 19, 2009 7:57 pm
by scottmartinez
David,
I finally figured out what's going on with this... The G-Code macro is getting the X as a radius value instead of diameter. If you are writing your own G-Code macro there is a system variable you can check to see what the active machine type is. Its variable #5100 and it contains one of three values:
0 - Mill
1 - Lathe / Radius
2 - Lathe / Diameter
You can use this variable to check the radius / diameter active type and adjust the incoming X value accordingly:
IF [[#24NE#0]AND[#5100EQ2]] THEN #24=#24*2
Scott