wow...on topic..imagine that?
Im writing a macro for the milling dept that takes a program processed off UG and runs the first tool in all the positions, then runs the second tool in all the positions, etc... As opposed to run all tools position 1, then run all tools position 2 etc... The tuff part is the mills are always running, so im having trouble getting debug time on the machines. SO.. when i do get to the mill I need my proggy real close to good, because I wont have the luxury of spending a lot of time debugging. The machines are makinos, a few different models, all with the macro b option and a hardrive (m198) I downloaded a few simulators, and im still in the process of seeing if any of those will help. so far no. So I figured Id post it here and anybody with skills, or just hates me can pick it apart and insult me. Even spelling, be mean!!! kind of a pre debug.
Here is the main proggy....
************************* % O0010#100 = 10 ; ENTER PROGRAM NUMBER FROM SETUP SHEET #101 = 8 ; ENTER NUMBER OF POSITIONS 1-8 #102 = 1 ; ENTER STARTING TOOL FROM SETUP SHEET #103 = 10 ; ENTER ENDING TOOL FROM SETUP SHEET
N40 IF [#102 GT 8] GOTO 50 G00 G54.#101 X0. Y0. M198 P#100 #101= #101 - 1 #102=#102 + 1 GOTO 40 N50 (YOU ENTERED TOO MANY POSITIONS) M30 %
*****************In the gcode sent from UG....
***************************** % O0020 ;IF [#102 > #103] GOTO 100 GOTO #102
*****add this to top of program******N1 T1 M99 N2 T2 M99 N3 T3 M99
*****m99 at end of each toolchange and n numbers at toolchanges only******N100 ****add n100 before ending blocks******* G91G28Z0 M20 %
***************************************** ***************************************** This is version 3, its 90% shorter than version 1. If you have a better way, hell ill scrap the whole thing in the name of progress. Id love to have a version 4. if someone gets to version 4, ill put their name on the first line of the main program. Youll be famous......kinda.