I think what im going to do is find a c# compiler and write a program that will look for each new sub and output them all separately into their respective files. When im done if you guys want it ill make it available on my website to download.
Thats the only "quick" way I see to make it happen without accidentally making a mistake.
Hello TangentCNC,
I assume that all the Subprograms are contained in one file, if so, each Sub should start withe an "O" character plus a program number and finish with a % character. Accordingly, its a simple task to write an app to find the occurrence of an "O" and output all code between it and the next % inclusive, to a new, single file. However, there are other ways that the Subprograms can be separated without reinventing the wheel.
Given that each Subprogram will start with an "O" character, if you were to load the the program into memory, the Subprograms will be automatically separated by the Fanuc Control. Each time an "O" character is encountered, a new, separate program will be registered. These single files can then be output to your external device (PC, or Laptop most likely) and saved as a unique file.
If the whole file wont fit into memory:
1. load until the memory is full
2. save the files that have been separated
3. then clear the saved files from memory
4. make a working copy of your original file containing the Subprograms and deleted those Subs that have been separated and saved
5. repeat the load to CNC memory, output to external device and save the individual file exercise until done.
Most Editor/Comms packages allow more than one Edit Window to be opened at the same time. In this case:
1. open the file containing all Subprograms
2. open New Program Window
3. Copy and Paste each individual Subprogram from the file containing all Subprograms, to the other open Window
4. Save content of other open Window to a unique file
5. Clear content of other open Window and repeat steps 3 and 4 above until done.
Regards,
Bill