Commit 4e503307 LN

入料机构出现轴报警或急停时自动切换到调试模式并停止运动。

1 个父辈 ef768e00
......@@ -70,9 +70,19 @@ namespace OnlineStore.DeviceLibrary
if (alarmType.Equals(LineAlarmType.SuddenStop) || alarmType.Equals(LineAlarmType.NoAirCheck)
||alarmType.Equals(LineAlarmType.AxisAlarm)||alarmType.Equals(LineAlarmType.AxisMoveError))
{
if (baseConfig.DType.Equals(DeviceType.FeedingEquip))
{
//如果是入料机构,轴报警是直接停止并自动切换为调试模式,防止托盘卡
LogInfo("报警类型:"+ alarmType + ",自动停止运行并切换为调试模式,防止托盘卡 ");
LineManager.Line.FeedingEquipMap[DeviceID].ChangeDebug(true);
StopRun();
}
else
{
StopMove();
}
}
}
public virtual void CheckAlarmProcess(LineMoveInfo moveInfo,LineAlarmType alarmType)
{
......
......@@ -959,5 +959,25 @@ namespace OnlineStore.DeviceLibrary
{
return "" + LastWidth + "X" + LastHeight + "=" + lastcode + "";
}
public virtual void ChangeDebug(bool isDebug)
{
if (isDebug)
{
IsDebug = true;
Config.IsDebug = 1;
LineManager.SaveFeedingEquipConfig(Config);
LogInfo("用户切换到调试状态 ");
}
else
{
IsDebug = false;
Config.IsDebug = 0;
LineManager.SaveFeedingEquipConfig(Config);
LogInfo("用户切换到正常工作状态 ");
}
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!