Im working on a macro for fine tuning my A axis index points of 0, 90,180, 270. basically it accounts for pulley variation and encoder error. After the A axis is commanded to a position, the adjustment macro is called which starts with:
A = GetOEMDRO(803)
This part works fine and returns the value that is currently in A axis dro. Then i run through some if then statements to move the axis to corrected value. For example:
if A = 90 Then
code "G0 A89.9780" // calibrated position for exactly 90 degrees from 0
elseIf A = 180 Then
code "G0 A179.7803" // calibrated position for exactly 180 degrees from 0
etc.
Problem is, A = 90 and A = 180 etc isnt working. I also tried exactly as its shown in dro, like 90.0000, still doesnt work.
I tried using a range of more than and less then, which seems to work. for example:
If A < 90.01 And A > 89.99 Then
code "G0 A89.9780"
Why does it work this way but not when using "=" ?