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 Part Counter


DavidSV
 Share

Recommended Posts

In my manual it says that a M95 will trip the part counter. I would like to use this while the program is in a loop to maintain counts. It doesn't seem to work. I put an M95 in and it does nothing to the part count. Does anyone know how to make a fanuc control trip the part counter without ending the program? I know Haas has a setting that trips the part counter at an M99.

 

David

Link to comment
Share on other sites

I use this at the end of programs in our Haas lathes, it should work in a Fanuc, Haas macro and Fanuc are almost the same. It adds 1 to the variable count every cycle then M99 until the desired count (16. in the example below). When it reaches the desired count it resets the variable to 0 and M30.

 

(PART COUNTER)

#599= [ #599 + 1 ]

G04 P1.

IF [ #599 EQ 16. ] GOTO100

IF [ #599 GT 16. ] GOTO100

M99

N100 #599= 0

M30

Link to comment
Share on other sites

yup

 

i have a job going in our little lathe, in the main prgm, just before the M98 i have G10 P5 W0.0001; this counts the # of 6 foot lengths done and then in the sub prgm G10 P5 U0.0001; this counts my total parts. I found out the "hard" way that it will only work up to 5000 pcs or 0.5000 in the offset. Nothing crashed or wrecked, just scratched my head for a while and the zeroed out the 0.5000 and then holy cow, back in business. enjoy the day

 

Gerry

Link to comment
Share on other sites

if you have custom macro then you could read #599 by looking at the variable page or you can use #599 in a test statement such as : IF [#599 LE 212O] GOTO 345

 

or

WHILE [#599 LE 2125] DO 1

|

|

|

#599=[#599+1]

END 1

 

If you have a Fanuc control , check in the operators manual, programming section, for Custom Macro B and learn it from there

Link to comment
Share on other sites

I found where to read the variable number from. I just wrote:

 

#500=[#500+1]

 

It works for what I need it to do.

 

The macros look very interesting. I can think of several programs we have where I can use a macro to count cycles for certain tools.

 

Charlie,

How would you use the WHILE statement like above? For what purpose?

 

Thanks

David

Link to comment
Share on other sites

My 18i controls use #3901 to set the counter & I chose to use Variable #104 to load the counter.

I have this at start of program

#104=#3901

N2 G20

N4 G0 G17 G90 G40 G49 G80 G90

I use this code at end of program

#104=#104+1

N600 G94 G04 X.5

#3901=#104

N602 M00

/GOTO10

N604 M20

N606 M5

#104=#104-1

#3901=#104

N608 M30

The purpose is so that it counts while it is in the loop but when you skip the loop and go to the M30, it will add 1 to the counter when it reads the M30 so I subtract 1 before that so the count stays correct.

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