Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

make mastercam insert same lines before g code lines


Recommended Posts

I need Mastercam 2018 to insert following lines in every drill program

before inserting drill holes coordinates.

Sample code below:

%
N1 P4081 (JOB/PART-NO)
N2 (USE-DRILL-SIZE)
N3 G80
N4 G70
N5 G90
N6 G17
N7 M15
N8 S90 M03
N9 M11
*N10 P2=1.
*N11 P3=-0.5
*N12 P10=1.
N13 Q70
N14 G00
N15 G81 F7.
*N16 GO 18
N17 (DRILLS-XY)
N18 X28.3232 Y1.7132
N19 X27.9102 Y5.1147
N20 X27.0902 Y8.4416
N21 X25.8752 Y11.6454
N22 X24.2828 Y14.6794

 

 

 

Need for Mastercam to insert lines N1 thru N17

in every drill program, then generate X,Y positions

starting from line 18 on.

 

 

Link to comment
Share on other sites

I am still pretty green at this but I had to do something very similar within the last week on a 840C Siemens controller post I have been working on.  I had R2 =  value prefixes vs. your P2 = value. I went into the drill cycles of the post and rearranged the output of the drill cycles to the order I was looking for and formatted the variables prefix to use the R#= before the value. Using debugger really helped me out with this. For a couple variables I had to transfer the value to another variable with the R# prefixes because the format was use elsewhere in areas where the R#= prefix wasn't used. My R3= (final depth) was and example of having to transfer the value to  a different variable because the variable zabs is used elsewhere in my post without the R3= prefix. Maybe there is a better way of doing this but the approach I used worked for me.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • 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

×
×
  • Create New...