Hi Folks
Please share your knowledge on sub routines.
I am a beginner on this subject and am keen to learn more.
I start the ball rolling with this video:
Cheers keen
https://www.youtube.com/watch?v=mOmy1fv8xDE
Hi Folks
Please share your knowledge on sub routines.
I am a beginner on this subject and am keen to learn more.
I start the ball rolling with this video:
Cheers keen
https://www.youtube.com/watch?v=mOmy1fv8xDE
I have a calling program that makes use of GOTO commands, variables, "IF" conditions, and subroutines (separate subroutine files, but I imagine it would work with subroutines within the same file as well). The purpose of the program is to mill the same parts at many positions in a grid (it can also just do a line of parts and I'd guess it could be adapted for a rotary table).
I posted the code and a pretty exhaustive explanation over here... (post #2)
http://www.cnczone.com/forums/tormac...etter-way.html
It didn't get much of any response over there so maybe it's not as good as I think it is. Maybe it's simply incompatible with Path Pilot (it does use GOTO, which apparently isn't supported by LinuxCNC). The GOTOs do make it a bit confusing, but the code is efficient as far as I can tell (as an untrained hobbyist).
Since I don't have a Path Pilot machine I can't test my macro program with Path Pilot. I also don't use Mach3 any more, so I haven't tested it there either. That makes me wonder if I should be sharing it on this thread. On the other hand, I was introduced to variables by WOTDesigns, who shared some code he used with a Haas (I think). So I figured even my potentially incompatible code would be helpful.
I did a recent video on this:
https://youtu.be/nh5Cn74naq8
Sent from my SCH-I545 using Tapatalk
warmachinellc.com
I'm still using Mach 3 and after seeing that video, I don't think I'll be switching any time soon.
When I run a sub routine in Mach 3, at the sub routine call the line says M98PXXXX.
At the end of the sub, I tell it M99 and it goes back to the main body of the program.
Then move to the next spot and M98PXXXX again then M99.
I don't know if the M98/99 code will work with Path Pilot. Tormach says they are working in it, but it's not available yet.
I saw the 440 last weekend, and was quite impressed although, Andy was just babying the machine, it's quite capable of removing a lot of material if programmed the right way.
You can buy GOOD PARTS or you can buy CHEAP PARTS, but you can't buy GOOD CHEAP PARTS.