Machsupport Forum

Mach Discussion => FAQs => Topic started by: jroberson on June 15, 2016, 02:20:00 PM

Title: Sample gcode need larger scale
Post by: jroberson on June 15, 2016, 02:20:00 PM
FROM ANOTHER NOVICE

I an trying to run a sample gcode for the first time, after just setting up a XJ6090 cnc router from Salecnc, with Mach3.  It produced a miniture model, so how do I change scale to correct size?
Title: Re: Sample gcode need larger scale
Post by: garyhlucas on June 15, 2016, 09:24:07 PM
You say miniature, like maybe the G code was written in inch units and your machine is set up in mm? There is a g-code to select units, look it up in g-code list.  Is it only a little bit smaller?  Check whether your stepper drivers are set for micro stepping and that steps per unit of travel matches in Mach 3
Title: Re: Sample gcode need larger scale
Post by: jroberson on June 15, 2016, 09:50:12 PM
Thanks for the reply.  This was the famous Roadrunner sample gcode in Mach3, produced about a 1/4" figure.  I am setup in mm, so could be unit selection.  How would I check stepper drivers for micro stepping?  Steps per travel are good.
Title: Re: Sample gcode need larger scale
Post by: jroberson on June 15, 2016, 11:09:26 PM
MM is G21.  Can this be added to sample gcode anywhere before coordinates begin?  I dont know anything about writing gcode....
Title: Re: Sample gcode need larger scale
Post by: Tweakie.CNC on June 16, 2016, 01:48:12 AM
The roadrunner Gcode file was compiled for a machine set-up in imperial (Inch) units.

If you add the code G20 to the beginning of the roadrunner Gcode file Mach3 (which you have set-up in mm units) will perform the conversion and your machine will reproduce the work to the intended dimensions.

Tweakie.
Title: Re: Sample gcode need larger scale/ To Tweakie
Post by: jroberson on June 16, 2016, 07:57:05 AM
Tweakie,  Is it converting the gcode or my machine setup?   So, when I want to work in inches, (my machine came from the factory in mm}, where and when do I change settings?

I was expecting to get a boxed license for Mach3 from the factory, but did not.  They sent me a file ( NCUsb.Pod }, driver to install in Mach3 folder.  I had already downloaded your demo version to practice on and loaded my factory parameters.
I have a Mach3 USB motion controller MKX-IV, and I'm running Windows 10 on a new HP All in One.  After I make sure my machine works satisfactory, I'll order the license. I hope this is Kosher.
Title: Re: Sample gcode need larger scale
Post by: Tweakie.CNC on June 16, 2016, 08:18:01 AM
Your Mach3 set-up is just fine left as it is in mm.

If a Gcode file has been compiled in mm units then it should have a G21 at the start of the code.
If a Gcode file has been compiled in inch units then it should have a G20 at the start of the code.

Your machine set-up will not be changed by the G21 / G20 it is just the Gcode units that are converted during the program run. Unfortunately the roadrunner file was compiled in inches but they forgot to include the G20 (probable done just to fool us all  :) ).

More details regarding this are in the Mach3 Manual http://www.machsupport.com/help-learning/product-manuals/

Once you are satisfied that Mach3 works to your expectations then order the license, it is perfectly in order to continue using Mach3 in demo mode for as long as you wish.

Tweakie.
Title: Re: Sample gcode need larger scale
Post by: jroberson on June 16, 2016, 08:49:49 AM
MUCH APPRECIATED.  I have been reading the manual till my eyes are crossed.... I still have a problem when I home machine, it hits home switch and stops.  It does not back off.  I thought that Home Offsets did that, and had set at 5mm?
When I homed, I noticed the Machine Coord. reading 5mm , I think on all axis?
Title: Re: Sample gcode need larger scale
Post by: Highspeed1964 on July 23, 2016, 07:16:12 PM
Hey JR,

Just came across this post.  I know it's a bit older than the other one we've been discussing, but I'll take a crack at this one too if it's still an issue for you.

The homing routine _should_ run the axis at a relatively slow rate until the switch is contacted, then back off a _slight_ amount until the switch is no longer active.  Setting the Home Offsets only updates the DROs to the offset value as I understand it.  It does not actually move the axis that amount.  I'd have to play with this to confirm, though.  But my machine also uses combined limit/homing switches (a limit switch at each end wired to the same input and configured for the same pin on all three inputs in the Config/Port & Pins screen on the Inputs tab) so it may behave differently if you have a separate home switch wired to a different pin than the limit switches.

