Insert Custom Code Between Setups

Insert Custom Code Between Setups

wileydavis
Participant Participant
753 Views
3 Replies
Message 1 of 4

Insert Custom Code Between Setups

wileydavis
Participant
Participant

Hi,

 

I need to insert the following code in between two setups when posting a single program with two setups:

 

G53 X-14. Y0.
M52
G04 P1.
M62
M00

 

We uncheck "minimize tool changes" so that each setup runs sequentially, but in order to interface with our robot, I'd like to have the post insert the above code in between setup 1 and setup 2. I'm comfortable modding the post (ours is already heavily modified from the standard haas post) but if someone can point me in the right direction as to where to look I'd appreciate it.

 

Cheers,

 

w

0 Likes
Accepted solutions (1)
754 Views
3 Replies
Replies (3)
Message 2 of 4

makko74
Collaborator
Collaborator
Accepted solution

maybe with getJobId()

 

in onSection

  if ( !isFirstSection() && ( currentSection.getJobId() != getPreviousSection().getJobId() ) ) {
    writeBlock("G53 X-14. Y0.");
    writeBlock("M52");
    ..
  }

not tested

 

Mario



InfoInventor CAM(Ultimate) user --- Inventor Professional 2021.2 + Inventor CAM Ultimate 8.1.2.21785
Message 3 of 4

wileydavis
Participant
Participant

That worked perfectly. Thank you very much.

Message 4 of 4

makko74
Collaborator
Collaborator

You're welcome

Glad that it work for you.

 

Have Fun

 

Mario



InfoInventor CAM(Ultimate) user --- Inventor Professional 2021.2 + Inventor CAM Ultimate 8.1.2.21785
0 Likes