Subroutine

hi im stuggling to get my 440pnc to see a subroutine

can someone give me an example that works

main program that starts spindle call tool calls sub from subroutines folderetc

and an example of sub prog ie with a x anf y mmovement

to repeat say 5 times then end

can anyone help me out ,

This is a good resource with some examples

thanks ill try it out

I have been working for the last couple of months on writing a series of subroutines that will do what has been referred to as in process inspection. The idea is to probe parts at key times to ensure they are being milled to specs and if they are not then you catch the problem before it becomes scrap. I am certain that mills like the 1100mx is fully capable of this but either nobody knows how it is achieved or they just don’t want to share what they have learned. I did find a slew of subroutines in the subroutines folder on my mill. Many of them are from Tormach but I am just guessing. There are even more with Fusion 360 support. The problem with them all is that it’s sort of like someone giving you a motorcycle engine that is completely disassembled with no instructions on how to put it together. One very frustrating issue that i have been plagued with is the online code editor will randomly scramble some of the code, especially when trying to copy and paste things like variable names or labels as they call them. I figured out an unconventional but effective way around that. I have a desktop PC in my office and it is networked to the mill enabling me to see and work with Path Pilot from the comfort of my desk just as though I were at the console. From there I load a subroutine in the editor on the machine and then on my pc a load an exact copy in any text editor like notepad++. When I find an error, I correct it on my pc first. I can then copy and paste the corrections from my pc directly to the code editor on the mill with no scrambling issues. I find it easier to copy an entire line of code or even several lines at a time than trying to select one symbol or letter to fix. Safter looking over the available example routines I refereed to earlier, “my theory” on how this all works is you have a initial sub that is called from an standard tool path. I’ll call it a base routine. It sets up the environment to work in such as alternat Work systems such as g54, g55 etc. This is so when you go back to the main gcode file that the sub was called from, your work coordinates aren’t all fouled up. Then if needed you can send a call to additional subs to perform additional tasks. When it finishes the additional work, it automatically goes back to the Base sub which picks up where it left off, i.e. the next line of code which could be as little as an endsub sending control back to then original toolpath or another call, etc. In “my theory”, I believe the beauty of having multiple subs that make up 1 overall task is that you can call any sub multiple times as needed. This helps to keep the sub file size and complexity down which helps out when trouble shooting the sub but more importantly, it saves you from having to write the same code3 over and over when something like a repeat or do while commands aren’t a good fit due to any number of reasons. When I adopted this way of thinking, things seemed to be a little less frustrating and I started to believe I just might be able to pull this off aftercall. Getting just the first sub to do what you want is certainly a confidence builder. As of now I have the first 4 subs working in my project with maybe 3 more to go (I hope). “My theory” may very well be the gibberish of a mad man, but it seems to be working for me so far. I understand that I haven’t provide3de you with any real tangible answers to you post, but I hope that you know you’re not the only one struggling with it, and perhaps you may be inspired to stick with it. I certainly am not trying to make anyone think I have all the answers or that I am some sort of Milling machine whisperer because I am neither. However, if you want to collaborate, I just might be able to help you come up with some answers or a working set of routines that you can build from to get where you are going. Either way I wish you the best of luck.

Charley Thomas

Triquetra CNC