Provided your machine can call a subprogram with a loop count you can reposition your work zero using an incremental G10 command.
For simplicity make the location of the first hole your G54 work zero location which means your hole interpolation code works from X0. Y0. also put your interpolation code in a subprogram numbered O1000 for instance.
Now set G54 and call the subprogram M98 P1000 (or O dependning on the machine); this does the first hole.
The next line has the G10 command to move the G54 location and then call the subprogram L times.
G10 L2 G91 P1 X-2. M98 P1000 L4
This steps along doing the interpolation and a 2" spacing in X four times and counting your first one gives you five holes.
Of course you need to always reset your G54 when the program first starts so you have an absolute G10 right at the beginning which sets the G54 location.


LinkBack URL
About LinkBacks






