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:

need help about post


Tom
 Share

Recommended Posts

Hello folks, smile.gif

I'm looking for the way to force X and Y out

before entering subprograms in translate retangcular toolpath.

for instance, after a toolpath translated several times along x axis

the output looks like this

....

X-3.75Y0

M98P0001

X-2.75

M98P0001

X-1.75

M98P0001

.....

And this is the output I'm looking for

....

X-3.75Y0

M98P0001

X-2.75Y0

M98P0001

X-1.75Y0

M98P0001

.....

I have tried to replace postblocks: pxout,pyout under prapidout

by pfxout and pfyout. The result looked

good at the above section in my program. but confused at non-subprogram sections: It also forced X & Y out where it not supposed to do. So..I changed it back tongue.gif whew....

I'm using MCam V8.1.1 with MPFan

Your help would be greatly appreciated smile.gif

[ 09-19-2001: Message edited by: TOM ]

Link to comment
Share on other sites

You can't force a post block with an asterisk (e.g. *pxout). If present in your post, pfxout calls a post block that forces xabs (e.g. *xabs).

It's easier in this case to find the end of each sub, rather than to trap the rapid move between subs, recognizing them as being different than a regular rapid move.

Here we can update the previous values of xabs and yabs at the end of each sub call to force the output of these modal variables on the next positioning move.

In psub_end_m and psub_end_s add these two lines:

prv_xabs = c9k

prv_yabs = c9k

e.g.

code:


psub_end_m #End in main level

n, "M99", e

prv_absinc = -1

prv_xabs = c9k

prv_yabs = c9k

...


--

The server clock looks like it was messed up today. We did suffer a power outage today. Back to normal now.

[ 09-19-2001: Message edited by: Dave Thomson ]

Link to comment
Share on other sites

Access the Mp.hlp file (I believ it is included in a standard installation), and find the 'MP Processing of Subprograms' entry. I believe that will answar your questions.

As I understand it, you wish output of both X and Y coordinates (and possibly also Z), immediately before starting a subprogram. I belive the best way to do this is to check for changes in the sub_level variable in the prapid and pzrapid postblocks, and force the X and Y coordinates, if sub_level has changed The code would be something like this:

code:


if prv_sub_level <> sub_level, n, sgcode, *x, *y, e

else, n, sgcode, x, y, e


I hope I have been of help.

Link to comment
Share on other sites

Excellent! smile.gif

I feel much better now.

Dave' 2 magic post lines did the trick!perfectly!

I also tried craebild' codes. The result looked pretty good too! smile.gif

Many thanks to you guys. for all your input

and special thanks to this forum. where I

can always learn and get support from smile.gif

( while my dealer' leaving everything on my own wink.gif )

Link to comment
Share on other sites

I have been thinking a little more about the problem. Dave's suggestion will force X and Y, whenever the subprogram level goes up towards the main program level, while my suggestion will force X and Y whenever the subprogram level changes. Dave's suggestion may be sufficient, but I am not certain it will give the correct code, if you have a non-transform subprogram at a lower level than a transform subprogram. My suggestion should create correct code in all instances, but may produce unneeded code in some cases. If you have enough memory in the control, I believe my suggestion would be your best choice.

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