Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Inserting custom manual NC

vilts
Advocate

Inserting custom manual NC

vilts
Advocate
Advocate

Hello,

 

How can I add custom manual NC code?

 

Say I want to add "G64 P0.015" before and "G64" after one particular op. I tried all sorts of things with "Manual NC" using Action, but none of that seemed to work. All other Manual NC options are for specific things, which doesn't seem to suit either.

 

So far I made the changes by adding two dwell cycles and later did global replace for them with the G64 codes I wanted. But that's manual and error-prone work...

 

On the same line - how can I add or change G-code preamble? Again, let's say I want to add that "G64 P0.015" to all my files. Is it possbile only by editing the post processor?

 

0 Likes
Reply
Accepted solutions (1)
1,644 Views
8 Replies
Replies (8)

Anonymous
Not applicable

Just did a quickt test of this here.  There may be a better way to do this, but if you edit your post to add:

 

function onParameter(what, value) {
   if (what == "action")
   {
     writeln("");
     writeComment("Manual Operation");
     writeBlock(value);
   }
}

This will just take whatever you put in for the Action (in this case "G64 P0.015") and output it as a block of code.

Tested using the generic fanuc turning post

 

-- Make sure your post doesn't already have an onParameter() function first though.  Don't want to replace one that is already there.  If there is one, it can be modified to add this check for "Action".

 

Dave

 

1 Like

Anonymous
Not applicable
Accepted solution

Actually, looks like maybe a better way is just to add the onPassThrough() function like this:

 

function onPassThrough(value) {
   writeln("");
   writeComment("Manual Operation");
   writeBlock(value);
}

Though either way would work.  Looks like onPassThrough() is only called when you specify a Manual Pass Through operation.

 

Dave

1 Like

jeff.walters
Advisor
Advisor

you may need your post tweaked as well. if you do please go to the Autodesk CAM forum Post section and our post team will be happy to help

 

https://camforum.autodesk.com/index.php?board=3.0

Jeff Walters
Senior Support Engineer, CAM
0 Likes

vilts
Advocate
Advocate

Very cool. That onPassThrough did the trick, thank you!

 

 

0 Likes

Anonymous
Not applicable

Just wanted to come back and add this information in case someone finds this thread.

 

The following code allows the pass through to accept multiple lines.

 

function onPassThrough( text ) {
    var lines = String( text ).split( ";" );

    for ( var i in lines )  {
        writeln( lines[ i ] );
    }

Dave

 

0 Likes

Anonymous
Not applicable

When I go to this forum link the screen is blank... I am looking to have some similar stuff fixed that is not working in the Fadal Post Processor.  Could someone help me?

 

0 Likes

Steinwerks
Mentor
Mentor

@r_wunderlich wrote:

When I go to this forum link the screen is blank... I am looking to have some similar stuff fixed that is not working in the Fadal Post Processor.  Could someone help me?

 


It's just part of the normal Autodesk Forums now: http://forums.autodesk.com/t5/post-processors/bd-p/218

Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
0 Likes

Anonymous
Not applicable

Thank you!! This works perfectly with the Tormach Slant Pro Post.  I'm using it to insert "Y" values for gang tooling in Rapid Turn mode.  

 

The "pass-thru" version produced and error in Pathpilot...

 

 

- Erik

0 Likes