Hello Guest it is December 06, 2024, 11:38:20 AM

Author Topic: Half the DRO  (Read 32577 times)

0 Members and 1 Guest are viewing this topic.

Re: Half the DRO
« Reply #30 on: February 13, 2013, 10:24:07 AM »
i put my stock on the mill(cnc). i find the center to cut a pocket(and drill any holes)
in the middle of stock.  any stock the is oversiized i cut on another mill(manual). some times i don't have a
big enough stock to just eyeball center.
Kenneth
Re: Half the DRO
« Reply #31 on: February 13, 2013, 11:17:36 AM »
guess what i'm saying is that after i find the edge of all four sides,
if i move to the center of the stock, i want the dro to read zero
on XY.
Thanks again for ALL ya'll help !
Kenneth

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • www.razordance.co.uk
Re: Half the DRO
« Reply #32 on: February 13, 2013, 11:44:25 AM »
 ;D ;D ;D ;D ;D ;D but that's exactly what the code I posted does.... it finds the centre and calls it 0,0  ;D ;D ;D ;D ;D
Re: Half the DRO
« Reply #33 on: February 13, 2013, 11:55:26 AM »
:):):)  but in the toolpath it shows the spindle at the lower-left.
if i go to zero, it's at the lower-left not the middle of the stock
Kenneth
Re: Half the DRO
« Reply #34 on: February 13, 2013, 11:59:42 AM »
i want the toolpath to look as the actual mill is working.
this way it may be cutting in the middle of the stock but
the toolpath is not moving as the mill
Kenneth
Re: Half the DRO
« Reply #35 on: February 13, 2013, 12:11:44 PM »
that script halves the X axis and then moves to zero.
but the zero is at bottom-left of stock, not center.
the work is set to half. so if i go to x3. i'll half that and move to
zero. and the dro is zero. but i got to mach coor it is 1.5.
so if i go to center of stock, dro says 1.5.

This has nothing to do with mach coords, you are using part coords ... an offset from mach coords.
Re: Half the DRO
« Reply #36 on: February 13, 2013, 12:19:11 PM »
i'm sorry i couldn't explain it better and i do appreciate ya'll time.
THANKS
Kenneth
Re: Half the DRO
« Reply #37 on: February 13, 2013, 02:40:52 PM »
do i really need the While ........ Wend ? the code works without it.
if it does something needed then i'll leave it there.

value = GetOEMDRO(800)  ' get value of X DRO
SetOEMDRO(800 , value / 2)  ' half X value
While IsMoving ( )
Wend
Code "G0 Z.5"  ' or inc. move to clear part
While IsMoving( )
Wend
Code "G0 X0" & x/2  ' move to center
End
Kenneth