Commit 5cee8200 LN

夹爪修改:1:复位时清除报警同时调用停止方法。2.抓料时必须到位才能继续。

1 个父辈 1079c43d
......@@ -556,7 +556,7 @@ namespace OnlineStore.DeviceLibrary
wait.IsEnd = (span.TotalMilliseconds >= wait.TimeMSeconds);
} else if (wait.WaitType.Equals(WaitEnum.W004_ClampReached))
{
if (ClampJwa != null)
if ((ClampJwa != null) && (span.TotalSeconds > 1))
{
if (ClampJwa.IsReached())
{
......@@ -566,13 +566,24 @@ namespace OnlineStore.DeviceLibrary
wait.IsEnd = true;
}
}
int code = ClampJwa.GetErrorCode();
if (code > 0)
{
string msg = ClampJwa.config.Explain + " 错误码=" + code+",运动到位="+ ClampJwa.IsReached();
LogUtil.error(Name + msg, 999, 2);
}
}
} else if (wait.WaitType.Equals(WaitEnum.W005_WaitHasReel))
{
if (ClampJwa != null)
if ((ClampJwa != null )&& (span.TotalSeconds > 1))
{
wait.IsEnd = ClampJwa.HasReel();
if (wait.IsEnd && (ClampJwa.IsReached().Equals(false)))
{
string msg = ClampJwa.config.Explain + " 有料,但未到达目标,不能结束抓料";
LogUtil.error(Name + msg);
wait.IsEnd = false;
}
if ((!wait.IsEnd) && IsNoReelAlarm() && ClampEmptyMove)
{
LogUtil.info(Name + " 用户点击了:忽略夹爪有料信号,继续出入库动作");
......@@ -584,6 +595,12 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + " 无料,但在运动中,且运动到位,认为有料");
wait.IsEnd = true;
}
int code = ClampJwa.GetErrorCode();
if (code > 0)
{
string msg = ClampJwa.config.Explain + " 错误码=" + code + ",运动到位=" + ClampJwa.IsReached();
LogUtil.error(Name + msg,999,2);
}
////如果出力>=0.3,且已等待5秒
//float torque = ClampJwa.GetTorque();
//if ((!wait.IsEnd) && torque > 0.25 && span.TotalSeconds > 5)
......@@ -799,11 +816,11 @@ namespace OnlineStore.DeviceLibrary
{
if (baseConfig.DType.Equals(DeviceType.MoveEquip))
{
if (MoveInfo.MoveType.Equals(LineMoveType.InStore) && MoveInfo.MoveStep.Equals(LineMoveStep.MI_07_WaitHasReel))
if (MoveInfo.MoveType.Equals(LineMoveType.InStore) && MoveInfo.MoveStep.Equals(LineMoveStep.MI_08_WaitHasReel))
{
return true;
}
else if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && MoveInfo.MoveStep.Equals(LineMoveStep.MO_57_WaitHasReel))
else if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && MoveInfo.MoveStep.Equals(LineMoveStep.MO_58_WaitHasReel))
{
return true;
}
......@@ -821,5 +838,6 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
}
}
......@@ -226,6 +226,7 @@ namespace OnlineStore.DeviceLibrary
if (rmaxis != null && rmaxis.IsPortOpen)
{
rmaxis.ResetError();
rmaxis.StopAxis();
}
}
public int GetErrorCode()
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!