How to run file from another file in?

More
7 years 5 months ago #134829 by Todd Zuercher
PS: If you want or need to be able to run one of your sub routine files as a stand alone g-code file you can simply add an o<file> call at the end of it like this.
Code:
% o<file> sub (G-code for the sub here) o<file> endsub o<file> call m2 %

Please Log in to join the conversation.

More
7 years 5 months ago #134830 by BigJohnT
For some reason unknown to me I thought the subroutine file needed a M2 but it indeed does not need a M2. Thanks for clearing that up in this fuzzy old brain...

JT

Please Log in to join the conversation.

More
7 years 5 months ago #135199 by andypugh

Todd Zuercher wrote: PS: If you want or need to be able to run one of your sub routine files as a stand alone g-code file you can simply add an o<file> call at the end of it like this.

Code:
% o<file> sub (G-code for the sub here) o<file> endsub o<file> call m2 %


_Don't_ use % to start and end subroutines.
For reasons that we haven't got to the bottom of yet, if the subroutine _and_ the calling file both have % at the beginning and end then things don't work properly.

Please Log in to join the conversation.

Time to create page: 0.042 seconds
Powered by Kunena Forum