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:

Manipulating the Post's WCS


Recommended Posts

I have a partially hypothetical situation; If I wanted to maniplulate the WCS inside of the post and change it to something else and re-post, how abouts would I do that?

 

The thought I am having stems from the thread about what would be nice for the future release. I made mention of the WCS being set at -1 (default) taking on the same identity as the previously used WCS. Persay it had been set to G55 in the op before but I forgot to change the Co-ords WCS to 1, the -1 would look back and take on the G55.

 

What I had done to trial this was create a new variable called r_wcs, formatted the same as g_wcs and told it, before the callouts inside of pwcs, r_wcs = g_wcs, then run all the callouts. It did not work (obviously, if I am writing here...)

 

This is the jist of my code;

code:

pwcs            #G54+ coordinate setting at toolchange

r_wcs = g_wcs

if use_wcs = 1,

[

sav_frc_wcs = force_wcs

if sub_level$ > 0, force_wcs = zero

if workofs$ <> prv_workofs$ | (force_wcs & toolchng),

[

if sub_level$, result = mprint(swrkserror)

if workofs$ < 6,

[

g_wcs = workofs$ + 54

if workofs$ < 0, g_wcs = r_wcs #***added to prevent redundant G54 when offset is left at default******

*g_wcs

]

else,

[

p_wcs = workofs$ - five

"G54.1", *p_wcs

]

]

]

force_wcs = sav_frc_wcs

!workofs$

]

Link to comment
Share on other sites

Nope you need to keep it in a buffer I think and check it against that variable to get what you are looking for to work since this section of the post has the information wiped out and check for every operation if you have the post set-up that way. Could be wrong but I think that is what is happening.

 

HTH

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