Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: Gordo on February 04, 2018, 07:43:38 PM

Title: Mach3 Error when running G-code
Post by: Gordo on February 04, 2018, 07:43:38 PM
Hi
I have built my own CNC machine (Dave Gatton Sidewinder. I am trying to cut a clip art drawing of a Lions head. The program starts and runs great, and when it is just about finished I get an error saying "Command to Long" the screen goes blank and stops the process. Can any one help me with this problem.
Thanks
Title: Re: Mach3 Error when running G-code
Post by: Tweakie.CNC on February 05, 2018, 02:12:32 AM
If you .zip then attach your Gcode file it can be checked for errors.

Which motion controller are you using (make and model) ?

Tweakie.
Title: Re: Mach3 Error when running G-code
Post by: Gordo on February 05, 2018, 07:26:09 PM
Here is the G-Code Zip file
Thanks for the reply
I am going to try to split the Tool paths in 2 to see if that works
Title: Re: Mach3 Error when running G-code
Post by: Gordo on February 05, 2018, 08:46:30 PM
Sorry
I am using Mach 3 and the controller is xylotex 4AX-40V-425-DB. Hope this helps.
Title: Re: Mach3 Error when running G-code
Post by: Tweakie.CNC on February 06, 2018, 03:51:50 AM
Hi Gordo,

Your Gcode file runs through to the end just fine here so nothing wrong with that.

We had a similar problem to the one you are describing some years back when graphics memory was limited. If you are up for a bit of experimentation then try turning off the Toolpath Display (Diagnostics window) and running your Gcode file again. If it completes successfully then it indicates that you need more graphics memory.

Now that graphics cards with 1 Gig or greater are cheap and readily available perhaps fitting one of those would be the way to go.

Tweakie.
Title: Re: Mach3 Error when running G-code
Post by: Gordo on February 06, 2018, 01:03:34 PM
I disconnected the wifi from the computer and the G-code ran threw to the end. I made the cut and to my surprise it was smaller than expected. The stock was 15" x 15" and the Lion and circle came out with a diameter of 6"1/2 ", can anyone help me with this issue.
Thanks
Title: Re: Mach3 Error when running G-code
Post by: TPS on February 06, 2018, 02:51:21 PM
just have a look into your GCode file, for example the big circle:

N239020G2X0.3354Y-6.0715I-6.0636J0.4566F100.0
N239030G1Z-0.6450
N239040G1X0.1678Y-6.0785
N239050G1X0.0000Y-6.0808
N239060G1X-0.2938Y-6.0737
N239070G1X-0.5870Y-6.0524
N239080G1Z-0.7700F30.0
N239090G2X-6.0636Y-0.4566I0.5870J6.0524F100.0
N239100G1Z-0.6450
N239110G1X-6.0765Y-0.2284
N239120G1X-6.0808Y0.0000
N239130G1X-6.0764Y0.2313
N239140G1X-6.0632Y0.4623
N239150G1Z-0.7700F30.0
N239160G2X-0.6194Y6.0492I6.0632J-0.4623F100.0
N239170G1Z-0.6450
N239180G1X-0.4134Y6.0667
N239190G1X-0.2068Y6.0773
N239200G1X0.0000Y6.0808
N239210G1X0.2950Y6.0736
N239220G1Z-0.7700F30.0
N239230G2X6.0634Y0.4594I-0.2950J-6.0736F100.0

the ist nothing bigger than 6.something Inch

also if you have a look in Standard Screen set (1024 -> tool path)  for the
Programm Limits, they are +/- 6.08",

so why should  the result be bigger than this ?




Title: Re: Mach3 Error when running G-code
Post by: Overloaded on February 06, 2018, 03:26:26 PM
I made the cut and to my surprise it was smaller than expected. The stock was 15" x 15" and the Lion and circle came out with a diameter of 6"1/2 ", can anyone help me with this issue.
Thanks

Is there any scaling in effect ?
Are you sure your steps per unit are set correctly ?
Should come out to about 12" diameter.  From -6 to +6 in x and y.

Nice lion, btw ... I think I'll keep it  ;), Thanks
Title: Re: Mach3 Error when running G-code
Post by: Gordo on February 06, 2018, 04:10:25 PM
How do I check scaling
How do I check steps per unit
Title: Re: Mach3 Error when running G-code
Post by: Gordo on February 06, 2018, 05:06:53 PM
Hi
When I measure the stock on the 2D drawing screen it is 15" x 15"
When i measure the Lion the Dia is 9.33"
When I measure the the circle the Dia is 11.66 "
I am not sure were the problem is. In Vcarve or Mach3.

Any help would be appreciated.
Title: Re: Mach3 Error when running G-code
Post by: TOTALLYRC on February 06, 2018, 05:44:57 PM
It comes up here as 6.08 and -6.08 as the extents.
Not a Mach3/4 problem as far as I can see.

Mike
Title: Re: Mach3 Error when running G-code
Post by: Overloaded on February 06, 2018, 07:08:41 PM
How do I check scaling
How do I check steps per unit


Position your machine at X0
Then MDI G50 G1 X6 F30
Measure how far the axis moved.
The G50 will cancel any scaling that may be in effect.
Title: Re: Mach3 Error when running G-code
Post by: garyhlucas on February 07, 2018, 10:53:36 AM
Your g-code shows a diameter of about 12” so the problem is with Mach 3 settings not V-carve.
Title: Re: Mach3 Error when running G-code
Post by: Gordo on February 07, 2018, 07:47:20 PM
I hate to be a pain but I have tried all that I know about CNC put to no avail. It seems that everything is have the size it should be, even when trying to cut threw a .76 in board and the setting is .78 in it only cuts down to .36 in not sure where to go from hear.

Thanks for you help.
Title: Re: Mach3 Error when running G-code
Post by: TOTALLYRC on February 07, 2018, 08:05:10 PM
Lets start with the basics. Use an one inch indicator and command a motion of one inch. See if the physical  motion matches the commanded movement.


Mike
Title: Re: Mach3 Error when running G-code
Post by: TPS on February 08, 2018, 01:24:34 AM
Position your machine at X0
Then MDI G50 G1 X6 F30
Measure how far the axis moved.
The G50 will cancel any scaling that may be in effect.

done ?
result ?
Title: Re: Mach3 Error when running G-code
Post by: Gordo on February 08, 2018, 03:02:17 AM
I will try this tomorrow. Here is a screen shot from Mach3 showing a Dia of about 14.5 "
Title: Re: Mach3 Error when running G-code
Post by: Gordo on February 08, 2018, 07:11:31 PM
I tried setting x) and then G50 G1 X6 F30 as you can see in the pic. the movement was 6.00
Thanks
Title: Re: Mach3 Error when running G-code
Post by: Overloaded on February 08, 2018, 07:39:31 PM

