i have a code,simplified here:
DEF FinalXMLCMD( )
BAS (#INITMOV,0 )
$BWDSTART = FALSE
PDAT_ACT = {VEL 15,ACC 30,APO_DIST 50}
FDAT_ACT = {TOOL_NO 1,BASE_NO 1,IPO_FRAME #BASE}
BAS (#PTP_PARAMS,10)
PTP {A1 20, A2 -70, A3 132, A4 24, A5 -64, A6 29, E1 0, E2 0, E3 0, E4 0}
$VEL.CP=0.25
$APO.CDIS=1.5
$ADVANCE=0
PTP {E6POS: X 431.593, Y -203.802, Z 223.299, A 0, B 90, C 0, E1 0, E2 0, E3 0, E4 0, S 'B 110'} C_PTP
LIN {E6POS: X 431.593, Y -203.802, Z 223.299, A 0, B 90, C 0, E1 0, E2 0, E3 0, E4 0} C_DIS
RET=EKI_Init("FinalXMLCMD")
RET=EKI_Open("FinalXMLCMD")
EKI_CHECK(RET,#QUIT)
INTERRUPT DECL 89 WHEN $FLAG[998]==TRUE DO InterMove()
WHILE GIsLoop
INTERRUPT ON 89
MyWait()
INTERRUPT OFF 89
ENDWHILE
RET=EKI_Close("FinalXMLCMD")
RET=EKI_Clear("FinalXMLCMD")
END
;;=======================================
DEF MyWait()
WAIT SEC 0.1
END
;;=======================================
DEF InterMove()
FRAME valueFrame
valueFrame={X 0.0,Y 0.0,A 0.0,B 0.0,C 0.0}
$FLAG[998]=FALSE
brake
valueFrame.Z=100
LIN_REL valueFrame
resume
WAIT SEC 0
END
Display More
when i make flag998 true(by send xml to robot),the robot will move up 100mm(it takes maybe 2 seconds),and when robot finish moving(it means i must wait 2 seconds later),when the robot is stop,then i send another xml to robot to make flag998 on,the robot will move another 100mm in Z,it is as i expected.no problem.
but......if i send another xml before robot finishing moving up 100mm(i hope to brake the previous Z moving,and begin a new 100mm up),the robot will still moving untill the previous 100mm up moving is finished,then,robot will not go another 100mm up moving,and stop there refuse to moving any more(even i send xml to make flag998 true,robot will no move again...)......(so the only thing i can do is to restart the src file)
any one can help?thank you very much!