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:

Part Marking During Cetrain Time Period


M_CODE1
 Share

Recommended Posts

I want to be able to mark a part with an end mill plunging in .005" during 3 time period in a day. Each section of time, the mark will be in a different spot. This will tell us what shift made the part. The picture show what I am talking about. The mark will be on the left from 7am-5pm, then in the middle for the 5pm-9pm time, then on the right for the 9pm-7am time. I am not sure how to go about writing a macro for each time frame. This is on a Tsugami SS-32 with a Fanuc 18i control. Anyone have any ideas?

 

I first thought about using a "IF[#510EQ1]GOTO490" type statement for each mark and have the operator change the macro to (1, 2 or 3) for there shift, but I think they might forget at times, or use the wrong number on purpose

 

 

N40(MILL SLOTS MILL SLOT)

T3333(1/8 Z CARB_BACK )

G98M105(SPINDLE STOP)

M123S5000

M50(C-AXIS ON)

M8

M276

G0X-.590Y-.05Z.05

C45.

G17

G1Z0F10.0(F8.0)

Y.05Z-.04

Y-.05Z-.08

Y.05

G41X-.605F14.0(F12.0)

Y-.05

G3X-.590Y-.0575R.0075

G3X-.575Y-.05R.0075

G1Y.05

G3X-.590Y.0575R.0075

G3X-.605Y.05R.0075

G1Y-.05

G40G1X-.590

 

(JUMP TO PROPER TIME FRAME)

 

(GO HERE BETWEEN 7am - 5pm)

Y.05

Z-.085

Z-.08

GOTO6000

 

(GO HERE BETWEEN 5pm - 9pm)

Y0

Z-.085

Z-.08

GOTO6000

 

(GO HERE BETWEEN 9pm - 7am)

Y0

Z-.085

Z-.08

 

 

N6000(JUMP BACK HERE TO FINISH SLOTS)

G0Z.05

 

 

Link to comment
Share on other sites

#3012 Read current time in Hours/Minutes/Seconds - ie: 3:56pm & 25sec = 155625

#3901 Number of Machined Parts (completion number)

#3902 Number of Required Parts (target number)

 

These parameters might help, you will have to do the logic part yourself. Hope this helps.

 

#500 = #3012 this will give you a time variable to use.

Link to comment
Share on other sites

I cant take full cridit for the macro below but I was in the process of developing something similar when this was sent to me from our Rem Sales guy. Anybody know Dan Murphy, he know his stuff. As usually the idea was driven by bad parts being sent to the customer.

 

 

Assuming

 

N1000 = 1st shift mark program (7AM to 5 PM)

N2000 = 2nd shift mark (5 PM to 9 PM)

N3000 = 3rd shift mark (9 PM to 7 AM)

 

N500 (TIME STAMP);

 

IF[#3012 LT 070001] GOTO 3000;

IF[#3012 LT 170001] GOTO 1000;

IF[#3012 LT 210001] GOTO 2000;

IF[#3012 LE 240000] GOTO 3000;

#3000=1 (TIME STAMP MACRO ERROR);

;

N1000 (1ST SHFT MARK)

 

(MACHINING HERE)

 

GOTO4000;

 

N2000 (2ND SHFT MARK)

(MACHINING HERE)

 

GOTO4000

N3000 (3RD SHFT MARK)

 

(MACHINING HERE)

 

 

N4000;

 

(REST OF PROGRAM GOES HERE)

Link to comment
Share on other sites

FYI

I asked about the #3001=1 line, and below is what he told me.

 

 

Since I don’t know how you were going to write the machining code, I wanted to put in a safety so the program couldn’t run all three marks in a row.

 

#3001=1 () generates an alarm and stops the machine, whatever text you put in between the parentheses will be the message displayed on the control panel.

 

A good use for this is tool life management as shown here - http://www.todaysmachiningworld.com/shop-doc-custom-macro-programming/

 

 

Or let’s say you start work at 7:00 AM and like to have fresh coffee waiting when you get in, you could put a macro at the end of the program that checks the time and generates an alarm like this:

IF[#3012 LT 064500] GOTO 9999

IF[#3012 GT 065500] GOTO 9999

IF [#3012 GT 064500] GOTO5000;

 

N5000 #3000=1 (I’M ON MY WAY IN MAKE A POT OF COFFEE THX – MIKE)

 

 

N9999;

M30;

 

If nothing else it will baffle the xxxx out of the operator and if he’s running the machine between 6:45 and 6:55 AM you just might get coffee.

Link to comment
Share on other sites

Better yet instead of an alarm we use M00 lines that just stop the machine, then you don't have to recover form an alarm and can just hit cycle start.

the way we do it is to have our alarms and statements after the M30 that way you don't always have to jump over it all the time.

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