案例/模板说明 ============================ CartMove模板 ++++++++++++++++++++++++++++++++ 以下为机械臂主控CartMove模板程序,注意对工控机返回的 error_code 进行判断。 CartMove基本模板: XYZCartMoveBasicTpl.JBI CartMove二次定位模板:XYZCartMoveRepoTpl.JBI TrajMove模板 ++++++++++++++++++++++++++++++++ .. code-block:: /JOB //NAME XYZMasterTaskTest //POS ///NPOS 0,0,0,0,0,0 //INST ///DATE 2022/11/05 09:40 ///ATTR SC,RW ///GROUP1 RB1 ///LVARS 5,12,5,5,5,5,0,0 NOP ' 以上为编辑程序过程中,自动生成的内容 ' init 机械臂主控初始化 CALL JOB:XYZMasterInit ' ' connect to server 连接机械臂主控 server CALL JOB:XYZMasterConnect ARGF"192.168.37.101" ARGF11111 ' ' ' switch_strat 请求切换策略 ' set strat_name 设定策略名 SET S004 "strat1" CALL JOB:XYZMasterProcCmd ARGF522 IFTHENEXP I011<>0 MSG "switch_obj NG" ABORT ENDIF ' ' ' req_pick_place 请求pick和place规划 SET I003 0 CALL JOB:XYZMasterProcCmd ARGF517 IFTHENEXP I011<>0 MSG "req_pick_place NG" ABORT ENDIF ' ' get_pick_in 获取取料入框轨迹 SET I003 0 CALL JOB:XYZMasterProcCmd ARGF518 IFTHENEXP I011<>0 MSG "get_pick_in NG" ABORT ENDIF ' check pose_type IFTHENEXP I014<>1 MSG "get_pick_in:pose_type NG" ABORT ENDIF ' 执行取料入框轨迹 CALL JOB:XYZMasterExecTraj ARGF518 ' ' get_pick_out 获取取料出框轨迹 SET I003 0 CALL JOB:XYZMasterProcCmd ARGF519 IFTHENEXP I011<>0 MSG "get_pick_out NG" ABORT ENDIF ' check pose_type IFTHENEXP I014<>1 MSG "get_pick_out:pose_type NG" ABORT ENDIF ' 执行取料出框轨迹 CALL JOB:XYZMasterExecTraj ARGF519 ' ' get_place_in 获取放料入框轨迹 SET I003 0 CALL JOB:XYZMasterProcCmd ARGF520 IFTHENEXP I011<>0 MSG "get_place_in NG" ABORT ENDIF ' check pose_type IFTHENEXP I014<>1 MSG "get_place_in:pose_type NG" ABORT ENDIF ' 执行放料入框轨迹 CALL JOB:XYZMasterExecTraj ARGF520 ' ' get_place_out 放料入框轨迹 SET I003 0 CALL JOB:XYZMasterProcCmd ARGF521 IFTHENEXP I011<>0 MSG "get_place_out NG" ABORT ENDIF ' check pose_type IFTHENEXP I014<>1 MSG "get_place_out:pose_type NG" ABORT ENDIF ' 执行放料出框轨迹 CALL JOB:XYZMasterExecTraj ARGF521 ' ' END