Add setup notes to post processor as program notes also

Add setup notes to post processor as program notes also

Anonymous
Not applicable
2,953 Views
13 Replies
Message 1 of 14

Add setup notes to post processor as program notes also

Anonymous
Not applicable

This might be the wrong section to ask, but it pertains to the manufacturing workspace as well so I figured it was worth posting. 

 

When I do setups I right click and press edit notes. I write notes pertanent to setting up the job that print at the top of my setup sheet.  As of now, I also copy these notes and use a manual NC comment to add them to the program too. Our guys sometimes re-run a program saved on the machine and these notes can be a life saver when it comes to remembering how to set up the tools without having to go on the server (that they dont have access to at the machine). 

 

I would love to edit my post processor to just post these as comments without having to manually add them every time and I am sure there is a simple way to do it. Anyone care to enlighten me?

0 Likes
Accepted solutions (1)
2,954 Views
13 Replies
Replies (13)
Message 2 of 14

boopathi.sivakumar
Autodesk
Autodesk
Accepted solution

@Anonymous 

its just a simple edit

Edit the post processor file and look for this line 

// dump machine configuration

 Its common line for any post i hope it should work

you will see codes like this

// dump machine configuration
  var vendor = machineConfiguration.getVendor();
  var model = machineConfiguration.getModel();
  var description = machineConfiguration.getDescription();

and add the codes in red above to this code, final code will be like this

  var notes = getGlobalParameter("job-notes");
  writeComment("SETUP NOTES - "+ notes);
  
  // dump machine configuration
  var vendor = machineConfiguration.getVendor();
  var model = machineConfiguration.getModel();
  var description = machineConfiguration.getDescription();

This code will post the setup comment in top of the code below the program number you can modify the location by simply changing writeComment codes to where ever you want.

 

 

 


Boopathi Sivakumar
Senior Technology Consultant

Message 3 of 14

Anonymous
Not applicable

Ok, that worked great.  Now maybe I am nitpicking, but can we somehow have this post on multiple lines for readability instead of one continuous line?

 

When I type notes like 

.250 MIN STICKOUT ABOVE VICE JAWS

X ZERO LEFT OF STOCK

Y ZERO FIXED JAW

Z ZERO TOP OF STOCK

 

It posts out as 

.250 MIN STICKOUT ABOVE VICE JAWSX ZERO LEFT OF STOCKY ZERO FIXED JAWZ ZERO TOP OF STOCK

 

Up to this point I have been creating 3-4 separate comments at the cost of extra time up front but it reads out with line breaks nicer.. I can make it procedure just add spaces after each line to break it up, but if I could get a line break/ carriage return somehow that would be great too!

 

In any case I am way ahead of where I was yesterday, so thank you for that!

 

Message 4 of 14

SMI-CAD2
Contributor
Contributor

Hello

 

Were you ever able to get it to post out on separate lines?

Thanks

 

 

0 Likes
Message 5 of 14

cmleschak
Contributor
Contributor

Yes, we got this to work.  I will post up the code later, I don’t have my computer at home to look it up right now

Message 6 of 14

boopathi.sivakumar
Autodesk
Autodesk

@SMI-CAD2 

you could add this code in the onopen section to get the notes and also it will split the lines as you expected

  if (hasGlobalParameter("job-notes")) {
    var notes = getGlobalParameter("job-notes"); 
    if (notes) { 
      var lines = String(notes).split("\n"); 
      for (line in lines) { 
        var comment = lines[line].replace(/^\s+|\s+$/gm,''); 
        if (comment) { 
          writeComment(comment);
        }
      }
    }
  }

 

 


Boopathi Sivakumar
Senior Technology Consultant

Message 7 of 14

kcameronLCNFA
Participant
Participant

Has this worked for any one?  Is this good for a HAAS pre-NGC system (2005) ?  I have a limit of 80 characters per line.  I'd like the comment to continue in next block after 80 characters.

 

Thank you.

0 Likes
Message 8 of 14

kcameronLCNFA
Participant
Participant

I tried the edits suggested , but it failed to post. Any help would be appreciated.  Thanks in advance.

0 Likes
Message 9 of 14

dames123
Advocate
Advocate

Is there a way to add this same thing to an Excel setup sheet?

0 Likes
Message 10 of 14

Tomas_V_cz
Advocate
Advocate

I'm also figuring out how to get some information into the program and this is a pretty good option. It would be even better if some information were global to multiple settings. It worked like this in HSMWorks, but here in Fusion there is no option. Could some information (like in HSMWorks) be used globally?

 

if (hasGlobalParameter("solidworks:custom:Material")) {
writeStructureComment(localize("material:") + getGlobalParameter("solidworks:custom:Material"));
} else {
writeStructureComment("material:");
}
if (hasGlobalParameter("solidworks:custom:Zmena")) {
writeStructureComment(localize("zmena:") + getGlobalParameter("solidworks:custom:Zmena"));
} else {

 

ATTENTION - this code does not work in Fusion...

0 Likes
Message 11 of 14

reeltime273
Participant
Participant

Hello All,

 

I also would like to add the setup notes to my post, I have tried the above suggestions, either the post has failed or it doesn't output any notes at all.  I would like to add the notes right below the time stamp that I currently added to my post header.  Has everyone been able to accomplish this task of adding notes?  I currently utilize the generic Mach3 Mill Post that I downloaded from Fusion 360.

 

Any thoughts?

 

Thanks, Mark 

0 Likes
Message 12 of 14

Tomas_V_cz
Advocate
Advocate

I use notes like this - on two lines, two data. It will need to translate the words for you

 

 

var material = "";
var zmena = "";

if (hasGlobalParameter("job-notes")) {
    var notes = getGlobalParameter("job-notes"); 
    if (notes) { 
      var lines = String(notes).split("\n"); 
      material = lines[0].replace(/^\s+|\s+$/gm,'');
      zmena = lines[1].replace(/^\s+|\s+$/gm,'');
    }
}

writeBlock("*-material:" + material);
writeBlock("*-zmena:" + zmena);

 

0 Likes
Message 13 of 14

reeltime273
Participant
Participant
Hello,

Does the entire script go under the variables parameters? where do I need
to insert the script?

Thanks, Mark
Message 14 of 14

nunobrandaoNPGST
Contributor
Contributor

HI, instead of setup notes, how to change to tool+path notes ?

0 Likes