Try posting your sub-routine in the "Subroutines" folder. I cannot quite remember how it works, I will have to think about it some more, but if you post the subroutine there, you can then call it from the main program. The only problem is, I can't remember how to call it. I will go have a look on my workshop machine, there are none on this machne.