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:

fanuc parameter# for current work offset?


Recommended Posts

Does anyone know the parameter number on a fanuc for the current work offset when using G54-G59? For instance if you are using G54.1 P1-P300 it is #4130. I am writing a macro to probe a part, set any work offset desired, and populate the WSEC table and this variable is all I missing.

 

TIA.

Link to comment
Share on other sites

This is our usual starter for setting up WSEC on our MAM72's;

 

%

O7777(BLOCK CHECK & WSEC UPDATE)

 

(SET G59)

#5321=-14.966

#5322=-17.665

#5323=-17.635

#5324=0

#5325=0

G0G90G59

 

(PROGRAM USES G54 PART LOCATED AT CENTER OF ROTATION)

 

T1M6

 

#181=0 (X SHIFT FROM CENTER OF ROT)

#182=0 (Y SHIFT FROM CENTER OF ROT)

 

#191=17. (SET X STOCK SIZE)

#192=3.25 (SET Y STOCK SIZE)

#193=6. (SET Z STOCK SIZE)

 

#159=.05 (X POS. TOLERANCE)

#160=.01 (Y POS. TOLERANCE)

 

#161=.125 (X + TOLERANCE)

#162=.125 (Y + TOLERANCE)

#163=.125 (Z + TOLERANCE)

 

#171=0 (X - TOLERANCE)

#172=0 (Y - TOLERANCE)

#173=0 (Z - TOLERANCE)

 

(H FOR SIZE TOL)

(M FOR TRUE POS TOL)

G43H#517Z12.75

G65P9832(PROBE ON)

 

G65P9810X#181Y#182F200. (X Y SAFETY MOVE TO APROX BLOCK CENTER)

 

G65P9810Z[1.+#193]F200. (Z SAFETY MOVE 1 INCH APPROX ABOVE BLOCK)

 

(Z MEASURE WITH Z TOLERANCE CHECK BELOW)

G65P9811Z[#193]

IF[#142GE#163]GOTO3003

IF[#142LE#173]GOTO3013

#157=#142(Z POSITION ERROR)

 

(X MEASURE AT Z-.5 POSITION WITH TOLERANCE CHECK IN X SIZE & POS BELOW)

G65P9812X#191Z[#193-.5]

IF[#143GE#161]GOTO3001

IF[#143LE#171]GOTO3011

IF[#140GE#159]GOTO3021

#155=#140(X POSITION ERROR)

 

(Y MEASURE AT Z-.5 POSITION WITH TOLERANCE CHECK IN X SIZE & POS BELOW)

G65P9812Y#192Z[#193-.5]

IF[#143GE#162]GOTO3002

IF[#143LE#172]GOTO3012

IF[#141GE#160]GOTO3022

#156=#141(Y POSITION ERROR)

 

(-)

(UPDATE WSEC)

IF[ABS[#155]GT.054]GOTO155

#26010=#155(X ERROR TO WSEC OFFSET 1)

N155

IF[ABS[#156]GT.054]GOTO156

#26011=#156(Y ERROR TO WSEC OFFSET 1)

N156

IF[ABS[#157]GT.054]GOTO157

#26012=#157(Z ERROR TO WSEC OFFSET 1)

N157

(-)

 

 

(-)

G65P9833(PROBE OFF)

(-)

G53Z0

G49

G90

M99

 

 

N3001(X + ALARM)

(-)

G65P9833(PROBE OFF)

(-)

G28G91Z0

#3000=11(X OVERSIZE)

 

N3011(X - ALARM)

(-)

G65P9833(PROBE OFF)

(-)

G28G91Z0

#3000=12(X UNDERSIZE)

 

N3021(X - ALARM)

(-)

G65P9833(PROBE OFF)

(-)

G28G91Z0

#3000=13(X OUT OF POSITION)

 

 

N3002(Y + ALARM)

(-)

G65P9833(PROBE OFF)

(-)

G28G91Z0

#3000=21(Y OVERSIZE)

 

N3012(Y - ALARM)

(-)

G65P9833(PROBE OFF)

(-)

G28G91Z0

#3000=22(Y UNDERSIZE)

 

N3022(Y - ALARM)

(-)

G65P9833(PROBE OFF)

(-)

G28G91Z0

#3000=23(Y OUT OF POSITION)

 

 

N3003(Z + ALARM)

(-)

G65P9833(PROBE OFF)

(-)

G28G91Z0

#3000=31(Z OVERSIZE)

 

N3013(Z - ALARM)

(-)

G65P9833(PROBE OFF)

(-)

G28G91Z0

#3000=32(Z UNDERSIZE)

 

%

 

Hope you can get something useful from this.

Link to comment
Share on other sites

Thanks. I have all that worked out. I program the probing of the part for each specific part in mastercam and sets wahtever work offset I want and then my macro does the math to determine the difference fro C.O.R and populates whathever g54.4 p# I want. Sets my center of rotation work offset (just in case an operator erases or changes it), and then double checks all the math and alarms if something is wrong. What I need is the parameter # for whether I am using G54, 55, 56... 59. On a Mazak it is #4012, and if it is a G54.1 p1-p300 it is #4130. #4130 is the same on a fanuc, #4012 is not.

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