Good morning
I found on the web this "coordinate system rotation script" works very well, the
change I would like to do is this:
I have a webcam to find the tool center and from the tool center to the web center are
X = -50.050
Y = -76.250
is it possible to insert them at the end of the script?
since VB is zero every help is welcome!
'coordinate system rotation
dx = GetoemDRO( 800 )
dy = GetoemDRO( 801 )
Pi = atn( 1 ) * 4
If Abs( dx ) > Abs( dy ) Then ' horizontal, near X axis
angle = atn( dy / dx )
Else ' vertical, near Y axis
angle = atn( - dx / dy )
End If
angle = angle / Pi * 180
ret = MachMsg("A = " & roun(angle) & "° - set?", "Axis Rotation", 4)
If ret = 6 Then ' Yes
SetOEMDRO(118, angle) 'Code("G68X0Y0R" & angle)
dooembutton (1017) 'go to zero
dooembutton (160) ' regen toolpath
End If
Message("A = " & roun(angle) & "°")