马上注册,享受更多特权
您需要 登录 才可以下载或查看,没有帐号?立即注册 ![](source/plugin/zhanmishu_wechat/template/static/img/wechat_login.png)
x
IF 轴JOG速度<=0 THEN
轴JOG速度:=10;
END_IF
IF 绝对定位速度<=0 THEN
绝对定位速度:=20;
END_IF
IF 相对定位速度<=0 THEN
相对定位速度:=20;
END_IF
轴通讯检查(
Axis:=轴号 ,
bEnable:= TRUE,
bValid=>轴通信检查中 ,
bError=>轴通信错误 ,
eErrorID=>轴通信错误号 ,
bOperational=>轴通信正常 ,
eComState=> 轴通信状态,
wComState=>轴通信代码 );
IF 轴通信正常 THEN
获取当前位置(
Axis:=轴号 ,
Enable:=TRUE ,
Valid=> ,
Busy=> ,
Error=> ,
ErrorID=> ,
Position=> 轴当前位置);
END_IF
IF 轴复位启动 THEN
轴错误:= FALSE;
轴错误号:=0;
END_IF
伺服使能:= NOT 轴允许使能;
轴使能(
Axis:= 轴号,
Enable:=轴使能开启 ,
bRegulatorOn:=伺服使能 ,
bDriveStart:=TRUE,
Status=> 轴使能状态,
bRegulatorRealState=>轴许可结果 ,
bDriveStartRealState=>轴使能镜像 ,
Busy=>使能运行 ,
Error=>轴错误 ,
ErrorID=>轴使能错误号 );
轴复位(
Axis:=轴号 ,
Execute:=轴复位启动 ,
Done=> 轴复位完成,
Busy=> 轴复位完成,
Error=>轴复位错误 ,
ErrorID=>轴复位错误号 );
轴JOG(
Axis:=轴号 ,
JogForward:=轴JOG正 ,
JogBackward:=轴JOG负 ,
Velocity:=轴JOG速度 ,
Acceleration:=500 ,
Deceleration:=500 ,
Jerk:= ,
Busy=>轴JOG运行中 ,
CommandAborted=>轴JOG中止 ,
Error=>轴JOG错误 ,
ErrorId=>轴JOG错误号);
回原点(
Axis:=轴号 ,
Execute:= ,
Position:= ,
Done=> ,
Busy=>回原点中,
CommandAborted=>轴回原点中止 ,
Error=>轴回原点错误 ,
ErrorID=>轴回原点错误号
);
轴绝对定位(
Axis:= 轴号,
Execute:= 轴绝对定位启动,
Position:=绝对定位目标位置,
Velocity:=绝对定位速度 ,
Acceleration:=500 ,
Deceleration:=500 ,
Jerk:= ,
Direction:= ,
Done=>绝对定位完成 ,
Busy=>绝对运行中,
CommandAborted=>绝对定位中止 ,
Error=>绝对定位出错 ,
ErrorID=>绝对定位出错号 );
相对定位(
Axis:=轴号 ,
Execute:=轴相对定位启动 ,
Distance:=相对定位目标位置 ,
Velocity:=相对定位速度 ,
Acceleration:=500 ,
Deceleration:=500 ,
Jerk:= ,
Busy=>相对运行中 ,
CommandAborted=>轴相对定位中止 ,
Error=> 相对定位错误,
ErrorID=>相对定位错误号);
轴暂停(
Axis:=轴号 ,
Execute:=暂停启动 ,
Deceleration:= ,
Jerk:= ,
Done=> ,
Busy=>轴暂停中 ,
CommandAborted=> ,
Error=>轴错误 ,
ErrorID=> 轴暂停错误号);
轴运行中:=轴JOG运行中 OR 绝对运行中 OR 相对运行中 OR 轴暂停中;
IF 轴暂停错误号>0 THEN
轴错误号:=轴暂停错误号;
END_IF
IF 相对定位错误号>0 THEN
轴错误号:=相对定位错误号;
END_IF
IF 绝对定位出错号>0 THEN
轴错误号:=绝对定位出错号;
END_IF
IF 轴回原点错误号>0 THEN
轴错误号:=轴回原点错误号;
END_IF
IF 轴JOG错误号>0 THEN
轴错误号:=轴JOG错误号;
END_IF
IF 轴使能错误号>0 THEN
轴错误号:=轴使能错误号;
END_IF
IF 轴复位启动 THEN
轴错误:= FALSE;
轴错误号:=0;
END_IF
|