//*************************阵列取料算法*************************************//RTRIG_XY[0](Clk:=S12.Condition[70]);//触发计数IF RTRIG_XY[0].Q THEN nstate_XY[0]:=nstate_XY[0]+1;//X计数加1END_IF;IF nstate_XY[0]>=INT#5 THEN//阵列行数递增 nstate_XY[0]:=INT#0; nstate_XY[1]:=nstate_XY[1]+1;END_IF;IF nstate_XY[1]>=INT#2 THEN//料盘取完标志 nstate_XY[0]:=INT#0; nstate_XY[1]:=INT#0; S12.Condition[72]:=TRUE;END_IF;
HMI_Axis[11].AbsPos[10]:=HMI_Axis[11].AbsPos[1]+X_offset[0]*nstate_XY[0];//X取料位置HMI_Axis[17].AbsPos[10]:=HMI_Axis[17].AbsPos[1]+Y_offset[0]*nstate_XY[1];//Y取料位置