PDA

View Full Version : G-code loops on profile ?



freakolot
07-16-2009, 08:22 AM
Hello.

--poor english mode on--

Is it possible in SolidCAM to generate g-code loops
on profile operations?

I'm using standard FANUC.gpp i FANUC.mac files.
In .mac file the loops are set to "Y"
But I read that loops can only be generated with T-Slot operations.. ?

Now I'm changing g-code to look like this:

#1 = 0
o100 while [#1 gt -20]
#1 = [#1-2]
G1 ....
G1 ....

o100 endwhile

I'm really newbie on this,
and I really need to generate this "on the fly"... :)

thanks for any suggestions :)

--poor english mode off--

F.

si.peco
07-16-2009, 09:19 AM
i dont know if this will help but i generate electrodes for the model industry, so pretty small stuff with fine cuts over profiles, in my expierience i would bin off the profile operations of solidcam as we haven't found them to be versatile enough, and regardless of how simple it is we always use 3d milling even for a 2 pass profile. let the post processor do the work. hope this helps, cheers.
Also it looks like that program format has macro (ive never liked this) in it, so its not 100% Gcode.

freakolot
07-17-2009, 04:52 AM
Hm...

But the thing is that I can't get the loops
generated in any way.
Even with Slot operation with section.
And I really need them to be generated
from SolidCAM.

F.

si.peco
07-17-2009, 07:16 AM
hmm yeah t slots bit of a turd,
why i say about the macro, is
that to loop a sub program in g,code you wanna use:-
M98(sub prog call) P111(E.g for O111 prog num) L10 (times prog to repeat)
then have your profile info in O111 with any incremental Z m oves at the start
E.g
O111
G91 Z-2
G90
G01 (PROFILE DATA)
Again i dont know if this will help but you should be able to get a 100% g.code post processor(ours is for a hurco) for solidcam as this program format is both easier to read and understand, also hell of a lot easier to learn to write your own sections of program.
Cheers

freakolot
07-17-2009, 10:40 AM
Hello

After some changes in fanuc.gpp and fanuc.mac files
i can get g code like this:

O3 call
G1 Z-8. F30
O3 call
G1 Z-12. F30
O3 call
G1 Z-16. F30
....
....
O3 sub
G3 X70. Y29. R29. F30
G1 X0.
G3 X0. Y-29. R-29.
G1 X70.
G3 X90.506 Y-20.506 R29.
O3 endsub

I had to change "M98 and P" because EMC2 don't understand them.
But all of this are subprograms not loops...
Now if i have 50 steps down there will be 50 "O3 call and G1 Z-X lines"
... but anyway it is a little step forward :)

thanks,

F.

Brakeman Bob
07-18-2009, 02:07 AM
To generate loops in your code you need to restructure the post processor. This involes turning PROCS on in the MAC file and then writing code in the GPP file to handle the gernerate loop. Very likely you will need to add some global variables for holding the start and finish N numbers.

There is good sample code in the GPP tool manual and in the GPP help.