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:

Recording offsets


YoDoug®
 Share

Recommended Posts

We have a problem on the night shift. we come in in the morning and find broken tools, out of tolerance parts and big gouges in fixtures-clamps, etc.

 

The night shift always plays dumb and says it was a machine malfunction or a bad program/fixture, even though it ran parts fine for the day shift. banghead.gif

 

Question= Since offsets are system variables (#1000-#5000 if I remeber correct) can a macro using a Dprint or similar command at the beginning of a tool cycle record offsets? Has anyone ever tried this before?

Link to comment
Share on other sites

The problem is that they need to be able to make some adjustments to hold tolerance. .0002-.0005 tolerance is very common for our parts. When they change inserts they need to be able to adjust offsets. We suspect that this where the problem is, they make a mistake adjusting an offset, then crash, then correct the offset and play dumb. Having a record of what offsets were set to when the tool cycle begins would help us to track and minimize these problems.

Link to comment
Share on other sites

The Macro would look something like this either at the begining or end of a program (your preference):

 

.

.

POPEN;

DPRINT[TOOL*1**LENGTH*OFFSET***'2001[23]*;

PCLOSE;

M30;

 

the * are spaces and 2001 is the length offset for tool 1. Tool 2 would be 2002 ect...

lenght wear is 2201 and up

radius is 2401 and up

radius wear is 2601 and up

 

thes variables may be different for your machines, but the idea is the same. Your manual will tell you what they are.

 

With a macro like this, you can print just about anything. (like workoffset #, if cuttercomp was used, inch/metric, abs/inc ect....)

Link to comment
Share on other sites

The thing you need to figure out is where to send the output from dprint. What does your machine support? Can you send to RS232 network? PCMCIA Slot? Etc., etc.. You can easily set it up once you find out what the machine will support. Sending to a printer on the RS232 doesn't seem like a good idea to me. Better to send to a file. You can place a PC next to machine and have it run a terminal program to constantly listen to the RS232 port and log all data received (ProComm, Hyperterminal are just a couple that should work).

Link to comment
Share on other sites

quote:

.0002-.0005 tolerance is very common for our parts. When they change inserts they need to be able to adjust offsets. We suspect that this where the problem is, they make a mistake adjusting an offset, then crash,

DPRINT as others suggest will work well. Just need a DNC system to capture the output.

 

Another thought...

You could just keep a copy of all the offsets (work and tools) as a baseline. Then write a macro that will check for a variance in the offsets. Since the adjustments are only tenths, you could just set up a tolerance in the macro. Even with an insert change, the tool should still only change by tenths (or whatever the value equates to if you're constantly adjusting for wear). Then in the main program, have a macro alarm trigger for the bad offset input when it falls out of the adjustment window.

 

biggrin.gif

Link to comment
Share on other sites
Guest CNC Apps Guy 1

Here's something which may help Doug...

 

%

O0008(DPRINT OFFSETS)

G90G10L50 (WRITE TO PARAMETERS ON)

N20R0 (CHANGE COMMUNICATIONS TO CH 0 - RS-232)

G11 (WRITE PARAMETERS OFF)

N0001POPEN (OPEN PORT)

N10DPRNT[TOOL*1*OFFSET*H*VALUE*IS*#11001[44]]

N11DPRNT[TOOL*1*OFFSET*H*WEAR*VALUE*IS*#10001[44]]

N12DPRNT[TOOL*1*OFFSET*D*VALUE*IS*#13001[44]]

N13DPRNT[TOOL*1*OFFSET*D*WEAR*VALUE*IS*#12001[44]]

N20DPRNT[TOOL*2*OFFSET*H*VALUE*IS*#11002[44]]

N21DPRNT[TOOL*2*OFFSET*H*WEAR*VALUE*IS*#10002[44]]

N22DPRNT[TOOL*2*OFFSET*D*VALUE*IS*#13002[44]]

N23DPRNT[TOOL*2*OFFSET*D*WEAR*VALUE*IS*#12002[44]]

N30DPRNT[TOOL*3*OFFSET*H*VALUE*IS*#11003[44]]

N31DPRNT[TOOL*3*OFFSET*H*WEAR*VALUE*IS*#10003[44]]

N32DPRNT[TOOL*3*OFFSET*D*VALUE*IS*#13003[44]]

N33DPRNT[TOOL*3*OFFSET*D*WEAR*VALUE*IS*#12003[44]]

N40DPRNT[TOOL*4*OFFSET*H*VALUE*IS*#11004[44]]

N41DPRNT[TOOL*4*OFFSET*H*WEAR*VALUE*IS*#10004[44]]

N42DPRNT[TOOL*4*OFFSET*D*VALUE*IS*#13004[44]]

N43DPRNT[TOOL*4*OFFSET*D*WEAR*VALUE*IS*#12004[44]]

N999PCLOS (CLOSE PORT)

G90G10L50 (WRITE TO PARAMETERS ON)

N20R4 (CHANGE COMMUNICATIONS TO CH 4 - MEM CARD)

G11 (WRITE PARAMETERS OFF)

M30

%

Link to comment
Share on other sites

Cap your offsets BEFORE the crash using the strategy below:

 

%

O75(OFFSET CAPS EXAMPLE)

IF[ABS[#2430]GE[.0005]]GO800 (MAX/MIN CAP OF .0005 FOR RAD OFFSET 30)

 

(YOUR NC CODE HERE)

 

(END OF NC PROGRAM)

GO999

(******* ALARM ****** )

N800#3006=1(OFFSET OVER OR UNDER CAP)

G0 800

N999 (NO ALARM)

M30

%

Link to comment
Share on other sites

Pete,

 

I am working on the macro to do what you suggested. If you could post your code I can use the help.

 

We just got a new spindle probe installed in one of our machines yesterday so thats my new "hot project".

 

when I get time next week I will work more on the offset checking macro. My thought is at the end of a tool cycle use the system variable for the active tool in spindle to grab the matching variables for offsets (t12-h12-d12). Then store it in a 500+ variable. Then at the beginning of the tool cycle reference the stored variables against the active offsets +/- a tolerance. So far all I have had time to do is look up variable#'s. headscratch.gif

Link to comment
Share on other sites

code:

 MAIN PROGRAM

 

T1M6

G65P9222 A5.12 <------THIS VALUE IS THE NOMINAL TOOL LENGTH

 

MACRO PROGRAM

 

O9222(TOOL LENGTH CHECK)

#103=#2001 <------ SET #103 TO THE TOOL LENGTH OF THE TOOL IN THE SPINDLE

#101=#1 <------ SET #101 TO THE A VALUE IN THE MAIN PROGRAM

#102=#103-#101 <------ FIND THE DIFFERENCE BETWEEN THE TOOL AND THE NOMINAL VALUE

IF[#102 GT.04] GOTO1 <------ .04 IS THE POSITIVE DIFFERENCE

IF[#102 LT-.04] GOTO1 <------ .04 IS THE NEGITIVE DIFFERENCE

M99

N1#3000=1(TOOL LENGTH OFF) <------ ALARM STATEMENT

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