Add Comment to end of each operation in post

Add Comment to end of each operation in post

justinp4CQKH
Explorer Explorer
424 Views
2 Replies
Message 1 of 3

Add Comment to end of each operation in post

justinp4CQKH
Explorer
Explorer

I'm trying to edit my post to where the opening of each operation includes "(OPS)" (figured that out relatively easliy) and the end of each operation is "(OPE)".

 

I am assuming a simple writeComment("(OPE)"); will do. I just can't seem to figure out where to place it.

0 Likes
425 Views
2 Replies
Replies (2)
Message 2 of 3

seth.madore
Community Manager
Community Manager

Which post processor are you using?
In general, it will be around the "onSectionEnd" area.

Have you tried the Visual Studio Code addin that we made? This makes it super easy to jump to the related area of the code, quite interactive with the g-code. It's really nice for tasks such as this


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 3 of 3

justinp4CQKH
Explorer
Explorer

Thanks for the response.

I am using the Visual Studio Code plug-in (and it really is helpful being able to debug while you're editing). And I think I'm just using the standard 2d haas post processor. But I'll need to be able to add this to any Haas post.

But the problem I'm coming across by just placing it in the onSectionEnd is it's not encapsulating the retract moves and other end of op codes for the next operation.

 

For example:

(OPS 2D-Face)
N25 T1 G33
(myToolComment)
N30 S5000 M3
N35 G17 G90 G94
N40 G54
N45 M8
N50 G1 X3.1496 Y-0.9596 F650.
N55 G0 G43 Z0.5906 H1
N60 T2
N65 G0 Z0.1969
N70 G1 Z-0.0394 F39.37
N75 X-3.1496
N80 G2 Y0.0374 I0. J0.4985
N85 G1 X3.1496
N90 G0 Z0.5906
(OPE)
N95 M9
N100 M5
N105 G53 G0 Z0.
0 Likes