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

Show Setup Notes in Gcode

Anonymous

Show Setup Notes in Gcode

Anonymous
Not applicable

Can anyone show me how to use the notes section in the setup so that i cna write program instructions to the operator and have them appear above or below the tool list.

 

current ex. 

%
O1001 (SQR JAWS OP5)
(Using G0 which travels along dogleg path.)

(T1 - 2" Face Mill)
(T2 - #3 Center Drill)
(T3 - 25/64 Drill)
(T4 - 1/2" Flat Endmill)
(T5 - 1/4" Flat Endmill)
(T6 - 1/4" Flat Endmill)

G90 G94 G17
G20
G28 G91 Z0.
G90
(HOLD WITH 120 DEGREE ANGLE ON RIGHT SIDE)
(X ZERO LEFT SIDE)
(Y ZERO BACK SIDE)
(Z ZERO TOP SURFACE)

 

i would like the set up notes to be here

ex.

 

%
O1001 (SQR JAWS OP5)


(HOLD WITH 120 DEGREE ANGLE ON RIGHT SIDE)
(X ZERO LEFT SIDE)
(Y ZERO BACK SIDE)
(Z ZERO TOP SURFACE)

 

(T1 - 2" Face Mill)
(T2 - #3 Center Drill)
(T3 - 25/64 Drill)
(T4 - 1/2" Flat Endmill)
(T5 - 1/4" Flat Endmill)
(T6 - 1/4" Flat Endmill)

G90 G94 G17
G20
G28 G91 Z0.
G90
fusion notes pic.jpg

0 Likes
Reply
Accepted solutions (1)
1,064 Views
5 Replies
Replies (5)

Matthew-R
Alumni
Alumni

@Anonymous Thanks for posting to the forum!  I think that using the Manual NC functionality might work well for you.  That's under Setup, Manual NC.  Here's a short video that should help explain using this tool.  Please let me know if you have any other questions!

 

0 Likes

GeorgeRoberts
Autodesk
Autodesk

Hello,

 

Thanks for posting! Just to add on to the previous recommendation, you can also display setup notes in the header of your file by modifying the post processor you are using. The code to display the setup notes is:

if (hasGlobalParameter("job-notes")) {
  var notes = getGlobalParameter("job-notes");
  if (notes) {
    var lines = String(notes).split("\n");
    var r1 = new RegExp("^[\\s]+", "g");
    var r2 = new RegExp("[\\s]+$", "g");
    for (line in lines) {
      var comment = lines[line].replace(r1, "").replace(r2, "");
      if (comment) {
        writeComment(comment);
      }
    }
  }
}

If you could share your post processor, I can advise on where to place this code.

 

Cheers

-

George Roberts

Manufacturing Product manager
If you'd like to provide feedback and discuss how you would like things to be in the future, Email Me and we can arrange a virtual meeting!
2 Likes

Anonymous
Not applicable

I'm using the HAAS next generation post.....

0 Likes

GeorgeRoberts
Autodesk
Autodesk
Accepted solution

Hello,

 

Thanks for the response. If you open up your post processor by clicking the open config button:

image.png

 

Then find the following lines in the post processor:

  sequenceNumber = properties.sequenceNumberStart;
  writeln("%");

  if (programName) {
    var programId;
    try {
      programId = getAsInt(programName);
    } catch(e) {
      error(localize("Program name must be a number."));
      return;
    }
    if (!((programId >= 1) && (programId <= 99999))) {
      error(localize("Program number is out of range."));
      return;
    }
    writeln(
      "O" + oFormat.format(programId) +
      conditional(programComment, " " + formatComment(programComment.substr(0, maximumLineLength - 2 - ("O" + oFormat.format(programId)).length - 1)))
    );
    lastSubprogram = programId;
  } else {
    error(localize("Program name has not been specified."));
    return;
  }

and paste the code from my previous post below these lines, making the block look like this:

  sequenceNumber = properties.sequenceNumberStart;
  writeln("%");

  if (programName) {
    var programId;
    try {
      programId = getAsInt(programName);
    } catch(e) {
      error(localize("Program name must be a number."));
      return;
    }
    if (!((programId >= 1) && (programId <= 99999))) {
      error(localize("Program number is out of range."));
      return;
    }
    writeln(
      "O" + oFormat.format(programId) +
      conditional(programComment, " " + formatComment(programComment.substr(0, maximumLineLength - 2 - ("O" + oFormat.format(programId)).length - 1)))
    );
    lastSubprogram = programId;
  } else {
    error(localize("Program name has not been specified."));
    return;
  }
  
  if (hasGlobalParameter("job-notes")) {
    var notes = getGlobalParameter("job-notes");
    if (notes) {
      var lines = String(notes).split("\n");
      var r1 = new RegExp("^[\\s]+", "g");
      var r2 = new RegExp("[\\s]+$", "g");
      for (line in lines) {
        var comment = lines[line].replace(r1, "").replace(r2, "");
        if (comment) {
          writeComment(comment);
        }
      }
    }
  }

Finally, save the post and test it out. You should see the setup notes being displayed underneath the program name

image.png

 

Hope this helps!

-

George Roberts

Manufacturing Product manager
If you'd like to provide feedback and discuss how you would like things to be in the future, Email Me and we can arrange a virtual meeting!
2 Likes

Anonymous
Not applicable

This works great!!! Thank You Sir!

 

The other note thing was too short for the explanation i have to give for some of these set ups.

1 Like