Hi,
I am new to KRL. I want to save the $POS_ACT values which gives the current position of the robot in an array.
I tried this but its not working.
Code
NProbe = 0
LOOP
LIN{Y 0}
SEARCH($POS_ACT, TestArray[], NProbe)
LIN{Y 50}
SEARCH($POS_ACT, TestArray[], NProbe)
LIN{Y -50}
SEARCH($POS_ACT, TestArray[], NProbe)
ENDLOOP
DEF SEARCH(STARTPROBE:IN, TestArray:OUT, NProbe:OUT)
E6POS STARTPROBE
E6POS ENDPROBE
E6POS TestArray[]
INT NProbe
NProbe = NProbe + 1
;Enable the Interrupt
INTERRUPT ON 10
; ":" is geometric operator
ENDPROBE = STARTPROBE : {X 0, Y 0, Z -100, A 0, B 0, C 0}
;Move to max probe location
LIN ENDPROBE
TestArray[NProbe] = ENDPROBE
END
Display More