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:

Capture output of next operation


Dave Loveridge
 Share

Recommended Posts

So I'm assuming that you want to set the mi value in your cutoff operation and then it would automatically post your code BEFORE the cutoff op starts? Is that right? Can you post some actual code the way you want it so we can see what you need? There may be other ways to do this.

 

C

Link to comment
Share on other sites

Well if you are wanting to do this in a spefic operation with a mi4 then you can hard code oyur post for this. Look at the exmaple I put for for a Fadal yeasterday something about material removal speed or something like that. I think that will point you in the right direction only problem if that you will have to fiqure out where in althe post to put it becuase I dont have lathe here.

 

Crazy Millman

Link to comment
Share on other sites

Why not just turn on the MI at the start of the op you want to run it at? Instead of the end of the previous op? Just move the code in the post to the appropriet place.

 

That's how I do my M00's with MI. When I want the proggie to stop at the beginning of a milling op, I switch it on on that op. wink.gif

 

'Rekd

 

[ 01-15-2004, 07:07 PM: Message edited by: Rekd ]

Link to comment
Share on other sites

Thanks Matt, I am about to run out I have 18 used and can think of ten more things I would like to add but no mi to control it. I am blowing everyone's mind with the Thermwood. I just got an awsome job for it. 16" x 15" x 28" solid block of ABS remvoing about 75% of the Material. I figured it will start at about 350lbs and end up right at 45lbs when done. There are 2 different of these parts. I am trying to get a release but of course they are for a trade show and that I dont want someone to steal our idea comes up everytime.

 

Crazy Millman

 

[ 01-16-2004, 12:20 AM: Message edited by: Millman^Crazy ]

Link to comment
Share on other sites

Millman,

 

Just an idea...

I am coming from a computing background, so I might be geeky and let me know if this confused you.

 

You have 10 misc integers to use, if you make it becoming a bit, then a misc integer variable become multi variables.

 

For example, a value of 256 for misc integer 1 means the eight bit of that variable is true or it means the eighth variable of the misc integer 1 is equal to 1.

 

However, this will only works if mp.dll can do bit comparison just like C language.

 

Did I make sense? I am not sure myself... wink.gif

 

I just make this post and I am about to sleep. So, ignore me if this is nonsense and useless...

Link to comment
Share on other sites

Rekd,

 

There are 10 misc integers.

 

Let's just take one misc int. We usually use misc integer for turning on/off a feature. So, a value of 1 means turn on a feature.

 

An integer can go up to 32000 which is a 2^16.

 

If we look at misc integer as a bit(0 or 1) instead of just an integer, we will have 16 variables. With that theory, we have 160 misc integer variable instead of just ten misc int variables.

 

If I do this, the misc integer 1 is set to 8 and I have the following code in post:

code:

  

coolant = 8

if and(mi1,coolant) = coolant

#turn on mist coolant

so, when I set my misc integer 1 value to 8, it will turn on the mist coolant.

 

Doing this will give you a total of 160 misc integers instead of just the 10 default misc integers.

 

I had not done this but I think it will work.

Link to comment
Share on other sites

Some may not realize that you have access to the Misc Ints & Misc Reals of the Operation about to be processed at the end of the current operation being processed.

 

Example:

Program with 2 tools.

You've set MI10 = 1111 on Tool #1

You've set MI10 = 2222 on Tool #2

 

When MP processes the NCI, just before going into the PTLCHG (toolchange) postblock for Tool #2, it has read the Misc Ints & Reals that are set for Tool #2

 

The Misc Ints can be accessed in for this situation in the PMISCINT postblock and PMISCREAL for the Misc Reals.

 

You can test this by adding this line into the PMISCINT postblock of the std MPFAN.PST ->

 

"*-> mi10 = ", ~mi10, e #

 

You'll see something like this ->

code:

 N144G0Z.1                               	pzrapid prapidout 78

*-> mi10 = mi10 2222. pmiscint 84

N146M5 ptlchg1002 pretract 118

N148G91G28Z0.M9 ptlchg1002 pretract 118

N150G28X0.Y0.A0. ptlchg1002 pretract 118

N152M01 ptlchg 120

( 1" DRILL TOOL - 2 DIA. OFF. - 2 LEN. - 2 DIA. - 1.) ptlchg ptoolcomment 120

(THIS IS THE OPERATION COMMENT FOR TOOL 2) ptlchg pcomment2 120

N154T2M6 ptlchg 120

N156G0G90G54X-3.2978Y4.3749A0.S250M3 ptlchg 120

N158G43H2Z.1M8 ptlchg 120

N160G99G81Z-1.R.1F3.5 pdrill 124

N162X.1495Y6.007 pdrill_2 126


Link to comment
Share on other sites

Cam, what I'm saying is, you can get as many MIs as you need, we're talking tens or hundreds of thousands of them.

 

code:

      if mi8 <> 0, 

[

n, "( MISC INT 8 VALUE SHOWS ", mi8, " )", e

]

With this in mind, you can enter any integer into the MI and based on it's value, do something different for EACH value. Like a Select Case statement.

 

Of course, you'd play hell remembering them all, but hey, that's ok.. wink.gif

 

Roger, that's good info, I didn't realize that. Thanks!

 

'Rekd

Link to comment
Share on other sites

quote:

Roger, that's good info, I didn't realize that. Thanks!

That's why I posted it smile.gif

I was sure that many "didn't realize that".

 

quote:

You'd prolly have to buffer the entire part, then pull what you need from that

You can save off all the MI# and MR# values in a the program off into a buffer file. You would not need to buffer "the entire part". The MI and MR values are available in the PWRTT pre-read routine. But I'd always suggest to try to find a different way to do what I'm trying to accomplish to avoid doing that - unless that was the only solution.

Link to comment
Share on other sites

Cam Displie good thinking for one.

 

Roger thanks for that tip.

 

I am using alot of these for axis controls like maxuim B angle rotation, Safe unwinds postions in Z, I have anohter that sets the Z height for 5 axis maching on the Thermwood. I have others that are doing things that limit my abilty to use intergers to activate different functions on this post as what is stated here. I would have to then create a complex libary of spefic postions and then do an intger equation to cover all the vaules I would need. My post also supprts the G52 Lxx workoffset which is support by Mastercam and the workoffset on the T-plane page. I am working on some other things that will give me things I am looking for in this post. I have the M48 Feed rate override and the Timer sub also supported by this post and they are turned on by Mi in my post if I want them there or not.

 

I had to coem up with contional stamtements for this as for something I need to work all the time when doing 5 axis work where as in 3 axis work some things are just not needed and add extra unwanted moves. I also added the 5 axis cicrle mill Macro support to my post using the drill cycle as a control.

 

The 3 axis machine posts are pretty good at this point I have them dialed in pretty good to support just about everything we need for both machines.

 

Crazy Millman

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