马上注册,享受更多特权
您需要 登录 才可以下载或查看,没有帐号?立即注册 ![](source/plugin/zhanmishu_wechat/template/static/img/wechat_login.png)
x
本帖最后由 loopsun 于 2021-10-25 11:36 编辑
1. 拓扑
AM600---SV660N---400W伺服
2. 程序
MC_MoveVelocity功能块控制轴运行
3. 遇到问题
无法在运行过程中调整伺服轴转速
- PDO设置
![](data/attachment/album/202110/21/092753r8tv2hvipp8c4j2o.png)
- 全局变量状态,此时速度已经变更为200
![](data/attachment/album/202110/21/092830tq2jb1asxitftj2x.png)
- 监控数据,监控返回的轴速度依然在100
![](data/attachment/album/202110/21/092902wch2jgivvjuqgepe.png)
- 功能块监控,速度已赋值给功能块内部变量
![](data/attachment/album/202110/21/093022xnwh8v84o5x4kow0.png)
![](data/attachment/album/202110/21/093157pfvpwvuwf0tlhpvd.png)
4. 程序
附件:
1.PLC端程序.zip
5. 解决方案
IF f_saveVel <> g_xVel THEN
Vel_TON1_IN := TRUE;
Vel_TON1(IN := Vel_TON1_IN, PT := T#100MS, Q => g_xVelExcute);
END_IF
Vel_TON2(IN := g_xVelExcute, PT := T#200MS);
IF Vel_TON2.Q THEN
Vel_TON1_IN := FALSE;
g_xVelExcute := FALSE;
f_saveVel := g_xVel;
END_IF
//速度运行
HMC_MoveVelocity_OBJ(
Axis:= Master,
xEnable:= g_xVelExcute,
fVelocity:= g_xVel,
fAcceleration:= g_xVel / 10.0,
fDeceleration:= g_xVel / 10.0,
fJerk:= ,
eDirection:= g_MasterDir,
xInVelocity=> g_xInVel,
xBusy=> ,
xAborted=> ,
xError=> ,
eErrorID=> );
|