PDA

View Full Version : Why does this GCODE plot funny?



jemmyell
08-06-2007, 06:16 PM
Hi,

I am working on my GCODE generator and using NCPLOT 1.1 to test it. This is a simple box, but for some reason NCPLOT sees the rapids as coming from outer space and sets the scale very large. If I zoom WAY in I can see my box is OK, but I don't see what is wrong...

N000040 G20
N000050 G00 Z0.5000
N000060 M06 T0
N000070 F1
N000080 G43 H0
N000085 G00 Z0.5000
N000100 M03 S8000
N000120 G00 X0.13991 Y1.74468
N000150 G01 X0.12386 Y1.68479
N000160 Z-0.02000
N000170 G01 X3.43485 Y1.68479
N000180 Z-0.02000
N000190 G01 X3.43485 Y0.10493
N000200 Z-0.02000
N000210 G01 X0.12386 Y0.10493
N000220 Z-0.02000
N000230 G01 X0.12386 Y1.68479
N000240 Z-0.02000
N000250 G01 X0.06397 Y1.66874
N000260 Z-0.02000
N000270 G01 Z 0.12500 F 8.000

-James

HuFlungDung
08-06-2007, 06:55 PM
I don't know exactly, but offhand, I would guess that when things appear to be disporportionate in size, that an inch/metric conversion/rescaling has occurred somewhere. Now, I don't know if NCPlot 'understands' G20 or G21 but that would be something to look at.

5 decimal place accuracy also raises my eyebrows, but there should technically not be anything 'wrong' about that.

pointcloud
08-06-2007, 07:10 PM
It Is All Rapid... No Feedrate.... Plus Why Not Modal? All The Z G01 And F Would Be A Minium\\

dertsap
08-07-2007, 12:16 AM
your code is a bit of a mess and some moves don t make sense also the only times that i would suggest 5 decimal points would be in a tapping cycle

heres the same code cleaned up some

T1
M06
G00G90G54X0.1399Y1.7446 S8000M03
G43H1Z0.5000
g1Z-0.02 F1
X0.1238Y1.6847
X3.4348Y1.6847
X3.4348Y0.1049
X0.1238Y0.1049
X0.1238Y1.6847
X0.0639Y1.6687
G0Z0.1 F8.000
g91G28Z0

Switcher
08-07-2007, 09:03 AM
I ran your code thru v1.1 (free edition) of NCPLOT, your Rapid isn't going out in space, that's the "X & Y-axis = 0.000".

See the 2 screenshots below.

This is your code, that produced the plot in both screenshots.

N000040 G20
N000050 G00 Z0.5000
N000060 M06 T0
N000070 F1
N000080 G43 H0
N000085 G00 Z0.5000
N000100 M03 S8000
N000120 G00 X0.13991 Y1.74468
N000150 G01 X0.12386 Y1.68479
N000160 Z-0.02000
N000170 G01 X3.43485 Y1.68479
N000180 Z-0.02000
N000190 G01 X3.43485 Y0.10493
N000200 Z-0.02000
N000210 G01 X0.12386 Y0.10493
N000220 Z-0.02000
N000230 G01 X0.12386 Y1.68479
N000240 Z-0.02000
N000250 G01 X0.06397 Y1.66874
N000260 Z-0.02000
N000270 G01 Z 0.12500 F 8.000




I also ran your g-code like this, & it produced the exact same plot.


G00 Z0.5000

F1

G00 Z0.5000

G00 X0.13991 Y1.74468

G01 X0.12386 Y1.68479

Z-0.02000

G01 X3.43485 Y1.68479

Z-0.02000

G01 X3.43485 Y0.10493

Z-0.02000

G01 X0.12386 Y0.10493

Z-0.02000

G01 X0.12386 Y1.68479

Z-0.02000

G01 X0.06397 Y1.66874

Z-0.02000

G01 Z0.12500 F8.000

jemmyell
08-07-2007, 11:17 AM
your code is a bit of a mess and some moves don t make sense also the only times that i would suggest 5 decimal points would be in a tapping cycle

heres the same code cleaned up some

T1
M06
G00G90G54X0.1399Y1.7446 S8000M03
G43H1Z0.5000
g1Z-0.02 F1
X0.1238Y1.6847
X3.4348Y1.6847
X3.4348Y0.1049
X0.1238Y0.1049
X0.1238Y1.6847
X0.0639Y1.6687
G0Z0.1 F8.000
g91G28Z0

Hi,

I am writing Yet Another Cam Program. I just got the post processor facility prototyped so I am playing with it...I will test the modal output as soon as I have a handle on straight GCODE.

My result was very unexpected in NCPLOT. I expected to get what switcher shows above. Are there any settings / options at install time I may have missed? If NCPLOT was defaulting to metric it would make sense...

-James

Switcher
08-07-2007, 05:38 PM
All my settings are default (version 1.1 NCPLOT).

Different versions may handle g-code in a bunch of ways?

What language are you programming with?


.

jemmyell
08-07-2007, 05:40 PM
Ok, I see the problem. First I apologize for not posting a complete GCODE file. The first three lines (missing from my post) were comments that contained a product name and copyright. Since I am not ready to announce anything, I removed them.

They are the problem!

I assume that other versions of NCPLOT store some sort of config data in comments at the beginning of the file. The problem I get is the plot is VERY small, like it is assuming metric.

-James

jemmyell
08-07-2007, 05:42 PM
All my settings are default (version 1.1 NCPLOT).

Different versions may handle g-code in a bunch of ways?

What language are you programming with?


.

Hi, thanks again for your input. My application runs inside CorelDRAW, uses a VBA user interface, all C++ processing and my post processors are written in VBScript.

-James