Hello Guest it is April 18, 2024, 09:05:12 PM

Author Topic: Can you Explain NC Code?  (Read 1081 times)

0 Members and 1 Guest are viewing this topic.

Offline kolias

*
  •  1,154 1,154
    • View Profile
Can you Explain NC Code?
« on: August 14, 2022, 04:31:57 AM »
When I tried to start my new cnc it stop at the last line shown below (N120 T2 M6). I deleted the line and then it started ok. Where did the M6 came from? Looking in my parameters I can’t find out where I ask for a tool change

(MATERIAL - WOOD INCH)
( T2 |  1/8 FLAT ENDMILL | H0 )
N100 G20
N110 G0 G17 G40 G49 G80 G90
N120 T2 M6

Then on the following line what the A0 means?
N130 G0 G90 G54 X.0625 Y-13.2 A0. S11000 M3

In the following lines it changes from G3 to G1. In my parameters I selected CW so I don’t understand why in the code I have CCW plus I have G43 (Apply tool Length Offset Plus) and didn’t ask for it either
N140 G43 H0 Z1.
N150 Z.2
N160 G1 Z-.0417 F1.03
N170 Y0. F30.
N180 G3 X0. Y.0625 I-.0625 J0.
N190 G1 X-9.6
N200 G3 X-9.6625 Y0. I0. J-.0625
N210 G1 Y-13.2

Thank you
Nicolas
Re: Can you Explain NC Code?
« Reply #1 on: August 14, 2022, 04:44:06 AM »
Was this code generated by a CAM program, and if so which one?

Offline kolias

*
  •  1,154 1,154
    • View Profile
Re: Can you Explain NC Code?
« Reply #2 on: August 14, 2022, 05:50:26 AM »
MastercamX5
Nicolas
Re: Can you Explain NC Code?
« Reply #3 on: August 14, 2022, 06:16:09 AM »
OK, I'm not familiar with that (I use CamBam) but it will probably be to do with the config options.

Offline kolias

*
  •  1,154 1,154
    • View Profile
Re: Can you Explain NC Code?
« Reply #4 on: August 14, 2022, 10:50:06 AM »
Thank you John, since I don’t use mastercam often I’m not very familiar with the settings but a few years back I did the same cut like the one I have now and I have the NC code from that cut shown below partially. I was thinking it will be easier to edit my current NC code and replace all the G3 with G02. Then I will do a dry run or use Mach3, with the cnc turned OFF and watch the results in the screen.


(NWDTOOL N" 1/8 FLAT ENDMILL" T232 D.125 F.375 L2.25 CD2. CL1. SD2. C0)
(NWDSTOCK X9. Y12. Z.625 OTC OX4.5 OY6. OZ0.)
N10 G00 G17 G20 G40 G49 G80 G90
N20 T232 M06 ( 1/8 FLAT ENDMILL)
N30 (MAX - Z1.)
N40 (MIN - Z-.0625)
N50 G00 Z1. M08
N60 G00 X-.529 Y-.5244 S2000 M03
N70 Z.5
N80 G01 Z-.0313 F6.16
N90 Y-11.5244 F65.
N100 G02 X-.5915 Y-11.5869 I-.0625 J0.
N110 G01 X-8.5915
N120 G02 X-8.654 Y-11.5244 I0. J.0625
N130 G01 Y-.5244
N140 G02 X-8.5915 Y-.4619 I.0625 J0.
N150 G01 X-.5915
N160 G02 X-.529 Y-.5244 I0. J-.0625
N170 G01 Z-.0625 F6.16
N180 Y-11.5244 F65.
N190 G02 X-.5915 Y-11.5869 I-.0625 J0.
N200 G01 X-8.5915
N210 G02 X-8.654 Y-11.5244 I0. J.0625
N220 G01 Y-.5244
N230 G02 X-8.5915 Y-.4619 I.0625 J0.
N240 G01 X-.5915
N250 G02 X-.529 Y-.5244 I0. J-.0625
N260 G01 Z.5 F6.16
N270 G00 Z1.
N280 X-4.8649 Y-.9426
N290 Z.5
Nicolas
Re: Can you Explain NC Code?
« Reply #5 on: August 14, 2022, 08:20:47 PM »
Hi,
the early M6 is quite common. The machine is being set up to do the job, so the CAM program calls for the tool to be used. The fact that it may already be in the machine
and therefore no M6 is actually required is completely unknown to the CAM program, so it calls for an M6 to ensure that the right tool is used. Likewise it will call a G43
for the tool, after all the tool length offset is an important parameter, that you have arranged it so the tool offset is not required is again unknown to the CAM program.

As far as the G3 moves, use MasterCAM to simulate the toolpath, is the toolpath correct? The rule is to use the CAM program to simulate the toolpath rather than doing a dry run on the
machine. That absolutely requires that the CAM program have a perfectly accurate description of your machines motion characteristics, things like axis orientations etc.
MasterCAM has an excellent, albeit difficult to use, machine description module. It will take many hours to learn to understand the machine description module but is essential if you want to
produce sensible code without you coming along and editing it.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Can you Explain NC Code?
« Reply #6 on: August 15, 2022, 03:24:26 PM »
Hi,
OR use MasterCAM properly.

MasterCAM is by far and away better than CAMBAM or any other Johnny-come-lately CAM program having
been in continuous development since the eighties. The only other CAM program that comes close is HSMWorks.
Both of these programs cost over $20,000 plus annual fees.

If I could afford either I would have them....fullstop. Sure they have a huge learning curve, but that's what you get with the most
comprehensive CAM programs on the planet.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline kolias

*
  •  1,154 1,154
    • View Profile
Re: Can you Explain NC Code?
« Reply #7 on: August 15, 2022, 06:31:15 PM »
CamBam? Thanks but I have no interest in a new learning curve and although it may be much better/easier than MC still will need time to learn even the basics. I’m retired and my interest is only building cnc’s in aluminum as a hobby and after finish one sell it to get back at least my cost! It takes me about 2 years to get one done/sell with other projects in between. The only unpleasant work I have to do in making a cnc is the darn software which I need to make a simple geometric shape, produce the code and do a cut to assure the cnc is good to go.

However today I thought something new. I always kept all the NC/gCode/tap files for all of my cuts and so I thought why I don’t use these old files. I picked one and loaded into Mach3 and voila I have the same object on the screen. I run the code and Mach3 finished the code with no problem and the code doesn’t have the extra G3 lines which makes the code much faster to run. Tomorrow I will do the dry run on the cnc and after the actual cut and IF successful I will post a link of the video.

Thanks Craig for taking the time, I always use MC to simulate the toolpath and always the simulation completes successfully but I also do a dry cut to assure there is no problem, an additional step for safety. The recent problem with the NC code was because if I compare the NC code I did 10 years back for the same object is very different and much longer and I was just wondering why. But now as per above, I may never need to touch MC again and that will make me very happy.

I also agree that MC ranks at the top. Not that I know much about Cam software but from discussions and reading the web/forums it looks like MC is at the top and as I mentioned before I only have access to MC, I could not afford either to own one!

Nicolas
Nicolas
Re: Can you Explain NC Code?
« Reply #8 on: August 15, 2022, 06:57:23 PM »
Hi,

Quote
Thanks but I have no interest in a new learning curve and although it may be much better/easier than MC still will need time to learn even the basics.

If you have MasterCAM then stick with it. Its hard to learn and will take ages to get the best from it but along with HSMWorks its the best CAM program out there....fullstop.
Any and all effort to get familiar with MasterCAM will be very amply rewarded.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'