I think I've looked everywhere (obviously not)
I'm trying to press a button to zero my grinding wheel, then it changes the offset to suit, as per below:
1 Set grinding wheel at zero (approx -37.3 in machine coords) (I've successfully done this)
2 press button ZERO WHEEL (I've successfully done this)
3 changes to machine coords (I can't work out how to do this, at the moment I'm doing this manually)
4 copy's the value in machine coords to a second DRO, but a positve value. (I've got it copying, just not in a positive value)
5 change back to work coords (I can't work out how to do this, at the moment I'm doing this manually)
6 Moves out to home switch (I've successfully done this)
7 Copies the value from the second DRO into the work coords (I've successfully done this)
8 Voilla!!
I'm trying to take a negative value from one DRO and put the same value into another DRO, but a positive value.
The way I do this on a cnc is as follows, I'm just can't get the syntax correct for VB.
#1=-10.00
X[#1-[#1*2]]
This is as far as I've gotten
'change to machine coords here
y=GetDRO(1)
While IsMoving()
Wend
SetOEMDRO(1202,y)
'change to work coords here
DoButton( 23 )
While IsMoving()
Wend
y=GetUserDRO(1202)
CODE "G92Y" &y
Thanks