by Matt Hajicek » Wed Jul 26, 2006 11:50 am
I've been able to get Mastercam to generate a fair number of subroutines, but I still need to make a few manually. This means that I get out of order subroutine program numbers, which I expect could confuse the machine operator. Also, the auto-generated subs always use O0001 and O1001 as the first sub and nested sub numbers, but I would like to make them start at some arbitrary number so that subs for various programs could be in the same machine at the same time without conflicting or confusing the operator. The solution, I think, would be to have a function which would identify all of the subroutine O numbers and their respective M98 calls, and renumber them according to a set of user-defined rules. Options would include: Starting O#, Increment by#, Order by sub call in main vs. Order by sub listing outside of main vs. Order by run sequence (differs from call in main when subs are nested). Perhaps there would be rules for incrementing a different digit for nested subs as well. This might be a little overkill for most applications, but I like to design for the general case and include as many forseeable options as possible. For my personal purposes it would be sufficient to simply pick a starting number and increment by one in the order in which subs are encountered during run.
Thanks,
-Matt