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