Machsupport Forum
G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: jbaumchen on January 24, 2019, 09:37:37 PM
-
I created a foil pattern for an electronic circuit in Eagle, sent the gerber file to copper cam on line, and received the attached g-code. When I loaded it up in Mach 3, get the error of bad character used and can see it in my Mach 3 code window. But when I open it in note pad, hippo edit, or multi-edit, am at a loss to display them. If I delete a line of comment, reload it into Mach 3, it just shows up on the first line. Any ideas what the problem is? I've attached the gcode file and a screen capture of the Mach 3 window.
-
Hi John,
This has come up before but it was a long while ago and I have not yet been able to find the relevant threads. At this stage I have absolutely no idea how the odd characters have got into your Notepad document and why they cannot be edited out.
They can however, be removed by copy and pasting the Gcode text into a new text document then saving it as a .nc file. I have attached a modified file for you to try (you may need to adjust your tool number).
Tweakie.
-
Hi,
I created a foil pattern for an electronic circuit in Eagle, sent the gerber file to copper cam on line, and received the attached g-code
Why bother? I use Eagle to make circuit boards but use the U(ser) L(anguage) P(program) pcb-gcode and it generates
Gcode directly and I have used it in both Mach3 and Mach4 without problem.
Craig
-
Hi John,
Well, after a bit more research, it appears that Microsoft allows us to save our files in many different formats and languages etc. and Mach3 only likes single-byte ASCII characters (thanks Roger) so my guess is that CopperCam are using an unsupported character set (as far as Mach3 is concerned). Perhaps have a chat to CopperCam and see what they have to say.
Tweakie.
-
Hi,
or use pcb-gcode, a freely downloadable utility that attaches to Eagle and generates Gcode direct from your .brd file,
no sending files anywhere.....the gcode is generated within 10 seconds or so and is (or can be) Mach3/Mach4 ready.
It generates, at your option, Top Etch, Top Drill, Top Mill, Bottom Etch, Bottom Drill, and Bottom Mill. You can set etch, drill
and mill depths at will.
Craig
-
Thanks all for your help. I think I'll try the PCB-Gcode as it seems the most logical choice. Cheers!
-
Hi,
http://eagle.autodesk.com/eagle/ulp?utf8=%E2%9C%93&q%5Btitle_or_author_or_description_cont%5D=pcb-gcode&button= (http://eagle.autodesk.com/eagle/ulp?utf8=%E2%9C%93&q%5Btitle_or_author_or_description_cont%5D=pcb-gcode&button=)
As I recall I downloaded and extracted to a folder in MyDownloads. I seem to recall it was necessary to inform Eagle of the path to
that folder.
To generate Gcode at the Eagle command line type 'run pcb-gcode'<enter>.
To enter the setup type 'run pcb-gcode-setup'<enter>.
Craig
-
Hi,
with Eagle open Options/Directories and update the path to the pcg-gcode folder.
Craig
-
Hey Craig,
I noted that the PCB-Gcode for Eagle was tested on Version 5.1. I'm using Eagle 9.3 and installed the PCB-Gcode files in my Eagle directory. It always opens the configuration app but doesn't give a list of gcode programs to select from. I've tried finding Eagle V5.1 but the earliest version I can find for download is Eagle 6.6. If PCD-Gcode is supposed to work with V9.3, do you happen to have a link for it?
-
Hi,
I have Eagle 6.6 and it works. I have heard that it works with Eagle 7 also but I can't personally confirm that.
Note there is an active pcb-gcode forum (Google Groups), if you are starting out with pcb-gcode it is recommended.
Craig
-
I created a foil pattern for an electronic circuit in Eagle, sent the gerber file to copper cam on line, and received the attached g-code. When I loaded it up in Mach 3, get the error of bad character used and can see it in my Mach 3 code window. But when I open it in note pad, hippo edit, or multi-edit, am at a loss to display them. If I delete a line of comment, reload it into Mach 3, it just shows up on the first line. Any ideas what the problem is? I've attached the gcode file and a screen capture of the Mach 3 window.
This is what I found the problem could be, along with a solution:
- The bad block of code at the start of the file is the following symbols: , which have the following Alt codes: 0239 0187 0191
- These alt codes are also the symbol's decimal representation. In hex, they are: EF BB BF
- Doing some internet searches shows that this string of code is the 'byte order mark' (BOM) for UTF-8 encoded files. (see https://en.wikipedia.org/wiki/Byte_order_mark (https://en.wikipedia.org/wiki/Byte_order_mark))
- So apparently you are editing and saving a UTF-8 type file, whereas Mach3 is reading it as an ANSI type file.
- I don't know tons about this, but in summary Mach3 interprets the UTF-8 BOM as the 3 symbols () because it is reading in ANSI. The problem, I think, is on the Mach3 end because it would have no error if it could read higher-level encoded files and thus recognize the BOM.
- To fix this, make sure the type of file you are using in Mach3 is an ANSI file, not another encoding option.
- You can save the file as an ANSI-type file in Notepad (File>>Save As>>select ANSI file type).
Hope this helps someone in the future.