/******** 軸原點(diǎn)搜索*********//
IF HOME_COMMNDE_BIT AND (NOT AXIS_BUSY) AND (NOT AXIS_EROOR) AND (NOT AXIS_POSITION_DONE) AND(NOT AXIS_POSITION_MOVING) THEN
AXIS_POSITION_BUFFER:=9001;HOME_COMMNDE_TEMP:=TRUE;
ELSE
HOME_COMMNDE_TEMP:=FALSE;
END_IF;
//原點(diǎn)觸發(fā),軸不忙,軸無錯(cuò)誤,軸無定位完成,軸無定位啟動信號;
//******** 軸定位啟動*********//
IF POSITION_BIT AND (NOT AXIS_BUSY) AND (NOT AXIS_EROOR) AND (NOT AXIS_POSITION_DONE) AND(NOT AXIS_POSITION_MOVING) THEN
AXIS_POSITION_BUFFER:=1;POSITION_TEMP:=TRUE;
ELSE
POSITION_TEMP:=FALSE;
END_IF;
//定位觸發(fā),軸不忙,軸無錯(cuò)誤,軸無定位完成,軸無定位啟動信號;
//******** 軸定位置位*********//
SET( (HOME_COMMNDE_TEMP OR POSITION_TEMP),AXIS_POSITION_MOVING);
//******** 軸定位復(fù)位*********//
RST((AXIS_POSITION_DONE OR AXIS_BUSY)AND AXIS_POSITION_MOVING AND (NOT AXIS_BUSY)),AXIS_POSITION_MOVING);