what doesn't the machine like about your sub routine?
Can someone post an example of a tested and working program, for CNC88 that is using subroutines? I am trying to debug a post processor and although my output looks almost identical to the book example the machine does not like it. I'm hoping I can put the program in the control and see if it runs and then I can back track and figure out why mine isn't working.
Thanks,
Don
what doesn't the machine like about your sub routine?
Can you post your program here so we can see what you are doing?
Jeff
Attached is an example program that as far as I can tell, according to the manual, should work. My control chokes on it though. Any help would be appreciated.
Thanks,
Don
N1o100 (baseplate.nc)
N2g90g80g40g17g0
N3(job 3 Cbor Hole Random Point Pattern)
N4(tool #1 0.2500 Center Drill)
N5m6t1
N6m3s500
N7g0g54x.8049y-7.3042
N8g0h1z.1
N9/m8
N10g81g99x.8049y-7.3042z-.08r.1f5.99
N11l0501
N12g80
N13m9
N14g0z0h0
N15m5
N16(job 3 Cbor Hole Random Point Pattern)
N17(tool #2 0.2500 Drill)
N18g0g90m6t2
N19m3s2505
N20g0g54x.8049y-7.3042
N21g0h2z.1
N22/m8
N23g81g99x.8049y-7.3042z-.6751r.1f20.05
N24l0501
N25g80
N26m9
N27g0z0h0
N28m5
N29(job 3 Cbor Hole Random Point Pattern)
N30(tool #3 0.4375 Counter Bore)
N31g0g90m6t3
N32m3s1004
N33g0g54x.8049y-7.3042
N34g0h3z.1
N35/m8
N36g81g99x.8049y-7.3042z-.26r.1f6.02
N37l0501
N38g80
N39m9
N40g0z0h0
N41m5
N42(job 3 Cbor Hole Random Point Pattern)
N43(tool #4 0.6250 Chamfer Tool)
N44g0g90m6t4
N45m3s702
N46g0g54x.8049y-7.3042
N47g0h4z.1
N48/m8
N49g81g99x.8049y-7.3042z-.1813r.1f8.43
N50l0501
N51g80
N52m9
N53g0m7m5
N54m02
N55l0500
N56x.8049y-7.3042
N57x3.3046
N58x5.8048y-7.3044
N59x8.3045
N60x.8048y-4.6393
N61x.8049y-3.9472
N62x3.3046
N63y-4.6391
N64x4.1957y-4.2892
N65x5.1954y-4.289
N66x5.8049y-3.9472
N67x5.8048y-4.6393
N68x8.3046y-4.6391
N69x8.3045y-3.9474
N70x9.1958y-4.289
N71x10.1954
N72y-.6955
N73x9.1957y-.6957
N74x8.3046y-1.0457
N75x5.8049
N76x5.1954y-.6957
N77x4.1958y-.6955
N78x3.3045y-1.0459
N79x.8049y-1.0457
N80m30
%
Ya!
You didnt define the beginning of your subroutine
Basically you are calling subroutine #5 one time and you havent defined where subroutine 5 is. And where is you M17 at the end of your subroutine.Code:N1o100 (baseplate.nc) N2g90g80g40g17g0 N3(job 3 Cbor Hole Random Point Pattern) N4(tool #1 0.2500 Center Drill) N5m6t1 N6m3s500 N7g0g54x.8049y-7.3042 N8g0h1z.1 N9/m8 N10g81g99x.8049y-7.3042z-.08r.1f5.99 N11l0501
Your program might look like this if I am not mistaken
First avoid tool changes in subroutines
Code:(job 3 Cbor Hole Random Point Pattern) (tool #1 0.2500 Center Drill) L0500 g0g54x.8049y-7.3042 g0h1z.1 /m8 g81g99x.8049y-7.3042z-.08r.1f5.99 M17 g90g80g40g17g0 m6t1 N6m3s500 N11l0501
Or even cleaner because you are basically making one move in your subroutine
Code:(job 3 Cbor Hole Random Point Pattern) (tool #1 0.2500 Center Drill) L0500 g81g99x.8049y-7.3042z-.08r.1f5.99 M17 g90g80g40g17g0 m6t1 N6m3s500 g0g54x.8049y-7.3042 g0h1z.1 /m8 L0501
Ok so lets complete the mess
L0500
g81g99x.8049y-7.3042z-.08r.1f5.99
M17
g90g80g40g17g0
(job 3 Cbor Hole Random Point Pattern)
(tool #1 0.2500 Center Drill)
m6t1
N6m3s500
g0g54x.8049y-7.3042
g0h1z.1M8
L0501
(job 3 Cbor Hole Random Point Pattern)
(tool #2 0.2500 Drill)
M6t2
M3S2505
g0g54x.8049y-7.3042
g0h2z.1M8
L0501
(job 3 Cbor Hole Random Point Pattern)
(tool #3 0.4375 Counter Bore)
M6T3
M3S1004
g0g54x.8049y-7.3042
g0h3z.1M8
L0501
(job 3 Cbor Hole Random Point Pattern)
(tool #4 0.6250 Chamfer Tool)
M6T4
M3S704
g0g54x.8049y-7.3042
g0h4z.1M8
L0501
Its late here so I may be wrong but thats how it comes out for format 2 if I am not mistaken
No M30 to end the subroutine section? or is that old school fadal?
Place subroutines at the top of the program.
Begin with L word: Lxxxx
end with M17.
Separate subroutine from main with M30.
My example is posted with one of my Format 2 posts.
CadMan,
Thanks a million. I thought I had done exactly what you posted, but I put your post in the mill and it took right off. So I modified my post and it worked as well. I'm not sure what I missed the first time. I did try putting the Subroutine at the top of the program once before, so I guess I had missed something else.
Thanks Again,
Don