G900.PRG

Ask for help with NCPlot problems here

G900.PRG

Postby hdscarbro » Wed Jul 08, 2009 8:24 pm

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
hdscarbro
 
Posts: 11
Joined: Fri Jun 06, 2008 11:59 am
Location: Chelmsford, MA

Re: G900.PRG

Postby scottmartinez » Fri Jul 10, 2009 6:25 pm

It seems OK on v2.07b1, what version do you see this on?

Scott
Attachments
Capture.JPG
Capture.JPG (99.18 KiB) Viewed 8286 times
User avatar
scottmartinez
Site Admin
 
Posts: 215
Joined: Sat Mar 11, 2006 8:49 pm

Re: G900.PRG

Postby hdscarbro » Tue Jul 14, 2009 10:46 am

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
Attachments
screen.jpg
Screen capture showing bug
screen.jpg (183.27 KiB) Viewed 8273 times
hdscarbro
 
Posts: 11
Joined: Fri Jun 06, 2008 11:59 am
Location: Chelmsford, MA

Re: G900.PRG

Postby scottmartinez » Sun Jul 19, 2009 7:57 pm

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
User avatar
scottmartinez
Site Admin
 
Posts: 215
Joined: Sat Mar 11, 2006 8:49 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron