Hello Guest it is December 07, 2024, 09:06:18 PM

Author Topic: Half the DRO  (Read 32593 times)

0 Members and 1 Guest are viewing this topic.

Re: Half the DRO
« Reply #20 on: February 13, 2013, 07:00:55 AM »
shouldn't the USER DRO move as the OEM DRO ?
as i jog the table, the user's doesn't change.
don't sound right to me boss :)
Kenneth
Re: Half the DRO
« Reply #21 on: February 13, 2013, 07:40:11 AM »
it havles it but when i half it gose to x =2 from 4 but the table didn't move.
Are you expecting the axis to actually move ?
If so, you will have to add to the button script.
Like:
value = GetOEMDRO(800)
SetOEMDRO(800 , value / 2)
While IsMoving
Wend (needed here maybe)
Code "G0 Z0"  (or inc. move to clear part)
While IsMoving
Wend
Code "G0 X0"  (move to center)
End
No, the user dro will not show movement as you jog, it only updates when the button is pressed.


Re: Half the DRO
« Reply #22 on: February 13, 2013, 07:47:21 AM »
what i'm trying to do is....
touch edge of stock on one side and zero dro.
move to other side of stock,touch egde then half dro so that when i move to
center of stock dro reads zero.
Kenneth
Re: Half the DRO
« Reply #23 on: February 13, 2013, 09:04:04 AM »
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.
Kenneth

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • www.razordance.co.uk
Re: Half the DRO
« Reply #24 on: February 13, 2013, 09:25:04 AM »
Kenneth - with respect if I understand your requirements correctly I'd suggest you're going about this in a rather tortured way.

Why not...

touch off one side - zero that DRO
touch off the other side and then have simple button code to...

raise to safe Z
move to the mid point
zero the axis

job done - one button - no DROs - simples.

Ian
Re: Half the DRO
« Reply #25 on: February 13, 2013, 09:29:25 AM »
that's what i been looking for just didn't know what to
use to get it done :)
Kenneth
Re: Half the DRO
« Reply #26 on: February 13, 2013, 09:42:13 AM »
how do i use the value of SetOEMDRO?
code " g0 x(SetOEMDRO) "
Kenneth

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • www.razordance.co.uk
Re: Half the DRO
« Reply #27 on: February 13, 2013, 09:45:11 AM »
OK I think maybe this is the common problem of folks asking how to implement THEIR solution rather than asking for A solution to a problem. No worries - happens all the time. ;D

Put the following code into the button of your choice...
Code: [Select]
X = getOEMDRO(800)
If X <> 0 Then 'x has changed
  Code "G0 X" & X/2
Else
  Y = getOEMDRO(801)
  If Y <> 0 Then 'y has changed
    Code "G0 Y" & Y/2
  End If
End If

and then do this...

1) touch off your first side and zero both X and Y via the buttons next to the axis DROs
2) touch off your other side AND THEN RAISE Z to a SAFE HEIGHT
3) hit the button. The axis will move to the mid-point and show its coordinate of course in the DRO
4) Zero the DRO

Of course this could be automated even more and various safeguards put in place but it's a starter.

My usual terms & conditions - you use this code at your own risk - if it breaks anything including your heart you get to keep the pieces.

If you want to try it BEFORE you stick it in a button just run it from the CB editor.

Ian
Re: Half the DRO
« Reply #28 on: February 13, 2013, 10:07:51 AM »
thanks stirling
when i run that. xy go to half and when i zero the axis, the display in toolpath gose to
lower-left position. not the center of stock. in my test i did g0x2. it went to x1 and stopped.
i zeroed the axis and the spendle moved to lower-left and the table stayed at x1.
Kenneth

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • www.razordance.co.uk
Re: Half the DRO
« Reply #29 on: February 13, 2013, 10:10:18 AM »
Well it will because you've zero'd in the centre of the stock!

maybe you need to rewind and explain again WHY you want to position the tool in the centre of the stock