Sign in to follow this  
Joeyls319

Post out operation name when the sub is called on the same line as the callout

Recommended Posts

Hello all

I have a question about posting out the operation name when I call for the sub?  I would like it on the same line as the callout. (see program example below)

Is it possible to do this?

I can post out a generic statement but not the operation comment itself.

from my post:

pbore2$          #Canned Bore #2 Cycle     #DJ  CHANGED TO A G66 OUTPUT
    drilgcode = 2
      pdrlcommonb
      pcan1, pbld, n$, *sgdrill, dwell$, pdrillparam1, "( TYPE OPERATION HERE SUB )", e$ #pbore2$ set to post a G66

 

( THROUGH HOLES / BALL SURFACES )     <-----------------------------------------------------------------
N100 M01
#752=#4314 (CURRENT BLOCK FOR TOOL BREAKAGE RERUN)
#753=0.
#720=0. (COMPLETED PART COUNTER)
G00 G17 G21 G64 G40
G69 G80 G90 G94 G98
G91 G28 Z0.
M31L4 (SET MACHINING MODE LEVEL)
M06 T02 ( 1.5 SPHERICAL / BALL-NOSED ENDMILL )
G65P8001 (TOOL LENGTH CALC SUB)
S23000 M03
G00 G90 G54 X-241.3 Y-43.0
G5.1 Q1. (HIGH SPEED MACHINING ON)
G43 H122 Z5.
M08
G04 X3.0 (WAIT FOR COOLANT)
G66 P0681 F750. (THROUGH HOLES / BALL SURFACES SUB)        <-----------------------------------------------------------------

 

Any suggestions would be greatly appreciated

Thanks and stay safe

Joey

Share this post


Link to post
Share on other sites
On 3/23/2020 at 3:37 PM, Joeyls319 said:

Sorry, forgot to mention we're running MasterCam 2019

 

I would think you would have to parse it out into a comment and then pull the comment variable like post does for other comments. Like I see that it is not referencing the variable comment which is what MP post use for controlling this.

Share this post


Link to post
Share on other sites

I tried the following and it didn't work.

 

pbore2$          #Canned Bore #2 Cycle     #DJ  CHANGED TO A G66 OUTPUT
    drilgcode = 2
      pdrlcommonb
      pcan1, pbld, n$, *sgdrill, dwell$, pdrillparam1, "(" comment$, ")", e$ #pbore2$ set to post a G66

Share this post


Link to post
Share on other sites
9 minutes ago, Joeyls319 said:

I tried the following and it didn't work.

 

pbore2$          #Canned Bore #2 Cycle     #DJ  CHANGED TO A G66 OUTPUT
    drilgcode = 2
      pdrlcommonb
      pcan1, pbld, n$, *sgdrill, dwell$, pdrillparam1, "(" comment$, ")", e$ #pbore2$ set to post a G66

That is wrong.

You need a comma after the "(", <-- Like so and try that.

Share this post


Link to post
Share on other sites

Ron,

"You need a comma after the "(", <-- Like so and try that."

I tried that, still didn't like it.

Share this post


Link to post
Share on other sites

Gunther

Not quite following you here.  I don't see a "pscomm" in my post.  Is that a comment section I would have to create in my post?

Thanks

Joey

Share this post


Link to post
Share on other sites
19 hours ago, Joeyls319 said:

Not quite following you here.  I don't see a "pscomm" in my post.  Is that a comment section I would have to create in my post?

 

Hi Joey,

 

Try looking for pcomment$ or pcomment2 instead. pcomment$ can be called multiple times by a single comment$ call and is used to read in comments, manual entries, machine name, etc.

If you write a string variable using scomm$ when gcode$ is 1008 that will save out the operation comment.

mpmaster already does this using a  variable called scomm_sav to prevent the operation comment from being output in the header of the post, and move it to the first toolchange.

You might even be able to get away with calling scomm_sav in pbore2$ where you currently have comment$.

Just note that this will only work correctly if your operation comment is a single line. If you want multi-line support you will need use a buffer to store out the comments, in which case I would recommend going through your reseller to get a dedicated post developer like me to take care of it for you :)

 

Alex

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us