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:

Force WCS coordinates?


Recommended Posts

8 hours ago, tsaladyga said:

Hi Guys,

 Question, We use pre-populated WCS values on all of our repeat work. Is there a way to have the numbers in the tool plane in Mastercam output through the post? 

Can you give me an example of your G-CODE so I can understand what you need?  I think I have that issue and I already fixed.  Just to be sure not to answer the wrong one, I would like you to give me an example of G-CODE then I can help you out.

Link to comment
Share on other sites

There's a free buffer post here on emc.  It's old but it still works if you cut/paste/tweak it into a newer post.  You're looking at a buffer for this and it's doable, easier than you expect but a bit time consuming.  I suggest you hit up Colin Gilchrest and see if he can do it for you.  He will be very reasonable on cost but you are looking at some investment here.  Having said that, reach out to your reseller, they may help you out.

Link to comment
Share on other sites

you mean  like :  Toolplane Origin :  X0. Y181.93 Z-4.953  ?

 

         if prmcode$ = 15131 , X_orig = rpar(sparameter$,1) # TOOLPLANE ORIGIN
         if prmcode$ = 15132 , Y_orig = rpar(sparameter$,1) # TOOLPLANE ORIGIN
         if prmcode$ = 15133 , Z_orig = rpar(sparameter$,1) # TOOLPLANE ORIGIN 
 

Gracjan

  • Like 1
Link to comment
Share on other sites
On 11/29/2018 at 6:52 PM, PcRobotic said:

Can you give me an example of your G-CODE so I can understand what you need?  I think I have that issue and I already fixed.  Just to be sure not to answer the wrong one, I would like you to give me an example of G-CODE then I can help you out.

Ok so we use Okuma machines and we use what we call "OSET1" values, which are the distances from machine zero to the WCS coordinates. Below is an example of the outpu I would like to see. The "X", "Y", and "Z" coordinates are from the tool plane box in Mastercam. I edited them in for now, but I would like to output them using the toolplane values automatically. 

This is an example of the main program:

 

(****  59330AR ****)
(****  CNC10 ****)
        (****  FIXTURE LAY OUT WORK OFFSETS ****)
        (****  OP20 ****)(****  OP10 ****)
        (****  41, 11 ****)(****  40, 10 ****)
        (****  31, 21 ****)(****  30, 20 ****)

(****  POCKET ON/OFF ****)    
NPKT CALL OPKT    
        
(****  PROBING ****)
CALL OSET1 <-------------------------------------------------This calls out the WCS sub.
NA1 CALL OT01A ( BOTTOM OD - OP10)
NB1 CALL OT01B (CORD PLATE - OP20)

.........

M30

 

 

This is the Sub for WCS. 

OSET1
(****  WORK OFFSETS ****)
(****  BOTTOMS - OP10 ****)
(****  10 ****)
VZOFX[10]=15.8492
VZOFY[10]=4.8288
VZOFZ[10]=3.1454

RTS

**************************************

This is what I put into my post, I was trying to use misc, integers and reals to drive this.

if mi10$ = ten,
         [
      fixtrack1
           ]
     else,
     if mi10$ = twenty, 
        [
     fixtrack2
     ]
     else,
      if mi10$ = thirty, 
        [
     fixtrack3
     ]
     else,
      if mi10$ = forty, 
        [
      fixtrack4
     ]

*****************************

I inserted this into the peof$ area in order to get the output after the M30.

fixtrack1
      [
      pbld, "OSET1", e$   
      pbld, "VC110=1(SETS ACTIVE PALLET)", e$
      pbld, ,"VZOFX[10]", mr1$, e$
      pbld, ,"VZOFY[10]", mr2$, e$
      pbld, ,"VZOFZ[10]", mr3$, e$
           ]
     pbld, e$
     pbld, e$  
   
     fixtrack2
      [
      pbld, "OSET2", e$  
      pbld, "VC110=1(SETS ACTIVE PALLET)", e$
      pbld, ,"VZOFX[20]", mr1$, e$
      pbld, ,"VZOFY[20]", mr2$, e$
      pbld, ,"VZOFZ[20]", mr3$, e$
     ]
     pbld, e$
     pbld, e$
     
     fixtrack3
      [
      pbld, "OSET3", e$
      pbld, "VC110=1(SETS ACTIVE PALLET)", e$
      pbld, ,"VZOFX[30]", mr1$, e$
      pbld, ,"VZOFY[30]", mr2$, e$
      pbld, ,"VZOFZ[30]", mr3$, e$
     ]
     pbld, e$
     pbld, e$ 
     
     fixtrack4
      [
      pbld, "OSET4", e$
      pbld, "VC110=1(SETS ACTIVE PALLET)", e$
      pbld, ,"VZOFX[40]", mr1$, e$
      pbld, ,"VZOFY[40]", mr2$, e$
      pbld, ,"VZOFZ[40]", mr3$, e$
     ]

**************************************

This is the code output I am getting, the coordinates aren't coming out. I defined the constants. 

 

OSET1
VC110=1(SETS ACTIVE PALLET)
VZOFX[10] =
VZOFY[10] =
VZOFZ[10] =
OSET2
VC110=1(SETS ACTIVE PALLET)
VZOFX[20] =
VZOFY[20] =
VZOFZ[20] =
OSET3
VC110=1(SETS ACTIVE PALLET)
VZOFX[30]
VZOFY[30]
VZOFZ[30]


  • Huh? 1
Link to comment
Share on other sites
4 hours ago, pullo said:

you mean  like :  Toolplane Origin :  X0. Y181.93 Z-4.953  ?

 

         if prmcode$ = 15131 , X_orig = rpar(sparameter$,1) # TOOLPLANE ORIGIN
         if prmcode$ = 15132 , Y_orig = rpar(sparameter$,1) # TOOLPLANE ORIGIN
         if prmcode$ = 15133 , Z_orig = rpar(sparameter$,1) # TOOLPLANE ORIGIN 
 

Gracjan

Yes exactly!

Link to comment
Share on other sites
9 hours ago, pullo said:

you mean  like :  Toolplane Origin :  X0. Y181.93 Z-4.953  ?

 

         if prmcode$ = 15131 , X_orig = rpar(sparameter$,1) # TOOLPLANE ORIGIN
         if prmcode$ = 15132 , Y_orig = rpar(sparameter$,1) # TOOLPLANE ORIGIN
         if prmcode$ = 15133 , Z_orig = rpar(sparameter$,1) # TOOLPLANE ORIGIN 
 

Gracjan

So, how does this work if your Z vector is not = top/top/top?

 

Link to comment
Share on other sites

A toolplane is defined by : A ) it's origin and B:)the direction  the  axes are pointing .  I was asked only  where  would one gets the WCS  coordinates  from  and  I  think I answered this question.  JLW , the  origin  of a  WCS  can  always be defined  by the X,YZ shift  in the World coordinates. To define the way the axes are pointing , you need a 9 digit matrix .

Here is info provided by Mcam for a random Toolplane :

View No.              : 25
Work Offset           : Off
Origin (world)        : X0. Y0. Z-105.25
Origin (view)         : X0. Y0. Z105.25
 Matrix                   : X0. Y-1. Z0.
                               : X-1. Y0. Z0.
                               : X0. Y0. Z-1.

"So, how does this work if your Z vector is not = top/top/top?" -  

my  answer to this would be "it works".  You would have to give me more info on what you mean by your question.

Gracjan

 

  • Like 2
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...