Generated G-code Issue/ Mach3

Discussions around the CAM Add-On of QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Indicate the post processor used.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
User avatar
Dreamaker
Full Member
Posts: 96
Joined: Thu Jul 13, 2017 4:38 pm

Generated G-code Issue/ Mach3

Post by Dreamaker » Wed Oct 04, 2017 4:56 pm

I am having an issue with the Mach3 recognizing the G-code generated by QCad/Cam. In Mach3 on the screen when at 0.0.0 and regenerated, there is no image on the screen. The program will not execute and sits idle. This is just an exercise; it is a box bottom cutting pockets at different levels, using multiple tools in manual mode. I am enclosing the G-code I tried to execute.
My system is Pentium4, Win7, using for G-code generating QCad/Cam, w/ a Chinese 3040 4 axis CNC router w/800 watt spindle.
Attachments
BoxBottom3.nc
(34.56 KiB) Downloaded 717 times

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: Generated G-code Issue/ Mach3

Post by andrew » Wed Oct 04, 2017 5:08 pm

I can't spot any obvious errors in the G-Code.

Here's how I would recommend to proceed:

Try running this minimalistic G-Code program:

Code: Select all

N10 G0 Z10
If that does not work, there's something completely different wrong and your problem is unrelated to G-Code or QCAD/CAM.

If it does work, and does what it's supposed to do (i.e. move to Z10), add more code and check if that works:

Code: Select all

N10 G21 G17 G90 G40 G49 G80
N20 G0 Z10
Again, if it works, add more code and check if that works:

Code: Select all

N10 G21 G17 G90 G40 G49 G80
N20 G71 G91.1
N30 G28
N40 T2 M6 G43 H2
N50 S992 M03
N60 G0 Z10
If there is indeed a problem with the generated G-Code, you should be able to pinpoint the problem using this methodical approach.

User avatar
Dreamaker
Full Member
Posts: 96
Joined: Thu Jul 13, 2017 4:38 pm

Re: Generated G-code Issue/ Mach3

Post by Dreamaker » Wed Oct 04, 2017 8:55 pm

The "N10 G0 Z10" worked, so I will play around with adding the other G-code.

Thank You!!

User avatar
Dreamaker
Full Member
Posts: 96
Joined: Thu Jul 13, 2017 4:38 pm

Re: Generated G-code Issue/ Mach3

Post by Dreamaker » Fri Oct 06, 2017 12:42 am

I have an other issue down the road in the original G-code. This is one segment of the BoxBottom, I ran the G-code program it worked good till it came to this point. It stalled at line N120. I tried to execute an other line beyond N120 and it will go to N20 and not move. Of course this was created in QCad/Cam. If I runthis in the QCad/Cam simulation it will run through the sequence fine, if I run it in Mach3 it stalls at N120.
Attachments
BoxBottom6.nc
(14.26 KiB) Downloaded 689 times

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: Generated G-code Issue/ Mach3

Post by andrew » Fri Oct 06, 2017 2:38 pm

I cannot spot any obvious problems with the G-Code. N120 is obviously where the first arc gets processed. The coordinates seems to be fine. One potential problem could be if your tool radius is 2.5 or larger. The radius correction would probably fail in that case since the inner offset of an arc with radius 2.5 would be an arc with a negative radius.

User avatar
Dreamaker
Full Member
Posts: 96
Joined: Thu Jul 13, 2017 4:38 pm

Re: Generated G-code Issue/ Mach3

Post by Dreamaker » Fri Oct 06, 2017 6:25 pm

I think I figured it out. The issue was with the arc, the tool radius needs do be less than the arc radius. The tool was off by 0.185 mm or .007 of an inch. I tweaked it and it seem to work. That is slightly larger that the thickness of a human hair. That would run in the QCad/Cam simulation, but would not run in the Mach 3, the Mach 3 is pretty tight.

User avatar
Dreamaker
Full Member
Posts: 96
Joined: Thu Jul 13, 2017 4:38 pm

Re: Generated G-code Issue/ Mach3

Post by Dreamaker » Sat Oct 07, 2017 8:12 pm

I have an additional question. I ran this an a piece of Lexan, everything ran fine till it came to around line N3540 or N3550. It did the last cut and it was going to do another tool change, the Z2 then it Z10 and then it G28 (return to home) before it move in the X/Y the Z went down Aprox. 10 mm below Z0 then went to home gouging the Lexan. Just running with out material, I ran the G-code a few time and it did the same thing. I edited N3550 and deleted G28 and I could run the code without issue, it just went to Z10 position and not to Home. Which was a good work around to the issue. I added a picture to give you a rough idea and the G-code. I have no Idea what could have caused it.
Attachments
BoxBottom4B.nc
(10.9 KiB) Downloaded 694 times
P1010003.JPG
P1010003.JPG (54.25 KiB) Viewed 19088 times

