Creating a Macro Program with sub-programs

Creating a Macro Program with sub-programs

victor.sandovalDM6QA
Participant Participant
1,278 Views
7 Replies
Message 1 of 8

Creating a Macro Program with sub-programs

victor.sandovalDM6QA
Participant
Participant

Can anyone tell me if there is a way to post a  program that is only 1 part but you want it in a macro program with sub-programs. I have included a sample program that I created with a different CAM program that does this. I already know how to create patterns in Fusion 360 but it doesn't create this type of output when posting it.

0 Likes
1,279 Views
7 Replies
Replies (7)
Message 2 of 8

ltomuta
Advisor
Advisor

I'm not aware of any Fusion side support for this but you could have a look at the Haas Next Generation post-processor, if you set its useSubrutines property to e.g. "All Operations" it will generate each operation as a subprogram.

%
O10011
(Using high feed G1 F5000. instead of G0.)
(T1 D=50. CR=0. - ZMIN=-1. - face mill)
(T2 D=6. CR=0. - ZMIN=-11. - flat end mill)
N10 G90 G94 G17
N15 G21
N20 G53 G0 Z0.

(2D-Face)
N25 T1 M6
(myToolComment)
N30 S5000 M3
N35 G54
N40 M8
N45 G1 X80. Y-24.375 F5000.
N50 G0 G43 Z15. H1
N55 T2
N60 M97 P90000
N65 M9
N70 M5
N75 G53 G0 Z0.

(2D-Contour)
N80 M1
N85 T2 M6
N90 S5000 M3
N95 G54
N100 M8
N105 G1 X-9.725 Y29.1 F5000.
N110 G0 G43 Z15. H2
N115 T1
N120 M97 P90001

N125 M5
N130 M9
N135 G53 G0 Z0.
N140 G53 G0 X0. Y0.
N145 M30

N90000(2D-Face)
G0 Z5.
G1 Z-1. F1000.
X-80.
G17 G2 Y0.95 I0. J12.663
G1 X80.
G0 Z15.
M99

N90001(2D-Contour)
G0 Z5.
G1 Z1. F500.
Z-11.
Y29. F1000.
G17 G3 X-5.725 Y25. I4. J0.
G1 X39.
G2 X50. Y14. I0. J-11.
G1 Y-22.
G2 X47. Y-25. I-3. J0.
G1 X-42.
G2 X-50. Y-17. I0. J8.
G1 Y22.
G2 X-47. Y25. I3. J0.
G1 X-5.725
G3 X-1.725 Y29. I0. J4.
G1 Y29.1
G0 Z15.
M99


%



0 Likes
Message 3 of 8

victor.sandovalDM6QA
Participant
Participant

Thanks for the reply. However I'm also looking to use this on a CNC Router made by Anderson America. The post processor from Fusion 360 doesn't have the option to select "Use Subroutines". How can I get that fixed?

0 Likes
Message 4 of 8

ltomuta
Advisor
Advisor

Well, you have an example of a post that implements the feature you need. I haven't spent time looking into how it does it but I imagine that copying the relevant code from one post into another would not be an impossible task.

 

0 Likes
Message 5 of 8

victor.sandovalDM6QA
Participant
Participant

Thanks, I'll attempt to add those lines into the other Anderson Post.

Message 6 of 8

victor.sandovalDM6QA
Participant
Participant

I did try to add similar to the Anderson Post but it doesn't seem to work. In fact it deletes the post from my library. Weird cause when I locate it on my C:/ it is there but if I try to select it to use it says that it that there is something wrong with it.

0 Likes
Message 7 of 8

ltomuta
Advisor
Advisor

I think I've noticed something similar recently when editing a post-processor. I suspect that Fusion performs some sort of sanity check on the post and only loads it if it is deemed to be valid (no syntax error).

So one thing you could do is make sure there are no problems with it at a programming language level. No missing parentheses or the like. But if it works as expected under VSCode & Post-Procesor Utility extension then it should load in Fusion as well.

0 Likes
Message 8 of 8

jmeyette
Contributor
Contributor

Sometimes it's easier to convert a known working post with the desired features (Haas) to Anderson than the other way around. Not always, but it's worth a look. That was how I usually approached Post Processor Development in the past.

James Meyette
Sr. Applications Engineer
Selway Machine Tool Company
CAMplete TruePath
Inventor HSM Ultimate
PowerMill Ultimate
Mastercam
0 Likes