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

add "setup name" in post processor on each first section of his relative setup gcode

4 REPLIES 4
Reply
Message 1 of 5
damien.huvelle
210 Views, 4 Replies

add "setup name" in post processor on each first section of his relative setup gcode

Hi all, 

 

I'm manufacturing furniture, and for machining it i'm using multiple setup for each pieces. 

 

I'm regrouping those setups in one NCprogram with custom "optional stop" at the end of each setup to have the time to change the stock.

 

I would like to write in the Gcode a comment on each "first section" of those setups to identify them easily

 

I'm not qualified in any ways for post modification but i managed to do that based on information I found in the post and on this forum.

var part = getGlobalParameter("job-description");
    if (part) {
      writeComment ("   "+(part.toUpperCase())+("   "));
      writeln("");

it works but for each "section" (or toolpath if you want) and even if the section is from a different setup it keep the initial setup name across all the sections of those multiple setups.

 

could someone check that ? where do I need to put thoses lines in the post and how to get this comment prompt on each first section of those differents setup regrouped in one file ?

 

thanks a lot

 

4 REPLIES 4
Message 2 of 5

You can simply identify the new setup by comparing the wcs codes and print the comment only when there is a change in wcs codes. the code will something look like as shown below

  var part = getGlobalParameter("job-description");
  if (part && newWorkOffset) {
    writeComment("   " + (part.toUpperCase()) + ("   "));
  }

 


Boopathi Sivakumar
Senior Technology Consultant

Message 3 of 5

WCS is not changing, 

I'm changing the parts in the same WCS

 

@boopathi.sivakumar 

Message 4 of 5

@boopathi.sivakumar  thank for taking the time.

 

I tried what you gave to me but the problem is that by doing that it keeps refering to the ever first setup of the NCprogram. (I have multiple setup in one NCprogram)

 

I also saw that dump post was outputting the "setupname" information only for the first toolpath of this setup.

 

For better explaination, The setups that I'm using for testing contains 2 toolpath each.

 

with this "code" (don't know how to call it),

var part = getParameter("job-description")
writeComment("   " + (part) + ("   "));

I'm able to show in the gcode the "setupname" for every toolpath but there is a problem. As mentioned above dump.cps tells only for the first toolpath the "setupname" so ...

 

setup 1

first toolpath (section) is obviously ok

second toolpath (section) is ok "(part)" did not changed

setup 2

third toolpath (section) is ok "(part)has changed

fourth toolpath (section) PROBLEM, "(part)" is refering the very first setup

 

as mentioned earlier I don't know what I'm doing, just trying to understand things

 

 

Message 5 of 5

@boopathi.sivakumar any ideas ? really need help

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

Post to forums  

Autodesk Design & Make Report