Community
Fusion Manufacture
Talk shop with the Fusion (formerly Fusion 360) Manufacture Community. Share tool strategies, tips, get advice and solve problems together with the best minds in the industry.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modify post processor to support Manual NC Pass Through

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
SGoldthwaite
284 Views, 4 Replies

Modify post processor to support Manual NC Pass Through

I'm using the shopbot post processor (https://cam.autodesk.com/hsmposts  ver 43779).  I followed the instructions in this article (www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/post-processor-manual-NC-n... and added the following code to the post processor:

 

// Manual NC PassThrough - added by SRG 4/30/22
function onPassThrough(text) {
  writeComment("Manual NC Passthrough");
  var commands = String(text).split(",");
  for (text in commands) {
    writeBlock(commands[text]);
  }
}

 

 

In Fusion, I'm using Manual NC > Pass Through and adding this (I'm only testing):

SGoldthwaite_0-1689881209011.png

 

The post processor is outputting this:

 

' Manual NC Passthrough
JX
 -10
' Manual NC Passthrough
JY
 5

 

 

I want it to output this:

 

' Manual NC Passthrough
JX, -10
JY, 5

 

 

Can anyone tell me how to edit my post processor to do this?

 

Tags (1)
Labels (1)
4 REPLIES 4
Message 2 of 5
yd_kwon
in reply to: SGoldthwaite

Try it with the code below

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

This code doesn't break the text with a comma (,), it breaks the text based on the line break.

JX, -10
JY, 5

 

iCetnric - MFG
CAM-Fusion 360/Inventor
CAD-Fusion 360/Inventor
Before PowerMILL
Message 3 of 5
SGoldthwaite
in reply to: yd_kwon

That worked, thanks!   It does write the comment multiple times like this:

 

' Manual NC Passthrough
JX, -10
' Manual NC Passthrough
JY, 5

 

It's doesn't hurt anything, but do you know how to get "Manual NC Passthrough" to print only once?

Message 4 of 5
yd_kwon
in reply to: SGoldthwaite

That's not possible.
The onPassThrough() function is repeated for each object of text entered. This can be verified by using a dumper post file.

There are two alternatives.

1. include the desired comment text in the text. Like below

' Manual NC Passthrough
JX, -10
JY, 5


2. use the manual NC-comment with a preceding line.

iCetnric - MFG
CAM-Fusion 360/Inventor
CAD-Fusion 360/Inventor
Before PowerMILL
Message 5 of 5
SGoldthwaite
in reply to: yd_kwon

Thanks.  That's a good idea to put the comment in the in with the pass-through code instead of the post processor

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

Post to forums  

Autodesk Design & Make Report