
建议用MC_HALT来实现的。
下面是一个参考程序:
(*变量声明:*)
PROGRAM MAIN
VAR
abosolute:mc_moveabsolute;
axis1:axis_ref;
power:mc_power;
bExcute: BOOL;
halt:mc_stop;
halt_excute: BOOL;
enable: BOOL;
END_VAR
(*程序:*)
power(
Axis:=axis1 , 
Enable:=enable , 
Enable_Positive:= TRUE, 
Enable_Negative:= TRUE, 
);
abosolute(
Axis:= axis1, 
Execute:=bExcute , 
Position:=1000 , 
Velocity:=5 , 
 );
halt(
Axis:= axis1, 
Execute:= halt_excute, 
 );