Manufacturing Information Solutions Forum Index Manufacturing Information Solutions
Your Place for Support and Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Deleting or modifying program files

 
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> G-Code Programming
View previous topic :: View next topic  
Author Message
John_B
Frequent Poster


Joined: 03 Jul 2004
Posts: 56
Location: Milwaukee, WI USA

PostPosted: Sat Mar 19, 2005 9:48 pm    Post subject: Deleting or modifying program files Reply with quote

Is it possible within the CNC code to use macro / parameters to delete or rewrite a file from program memory during program execution?

Or perhaps someone can recommend another method to ensure a new file has been downloaded when they finish the case and the counter expires.

I am using a Fanuc 18T control and Predator DNC

I have searched on this for about 2 days... help.
Back to top
View user's profile Send private message Send e-mail
CNCJimmy7
Frequent Poster


Joined: 05 Jul 2004
Posts: 91
Location: Minneapolis, MN

PostPosted: Sat Mar 19, 2005 9:51 pm    Post subject: Reply with quote

I do not know what this "case" is or what "counter expires" means.

So some assumptions. You want the machine to not function after
either or both of said items are done. Ideally you would like to
load a new program automatically.

If the CNC is well designed I would assume the design would
prevent overwriting or deleting the current program without
manual intervention.

A way to lockup the program when a given counter is greater
than some value is as follows:

Let #101 be the counter. Let 100 be the trip point. Then at the
beginning of your program put in the following:

if [ #101 GT 100 ] then #3000 = 15 ( Counter has reached LIMIT. )

This will create an alarm with the message --- Counter has reached LIMIT.
--- when #101 is greater than 100.

You could do what ever you want with this if function.
Back to top
View user's profile Send private message Send e-mail
John_B
Frequent Poster


Joined: 03 Jul 2004
Posts: 56
Location: Milwaukee, WI USA

PostPosted: Sat Mar 19, 2005 9:59 pm    Post subject: Reply with quote

Thanks for the reply. What you say is basically what we are doing now. What we have set up is like this:

Our machines are all dedicated to specific functions and the main program never changes for production, even tho multiple parts are made from this main program.

Machines are equipped with bar code scanners interfaced to Predator DNC, so that the operator is to scan the router to get the P/N and the quantity. Predator then sends a tiny program that contains only parameter assignments for P/N and QTY. Our logic and custom alarm (like you suggest above) requires the operator to turn off block delete when the max quantity has been reached so this new data file can be read, and then turn BD ON and restart the program in order to machine the parts. Reference code below.

The trouble with this is that if he forgets to scan the router, the main program will load the values for the last case of parts worked on. If we could write to or delete this data file when a case of parts is finished, then that possibility for operator error will be eliminated.

Code:
%
:6000(MAIN HARDINGE PROGRAM)
(****VARIABLE LOADING SUB-PROGRAM****)
/M98P7997
/M98P6001
/#513=0(INITIATE COUNTER)
/GOTO3060(REMIND TO TURN ON BLOCK DELETE)
()
#513=#513+1(PART COUNTER INCREMENT)
IF[#513GT#515]GOTO3061(TEST FOR REQUIRED QTY HAS BEEN REACHED)
()
(machining code goes here)
()
N20(===========================================N20)
IF[#513GE#515]GOTO3062 (QTY REQUIRED HAS BEEN REACHED)
GOTO30 (N30 = END OF PROGRAM)
()
(****CUSTOM ALARM CODES****)
N3059(===============================N3059)
#3000=59(#508 NOT VALID)
()
N3060(===============================N3060)
#3000=60(TURN ON B.D. TO CONT.)
()
N3061(===============================N3061)
#3000=61(TURN OFF B.D. FOR NEWCASE)
()
N3062(===============================N3062)
#3000=62(END OF QTY START NEW SCAN)
()
N30(END-OF-PROGRAM POSITIONING=========N30)
G00G20G98G40X8.0Z7.0
T0(SAFE START AND INDEX POINT)
M30
%


Any ideas much appreciated, thanks.
Back to top
View user's profile Send private message Send e-mail
CNCJimmy7
Frequent Poster


Joined: 05 Jul 2004
Posts: 91
Location: Minneapolis, MN

PostPosted: Sat Mar 19, 2005 10:01 pm    Post subject: Reply with quote

Can you put a unique serial number on the bar code so that it becomes part of the small program you send. Then in the main program or small program test that the "case" serial number has changed.

If not, then back at the Predator software end could you generate a monotonic index number, possible mod 1024, that could serve as a dummy serial number?
Back to top
View user's profile Send private message Send e-mail
John_B
Frequent Poster


Joined: 03 Jul 2004
Posts: 56
Location: Milwaukee, WI USA

PostPosted: Sat Mar 19, 2005 10:02 pm    Post subject: Reply with quote

Great idea. Sometimes you dont see the forest thru the trees. Lot ID is scanned but not downloaded to the MCU (yet).

That should work fine. Just have to devise a way to let them run it again if they need to e.i a tool breaks or whatever. Probably just give instructions to do a manual edit of the 'data' file on the lot ID assignment.
Back to top
View user's profile Send private message Send e-mail
CNCJimmy7
Frequent Poster


Joined: 05 Jul 2004
Posts: 91
Location: Minneapolis, MN

PostPosted: Sat Mar 19, 2005 10:03 pm    Post subject: Reply with quote

On a HAAS machine if the program select highlight is on "ALL" and you select RS232 RECV, then send a program to HAAS that includes an O# on the line after the first % in the program file the current existing O# program in HAAS of the same number is overwritten.

This same functionality may not exist in other machines.

It means programs in HAAS are not protected from overwriting, but is sure easy for loading programs.
Back to top
View user's profile Send private message Send e-mail
JoeM
Master Poster


Joined: 09 Jul 2004
Posts: 122
Location: Jackson Hole, Wyoming USA

PostPosted: Sat Mar 19, 2005 10:05 pm    Post subject: Reply with quote

We have a main program that runs in a loop and at the start will look in memory location #751 for a program number. After so many itterations it removes the part from machine gets a new part and starts over.

We have different type of parts that can come into the machine. These are probed externally and signal is sent to machine. The specific type of part is identified a file is then read that will load in the new tool segments to be ran, and the current offset values based on which pallet is active.

If the same part comes in we do not re-read that file. As it takes cycle time.

However, if we change the any of the offset values in the offset file we manually set a variable that when our loop program is running realizes they are different and will re-read the file even though the part has not changed.

It sounds like you input to the system might be a little different but ..... That is if I understood your problem.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> G-Code Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group