I have a custom program that reads text values to get its position.
This has been working fine, but I wanted to use custom Acceleration data for each tool the robot holds. When I placed an If Statement before the motion line the Robot is now stopping at each position rather than looking head. Is there anyway to fix this with a Switch Case or something else?
If I comment out the IF i_nToolID==5 then it works like normal. Just seems odd as there are other If statements within the code and only this one has an affect on the robot path.
Code
;IF i_nToolID==5 THEN
$VEL_EXTAX[1]=100
$ACC_EXTAX[1]=75
$ACC.CP=1
$ACC.ORI1=250
$ACC.ORI2=250
$APO.CDIS=50
$APO.CORI=25
;ELSE
; $VEL_EXTAX[1]=100
; $ACC_EXTAX[1]=100
; $ACC.CP=2.5
; $ACC.ORI1=500
;ENDIF
IF ((local_stVector.bCVel) AND NOT(stBUFF.nMovePointer==(stBUFF.nReadPointer)) AND (bIsScanning) AND (local_stVector.enDataCmd == #DATA_ON)) THEN
LIN local_stVector.e6pPosition C_VEL
ELSE
LIN local_stVector.e6pPosition
ENDIF
ENDIF
Display More