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:

Parametric Programming - Line Numbers


Recommended Posts

My Situation - I'm trying to modify my post for so I can write parametric programs with a little hand edits as possible, while still using the same post for everyday work.

My approach - I'm using manual entry toolpaths to inject logic statements between toolpaths to navigate thru my toolpaths to give various results needed to make a family of parts with different sizes. I am actually pretty close to what I want just by using the manual entry toolpaths but it’s a bit cumbersome to handle all the GOTO statements and the receiving Line numbers to receive the GOTO's.

Issues resolved - In order to jump over toolpaths I needed each toolpath to "act" like a force tool change so that it contained the important info but obviously I didn't want the spindle off, go home, and all the similar stuff. So I used mi1 as a switch, that when force tool change is on, it strips off everything I didn't want. This part is looking good, so I used a couple other misc. values to and GOTO lines and N Lines to receive them. This is where I got stuck. I am close but need help.

Currently my post is set to start at N1 and increase by 1 at tool changes. I managed to get it to add an N# for my mi1 + force tool change scenario and it even incrementally increases for each mi1 + force tool change. The problem is, I want it to "reset" at the next mi1 + force tool change scenario. So I guess I’m actually looking to have 2 line numbering streams. 1 for normal toolpaths and one for my mi1 + force tool change scenarios that resets after a break in usage.

Code example of what I want - I will say "Normal" for toolpaths that don't have mi1 + force tool change turned on and "mi1" for when mi1 + force tool change is on.

 

N1 Normal

N2 Normal

N100 mil

N200 mil

N3 Normal

N100 mil  (N number resets to N100

N200 mi1

N4 Normal

ECT . . .

 

Dave228

MPPOSTABILITY_LEADWELL_VSERIES_TRUNNION.lic

Link to comment
Share on other sites

If I'm reading this correctly,

Create a "mi1$" block counter variable and format the new counter.

Right before your normal tool change block;

if mi1$ = 0,  mi1countervariable = 0

if mi1$ = 1,

  [

 mi1countervariable = mi1countervariable + 100

*mi1countervariable,  add the tool change line code after the block number variable,  e$

]

else,  (add "else," in front of your normal block number) if mi1$ does not equal 1 then the block will automatically be "normal".

 

Edit -- always back up your post before making any changes.

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...