I completely support to your idea about posting solutions. Anybody can refer these code for their applications. This is my code to get coordinates:
Sub Main ()
Open "c:\TESTFILE.txt" For Output As #1 ' Open to write file.
oldX = GetOEMDRO (800)
oldY = GetOEMDRO (801)
oldZ = GetOEMDRO (802)
Write #1, oldX , oldY, oldZ
While GetUserLED (1005)
newx = GetOEMDRO (800)
newy = GetOEMDRO (801)
newz = GetOEMDRO (802)
if oldX <> newX or oldY <> newY or oldZ <> newZ Then
oldX = newX
oldY = newY
oldZ = newZ
Write #1, oldX , oldY, oldZ
End If
Wend
Close #1
End Sub
Thank you for your helps
Best Regards
Van Sy