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:

osp workoffset again


Recommended Posts

Hello all,

I know this topic was covered but i can not make it's work after up date form V9 post.

Here is the pwcs section and the post out on my program, I miss the workoffset which is okay on V9

 

pwcs # 'H' fixture offset setting at toolchange

if mi1$ > one,

[

sav_frc_wcs = force_wcs

if sub_level$ > 0, force_wcs = zero

 

"workofs = ", ~workofs$, e$

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

[

#h_wcs = workofs #Transfer into output variable # OLD

#If by chance the setting from Mastercam is not set (is '0')

# bump it up to '1', so 'H01' is output.

if workofs$ < one, h_wcs = workofs$ + one # ADDED <rm>

else, h_wcs = workofs$ # ADDED <rm>

 

pbld, n$, "G15", *h_wcs, e$ #Output the 'H??' fixure offset

if workofs$ > 50, # H1 thru H50 are valid

[

sfix_error = strquot + strh + no2str(h_wcs) + strquot + sfix_error

sfix_error = sfix_error + no2str(tnote)

if omitseq$ = no$,

sfix_error = sfix_error + strspace + strlp + strn + no2str(n$) + strrp

result = mprint(sfix_error)

]

]

force_wcs = sav_frc_wcs

!workofs$

]

 

 

Here is post out:

 

$O1.MIN %

(PROG: SHIM)

(DATE: 05-17-12)

(TIME: 15:12)

 

( 1/2 FLAT ENDMILL TOOL- 1 DIA.- .5)

T1M6

N100G0G90G80G17G40G95

workofs = workofs$ 0.<<<<<<<<<< G15H1 missing here

G0G90X-1.9035Y-.79S1069M3

G56Z1.H1

Z.05

G1Z-.2583F.07

X-1.8535F.01.....

....

 

workofs = workofs$ 0.<<<<<<<<< G15H1 missing here

 

T2M6

M1

G0G90X.3451Y-.5754S2500M3

G56Z1.H2

Z.05

G1Z-1.175F.05

G41D2X.3627Y-.5577F.01

...

Please give a hand.

 

Thanks in advance,

 

MDT

Link to comment
Share on other sites

There are a few ways to do this, The simplist is

 

 

 

pwcs            #G15 H+ coordinate setting at toolchange
       if workofs$ <> prv_workofs$ | (force_wcs & toolchng),
        [
         if (workofs$ > 1 & workofs$ < 201),
          [
          g_wcs = workofs$
          "G15", *g_wcs
          ]
         else,
           [
           g_wcs = 1
           "G15", *g_wcs, e$
           ]
         ]
       force_wcs = sav_frc_wcs
       !workofs$

 

In toolcahnge common blocks add

 

 

pcan1, pbld, n$, pwcs, e$

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