User avatar
Dreamaker
Full Member
Posts: 96
Joined: Thu Jul 13, 2017 4:38 pm

Re: Generated G-code Issue/ Mach3

Post by Dreamaker » Mon Oct 09, 2017 1:03 am

I am lost, thought it may have been generated in QCad/Cam, but I doubt it. I have a Gremlin in my system that pops up and disappears. I did the full version of that G-code and had no issues and worked perfectly. When I first executed the G-code the spindle went up beyond its limit, I stopped it and started over and it worked with fine. It is like the system get confused and goes rouge. But I got the box done and fits good. It is only an exercise doing pocketing with multi layers, with inside profiling. I used Chinese/ single flute end mills got from EBay, for the acrylic. This is my results. So I guess I will contact Mach3 people to see if they have any ideas!
Attachments
P1010007.JPG
P1010007.JPG (58.37 KiB) Viewed 19080 times
P1010006.JPG
P1010006.JPG (60.4 KiB) Viewed 19080 times
P1010005.JPG
P1010005.JPG (58.62 KiB) Viewed 19080 times

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Generated G-code Issue/ Mach3

Post by Husky » Mon Oct 09, 2017 2:29 am

Dreamaker wrote:I have a Gremlin in my system that pops up and disappears
Dreamaker wrote:It is like the system get confused and goes rouge.
Your description sounds like a static charge problem. Static charge can and will make your machine acts like a Leprechaun ....!

You are milling some sort of plastic. Is your cnc machine proper grounded? Charge balancing also guaranteed? Make sure everything is balanced and grounded before you start to look for other causes ...
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

User avatar
Dreamaker
Full Member
Posts: 96
Joined: Thu Jul 13, 2017 4:38 pm

Re: Generated G-code Issue/ Mach3

Post by Dreamaker » Mon Oct 09, 2017 3:46 pm

I don't know if it is related, you mentioning Static Charge. But when the chips fly, which I have containment enclosure, the chips are sticking on the sides, which we call static cling, just like clothes. I guess cutting the Lexan causes static. Maybe not just grounding the electronics but grounding the frame would be a good idea. May be it is not related to the issue. I'll have to make sure the computer has good ground as well as the CNC router does.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Generated G-code Issue/ Mach3

Post by Husky » Mon Oct 09, 2017 7:31 pm

Dreamaker wrote:I guess cutting the Lexan causes static.
Yes, that could be the reason for your problem ...
http://www.wikiwand.com/en/Static_electricity
Dreamaker wrote:... grounding the frame would be a good idea.
That's a very good idea ...
Make sure that you also have a permanent discharge wire between the Portal and the frame (for electrical balance). Then ground the frame and you should be ready to go.

BTW: This static electrical charging / discharging problem can also permanently ruin the surface at your rails, leadscrews and leadnuts at the portal movement.
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

User avatar
Dreamaker
Full Member
Posts: 96
Joined: Thu Jul 13, 2017 4:38 pm

Re: Generated G-code Issue/ Mach3

Post by Dreamaker » Fri Oct 13, 2017 12:37 pm

Well had a mishap, before I put ground leads on everything. Was doing a box top and after it finished a cut, it moved to the next location. It was supposed to just go about a half a millimeter but kept going down in to the router table. So I put ground wires on the router and controller box and made sure, even the computer had good and proper ground. So far everything seems to be working OK. Hopefully that was the problem, have to figure out a panic stop button, the computer mouse not quick enough and the emergency stop on the controller box is useless.

User avatar
Dreamaker
Full Member
Posts: 96
Joined: Thu Jul 13, 2017 4:38 pm

Re: Generated G-code Issue/ Mach3

Post by Dreamaker » Tue Oct 17, 2017 4:52 pm

Don't quote me on this, but maybe the Gremlins may be gone! Still a little nervous when I am playing with it!

User avatar
Dreamaker
Full Member
Posts: 96
Joined: Thu Jul 13, 2017 4:38 pm

Re: Generated G-code Issue/ Mach3

Post by Dreamaker » Sat Nov 25, 2017 7:22 pm

It's been a while, and have had no issues since I hooked up the ground/earth wires to the router/ controller/computer.

Thanks for all your help!!

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Generated G-code Issue/ Mach3

Post by Husky » Sat Nov 25, 2017 8:15 pm

You're welcome! :)
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

Post Reply

Return to “QCAD/CAM”