Let me know.

Stephen "Highspeed" Kruse
Title: Re: Sample gcode need larger scale
Post by: jroberson on July 24, 2016, 04:43:21 PM
Highspeed,

I ran across the page under config. plungins, and remembered you said your maching had combined limit / homing switches.  Under Options single was checked, but
there was a dual setting, so I switched it and Low and Behold, when I rehomed it backed off the home switch, like it was suppossed to do....

Thanks Again,
JR
Title: Re: Sample gcode need larger scale
Post by: Highspeed1964 on July 24, 2016, 05:53:03 PM
Awesome! Glad you got that sorted out.  Glad to help.

Highspeed
Title: Re: Sample gcode need larger scale
Post by: t2krookie on December 23, 2016, 01:18:43 AM
Umm I'm a complete Newb but after much fiddling with the sample G-CODES, I noticed they actually were in a compressed format. I unzipped them and then they were no longer Tap files but NC files. I ran the NC files and my problem of micro results was fixed. I don't pretend to know why, but it works. Aparently TAP files are compressed files. Unziping them outputs a "nc" file. Simple as that. Now the results are normal scale.

Title: Re: Sample gcode need larger scale
Post by: Tweakie.CNC on December 23, 2016, 01:52:29 AM
Umm I'm a complete Newb but after much fiddling with the sample G-CODES, I noticed they actually were in a compressed format. I unzipped them and then they were no longer Tap files but NC files. I ran the NC files and my problem of micro results was fixed. I don't pretend to know why, but it works. Aparently TAP files are compressed files. Unziping them outputs a "nc" file. Simple as that. Now the results are normal scale.



Where can I find the compressed Tap files please ?

Tweakie.
Title: Re: Sample gcode need larger scale
Post by: t2krookie on December 23, 2016, 02:02:09 AM
The sample codes are in compressed format and have the ending"tap". If you use a decompression program like "7zip", you can extract the files into non-compressd format and simply select the uncompressed file when u tell Mach to load a file. The guy who answers first in this thread posed a zip file with the sample codes in it.
Title: Re: Sample gcode need larger scale
Post by: Tweakie.CNC on December 23, 2016, 02:19:31 AM
Quote
The guy who answers first in this thread posed a zip file with the sample codes in it.

Where exactly is the zip file ?

Tweakie.
Title: Re: Sample gcode need larger scale
Post by: t2krookie on December 23, 2016, 04:33:56 AM
http://www.machsupport.com/forum/index.php/topic,18345.0.html

Thats the thread that has the sample code.
Title: Re: Sample gcode need larger scale
Post by: Tweakie.CNC on December 23, 2016, 05:33:15 AM
Many thanks for posting the link.

Those sample files are in a compressed format (.rar) and as you have said will require software such as 7-Zip to extract the archive.

Although some of those files have .TAP, .tap and some have .nc file extensions they are all Text files just the same. When loading Gcode files into Mach3 you have the option to select the particular file extension (.tap, .nc, .ncc, .txt) or, if you prefer just select All Files(*.*).

The individual .tap files within the archive are not, in themselves, compressed so once the .rar archive has been opened / extracted no further decompression of the files is necessary.

Tweakie.
Title: Re: Sample gcode need larger scale
Post by: t2krookie on December 23, 2016, 02:22:26 PM
Thats wierd. I just tried again in the original folder. I must have actually delved into a zip file folder. Whatever the cause, the resulting file seems to oppersate correctly were the tap file would output a much smaller result. Mach can then I assume read compressed files? Perhaps imperfectly. Go figure. Moving axis manually and calibration of steps went flawlessly so I'm pretty sure it was the code itself that was the cause. Perhaps I was missing something.
 
Title: Re: Sample gcode need larger scale
Post by: Tweakie.CNC on December 24, 2016, 02:01:44 AM
The issue my be that some Gcode has been prepared in Imperial units and some Gcode in Metric units and they do not contain the G20 / G21 as appropriate (this is the case with the sample Roadrunner file which was prepared in Inches but does not contain a G20 so the work comes out incredibly small on systems which have been configured in millimeters).

Tweakie.