Community
HSM Post Processor Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Manual NC Call Program and Action

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
1141 Views, 2 Replies

Manual NC Call Program and Action

What is the code and where do I place it in the Post to activate the ability to use Manual NC Call program that will call up the M98 and P with user defined number and the Manual NC Action command to manually add any commands to the program that I want.
2 REPLIES 2
Message 2 of 3
matthew.nichols
in reply to: Anonymous


function onParameter(name, value){
  if(name == "action"){
  writeBlock(value);
  return;
  }
}


you should be able to just put this at the top of the onSection call.


Matthew Nichols
Adoption Specialist - MFG
Message 3 of 3
Laurens-3DTechDraw
in reply to: Anonymous

I would use passthrough for adding straight code.
For the Call Program number I would advise adding a M01 before it call and for example we have a M09 as well.
The easiest location to put this for you is totally at the bottom of the post.

function onPassThrough(text) {
  var commands = String(text).split(",");
  for (text in commands) {
    writeBlock(commands[text]);
  }
}

function onParameter(name, value) {
if (name == "call-subprogram") {
writeBlock("M01");
writeBlock("M09");
writeBlock("M98", "P" + value);
}
}

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report