Hello Guest it is April 20, 2024, 01:02:55 AM

Author Topic: G-Code bad character used  (Read 6784 times)

0 Members and 1 Guest are viewing this topic.

G-Code bad character used
« 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.

Offline Tweakie.CNC

*
  • *
  •  9,198 9,198
  • Super Kitty
    • View Profile
Re: G-Code bad character used
« Reply #1 on: January 25, 2019, 02:21:25 AM »
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.
PEACE
Re: G-Code bad character used
« Reply #2 on: January 25, 2019, 02:31:16 AM »
Hi,

Quote
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
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline Tweakie.CNC

*
  • *
  •  9,198 9,198
  • Super Kitty
    • View Profile
Re: G-Code bad character used
« Reply #3 on: January 25, 2019, 02:36:37 AM »
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.
PEACE
Re: G-Code bad character used
« Reply #4 on: January 25, 2019, 01:53:35 PM »
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
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: G-Code bad character used
« Reply #5 on: January 26, 2019, 03:29:18 PM »
Thanks all for your help. I think I'll try the PCB-Gcode as it seems the most logical choice. Cheers!
Re: G-Code bad character used
« Reply #6 on: January 26, 2019, 03:57:09 PM »
Hi,

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
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: G-Code bad character used
« Reply #7 on: January 26, 2019, 04:13:17 PM »
Hi,
with Eagle open Options/Directories and update the path to the pcg-gcode folder.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: G-Code bad character used
« Reply #8 on: January 27, 2019, 01:20:41 PM »
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?
Re: G-Code bad character used
« Reply #9 on: January 28, 2019, 12:24:33 AM »
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 enjoy sex at 73.....I live at 71 so its not too far to walk.'