MEASURE the actual axis movement with a RULER or DIAL INDICATOR.
Put a pencil mark on your table, position the spindle directly over that mark.
ZERO the DRO at that point.
MDI G0 X6.
Take your tape measure, or yard stick and measure how far the axis actually moved.....
Title: Re: Mach3 Error when running G-code
Post by: Gordo on February 08, 2018, 08:11:56 PM
I did this and it moved about 9 1/4 inches.
Title: Re: Mach3 Error when running G-code
Post by: Gordo on February 08, 2018, 08:15:08 PM
I think it must be in the settings in Mach3
Title: Re: Mach3 Error when running G-code
Post by: Overloaded on February 08, 2018, 08:37:05 PM
YUP, there ya go.
That is the "Steps per Unit" setting in motor tuning. And yours is all wrong.
There is an excellent tutorial regarding it in the set-up manual.
Title: Re: Mach3 Error when running G-code
Post by: RICH on February 08, 2018, 09:50:06 PM
Gordo,

I back plotted the circular code from the code you posted. The program as posted runs fine here.
I have attached a picture of the gcode back plotted into CAD and it DOES NOT LIE!.

There are two things that I will candidly say:
1. Read the manual as this stuff is not plug and play.
   You must set the steps per unit correctly for each axis.
   CLick the Settings (Alt 6) tab an in the lower left corner you will see Axis Calibration. Click the Set Step per unit button.
   Follow the instructions by selecting an axis, how far you want to move, say 6", it will then ask you how far it actually
   moved, say it was 5" ( you ACTUALY measure the distance it moved and will also say that the move should be as long as
   possible) , Mach3 will then calculate the steps per unit that it should be. Do it more than once until it's right on.

2. The problem is the operator .......... not the software or the generated gcode. I don't know what you measured in some
    drawing,but, as shown it was not right. Do the above and listen to what folks are telling you and you'll be on your way in
    short order.   

BTW, Please read the manual as one of the first things one does is check their axis for calibration.

RICH


   
Title: Re: Mach3 Error when running G-code
Post by: TPS on February 09, 2018, 02:48:55 AM
just in case,
i attached the Manual.

chapter 5.5 and next is your friend.
Title: Re: Mach3 Error when running G-code
Post by: Gordo on February 09, 2018, 08:21:53 PM
Hi
I want to thank all of you for the help. Just to let you know that I am 72 years old and just build my first machine (Dave Gaton Sidewinder). I do Have the manual but did not understand the formulas to set the pulse rate. I have taken Rich's advice and know the machine is cutting the size that I was expecting.
Once again Thanks for your help and understanding.
Title: Re: Mach3 Error when running G-code
Post by: Overloaded on February 09, 2018, 08:35:59 PM
Congratulations Gordo on a job well done !
When you get that cool lion v-carved, please post a pic of it. I anticipate it being pretty awesome.

Kind regards,
Russ