PDA

View Full Version : Need Help! Simple procedure output



pinguS
09-02-2010, 02:56 PM
Hi all

I have been making some collet holders etc, just out of any material I find. But my problem I'm having with Solidcam is the output of Gcode sub programs. I've tried few things like gen_procs and gen_internal_proc etc. But am not getting what I require.

Let me explain:
Lets say I have a sheet about 1000mm x 1000mm. All I am trying to do is machine some 30mm holes spaced about lets say 90mm apart. Lets say 5 rows by 5 columns (25 holes). When I use a profile operation on these (I do not want to use a drill as some holes will later be different) the output gcode has the profile operation repeated at each X Y position of the hole. What I would like to do is output the actual Hole program as a sub program, and in the main program just have either:
1. XY points then call the sub program
or
2. Something to make the program smaller and simpler, not repeated profile code

Now imagine if I was doing 200 holes exactly the same, currently the gcode is Gigantic!!

please help if possible...Or am I required to some manual editing in the output gcode????? or use a totally different operation????

mattpatt
09-02-2010, 10:25 PM
On my Fanuc control I can use a loop.

Basically, I just program for the first hole, and then transform/Translate/Matrix the hole to how ever many columns and rows it needs.

An example of drilling 5 x 5 (25 total) holes; When I out put the program it comes out like this:

%
O1000 (TEST.TAP)
G90
G21
( TOOL -1- DRILL DIA 10.0 MM )
G90 G0 X10. Y10. Z50. S1000 M3
M8
(------------------)
(D-DRILL-T1 - DRILL)
(------------------)
X10. Y10. Z10.
G98 G81 Z-5. R2. F33
G80
#21 = 0
WHILE [#21 LT 5] DO 1
S1000 M3
G4 X1.5
#22 = 0
WHILE [#22 LT 5] DO 2
S1000 M3
G4 X1.5
G0
X10. Y10.
(------------------)
(D-DRILL-T1 - DRILL)
(------------------)
X10. Y10. Z10.
G98 G81 Z-5. R2. F33
G80
G10G91 L2 P1 X0. Y15. Z0.
G90
#22 = #22 + 1
G1
END 2
G10G91 L2 P1 X15. Y-75. Z0.
G90
#21 = #21 + 1
G1
END 1
G10G91 L2 P1 X-75. Y0. Z0.
G90
M5
M9
G91 G28 Z0.
M99
%

If I did 100 x 100 holes (10,000 total) the program would look like this:

%
O1000 (.TAP)
G90
G21
( TOOL -1- DRILL DIA 10.0 MM )
G90 G0 X10. Y10. Z50. S1000 M3
M8
(------------------)
(D-DRILL-T1 - DRILL)
(------------------)
X10. Y10. Z10.
G98 G81 Z-5. R2. F33
G80
#21 = 0
WHILE [#21 LT 100] DO 1
S1000 M3
G4 X1.5
#22 = 0
WHILE [#22 LT 100] DO 2
S1000 M3
G4 X1.5
G0
X10. Y10.
(------------------)
(D-DRILL-T1 - DRILL)
(------------------)
X10. Y10. Z10.
G98 G81 Z-5. R2. F33
G80
G10G91 L2 P1 X0. Y15. Z0.
G90
#22 = #22 + 1
G1
END 2
G10G91 L2 P1 X15. Y-1500. Z0.
G90
#21 = #21 + 1
G1
END 1
G10G91 L2 P1 X-1500. Y0. Z0.
G90
M5
M9
G91 G28 Z0.
M99
%

Same length program, just a couple of numbers changed.

pinguS
09-05-2010, 06:21 AM
Yes, I think I'll just do it this way, its only chipboard I'm cutting. However I did think if I selected all the holes on the part, I would be able to get a sub program seperate from the positions, not to worry. Not like I'm running a multiple production run.