Hi Guys,
Can you do a linear array using G-Code?? My manual does not have anything on this subject.
Cheers,
Shawn
Hi Guys,
Can you do a linear array using G-Code?? My manual does not have anything on this subject.
Cheers,
Shawn
Most controllers allow you to do a zero-shift then run program again in new location. Set it up to run then shift-zero incrementaly and run again and so on-- then you send home and reset zero. This set up can be told how many times to shift.
Odd, I never looked at linear arrays in a physical sense, only programmatically..
Look for info on G92, M98 and M99. The G92 is the coordinate offset for most machines, and M98 is a sub program call.
G92 X0 Y0
will set coords to X0 Y0 from where ever the machine sits at the time the command is issued.
M98 P3
Will call Program Number 3. (O0003, etc)
HTH
'Rekd
Matt
San Diego, Ca
___ o o o_
[l_,[_____],
l---L - □lllllll□-
( )_) ( )_)--)_)
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
BTW, be very careful, and make sure you understand how the G92 works.
It has teeth and likes to bite..
'Rekd
Matt
San Diego, Ca
___ o o o_
[l_,[_____],
l---L - □lllllll□-
( )_) ( )_)--)_)
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
I'd recommend staying away from G92 - there's always a better (safer) way to get the job done. G92 will eventually "get" you.
Look at the idea of an incremental (G91) subroutine called a specific number of times.
Sub format:
G91
G0X2.Y0.
G90
G81R.1Z-1.F.006
G80
In this example, the first hole would drill 2 inches in X and 0 inches in Y from the position you're at when you call the sub. Each subsequent call would result in a hole 2 inches from the previous hole.
For a five hole array, call the sub five times in succession (or, on a Fanuc, call it once with five executions - an optional L value, I believe).
You could, of course, change the Y value instead, or even X and Y for an angled row of holes.
mrainey is correct, the G92 is a modal command that (usually) does not reset itself after the cycle, so you would have to mathematically reset the G92 when you're done. And chances are it will get you sooner or later.
There are times when I've had not choice but to use it, but it's not very often.
'Rekd
Matt
San Diego, Ca
___ o o o_
[l_,[_____],
l---L - □lllllll□-
( )_) ( )_)--)_)
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
If your control supports G54 thru G59 fixture offsets use them instead of G92.
If you have the local fixture offset feature G52, that will allow you move your coordinate system and back.
G92 defines where you are at in you coordinate system. And unless you are back to the same machine postion at the end of your program from when you started. Your coordinate system will drift.
G54 sets your program coordinate system relative to the machine zero.
The machine being one shot G53 command.
Now G52 is a local coordinate system shift. Which is canceled by a G52 X0 Y0 or Z0
G52 is very useful for a program pattern written in absolute mode verses having to use G91 mode.
I stopped using G92 when I started using G54 thru G59 fixture offsets.
When writing manual code, I sometimes use G52 to shift the coordinate system so I can use numbers right off the drawing. Especially for hole patterns from another hole from a datum. To make the program more readable. (If it doesn't make the code more understandable don't bother.)
One thing to remember the local offset G52 is universal in effect. Whether it is used before fixture offset call or after. The G52 local offset shifts relative to all coordinate systems. So don't forget to cancel with the G52 X0 Y0 Z0, between calls.
And depending on the control G52 Z0 before tool changes. And any fixture offset during tool change Z value may need to be zero too. (On a Mark Century 1050 control once dropped 6" radius cutter because the Z value fixture offset I was using had a non-zero Z value. {suprise suprise} From that point on I used fixture offset pairs. One for machining and the second for tool change. Only the X and Y values would be the same.)
Safety - Quality - Production.