程序

Axis1_Power(
Axis:=Axis1,
Enable:= ,
Enable_Positive:=TRUE ,
Enable_Negative:= TRUE,
Override:= 100,
BufferMode:= ,
Options:= ,
Status=> ,
Busy=> ,
Active=> ,
Error=> ,
ErrorID=> );


Axis1_Move(
Axis:=Axis1 ,
Execute:= ,
Distance:= ,
Velocity:= 100,
Acceleration:= ,
Deceleration:= ,
Jerk:= ,
BufferMode:= ,
Options:= ,
Done=> ,
Busy=> ,
Active=> ,
CommandAborted=> ,
Error=> ,
ErrorID=> );

IF Motor_Enable THEN

Axis1_Power.Enable:=TRUE;
END_IF(http://www.amjmh.com)

Axis1_Move.Execute:=FALSE;
IF Motor_CW AND Motor_Enable THEN
Axis1_Move.Distance:=50;
Axis1_Move.Execute:=TRUE;
Motor_CCW:=FALSE;
END_IF


IF Motor_CCW AND Motor_Enable THEN
Axis1_Move.Distance:=-50;
Axis1_Move.Execute:=TRUE;
Motor_CW:=FALSE;
END_IF

IF Axis1_Move.Busy THEN

Motor_State:=TRUE;
ELSE
Motor_State:=FALSE;
Motor_CW:=FALSE;
Motor_CCW:=FALSE;

END_IF

posted on 2019-09-08 21:10  激流勇进1  阅读(189)  评论(0编辑  收藏  举报