Hello Guest it is April 19, 2024, 12:23:55 PM

Author Topic: Help with N-Code  (Read 4699 times)

0 Members and 1 Guest are viewing this topic.

Help with N-Code
« on: October 14, 2007, 04:52:03 AM »
Hi Guys,

I'm just started using FeatureCAM to generate some NC codes.
I tried running the code on MACH3 but I get the following error.
"Unknown word starting with cLine 54"

What are these N-Code
eg. N280PClamp01M98

Can I just manually delete them and run?
Anyway to stop FeatureCAM from putting these in my G-Codes.

Thanx


« Last Edit: October 15, 2007, 02:03:17 AM by JonnyD »

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Help with N-Code
« Reply #1 on: October 14, 2007, 06:35:16 AM »
The N code is the line number, the c word thats unknown is Pclamp01.
You could delete the pclampo1 and it should run ok as it sounds like the post processor you are using is set up to clamp a power chuck or drawbar etc.
You can edit that post processor to do what you want or make up a new post processor to suit Mach.
Is this a lathe or mill you have?
What post processor are you using?

Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Help with N-Code
« Reply #2 on: October 14, 2007, 06:44:08 AM »
Just had a look at the code you supplied, dont see the line N280PClamp01M98 , where are you getting that from?

Hood
Re: Help with N-Code
« Reply #3 on: October 14, 2007, 12:47:21 PM »
also if you put a (    before and ) after the note mach will not hang up. you can add notes to any program by use the ( )
Re: Help with N-Code
« Reply #4 on: October 15, 2007, 02:07:26 AM »
Guys, sorry for the goofed.  I included the "editted" NC file in the first post which is now corrected.

I talked to my instructor regarding the bad code (N280PClamp01M98)
He basically say that's it a sub-routine which somehow MACH3 doesn't understand.
So apparently I DO NEED these lines of codes.

I'm currently using a post-processor for Mach3Mill.

Thanx, for the help guys.
« Last Edit: October 15, 2007, 02:11:54 AM by JonnyD »

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Help with N-Code
« Reply #5 on: October 15, 2007, 02:56:53 AM »
I am not great on code but possibly you need the M98 before the PClamp, so try and put in N280M98PClamp01
If that works then you can edit your post processor to output the subroutine in that order. Also on your subroutines you seem to have for example :Clamp01, I think you need to replace the : with the letter O again if it works you can edit this into your post processor.
Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Help with N-Code
« Reply #6 on: October 15, 2007, 03:23:27 AM »
Just had a try myself, maybe you need to have your subrooutine named as a number, what I did was to call the subroutine with, for example N280M98P01(Clamp)   and the actual name of the subroutine was changed to O01(Clamp) etc
 I have attached the edited file, seems to be ok but as I said I am no expert with code so test with caution.
Hood
Re: Help with N-Code
« Reply #7 on: October 15, 2007, 06:58:07 AM »
(Clamp)  With NC code if you don't use the ( ) around the word clamp. Mach (all cnc controlls) read the C-as an axis,  L -# of repeats in a canned cycle, A- as an axis,  M- as an M code looking for a # to go with it, P- dwell time, so it get confused and locks up. The () are just like / block skip that are on all the time. But with / block skip you need to  turning on the switch at the controll to read the / block skip
« Last Edit: October 15, 2007, 07:09:21 AM by Lakeside design »
Re: Help with N-Code
« Reply #8 on: October 16, 2007, 06:18:12 PM »
Thanx guys,  for the help.

Hood your updated code works fine.

I found out it was a problem in the post that I used with FeatureCAM.  I've edited the macro section so now it spits out normal codes.