Commit 65f4f104 LN

进出轴回待机点需要判断原点信号亮

1 个父辈 80958fa8
......@@ -91,13 +91,16 @@ namespace OnlineStore.DeviceLibrary
//判断是否在P1,如果是,不需要运行
int outCount = ACServerManager.GetActualtPosition(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
int errorCount = Math.Abs(outCount - InOut_P1);
if (errorCount <= Config.InOut_Axis.CanErrorCountMin)
//需要判断原点信号
int org = ACServerManager.GetHomeSingle(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
if (errorCount <= Config.InOut_Axis.CanErrorCountMin && org.Equals(1))
{
LogUtil.info("进出轴当前位置:" + outCount + ",已经在P1,不需要再回P1");
}
else
{
ACAxisMove(Config.InOut_Axis, InOut_P1, Config.InOutAxis_P1_Speed);
StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis, IO_VALUE.HIGH));
}
//StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis,IO_VALUE.HIGH));
}
......@@ -167,6 +170,18 @@ namespace OnlineStore.DeviceLibrary
{
wait.IsEnd = (span.TotalMilliseconds >= wait.TimeMSeconds);
}
else if (wait.WaitType == 5)
{
//string msg = "";
//wait.IsEnd = ShuoKeIsEnd(wait, out msg);
// NotOkMsg = NotOkMsg +" "+ msg;
wait.IsEnd = false;
}else if (wait.WaitType == 6)
{
IO_VALUE value = (IO_VALUE)ACServerManager.GetHomeSingle(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue());
wait.IsEnd = wait.IoValue.Equals(value);
}
else if (wait.WaitType == 7)
{
wait.IsEnd = (wait.HeightValue.Equals(GetHeight()));
......@@ -175,13 +190,6 @@ namespace OnlineStore.DeviceLibrary
LogUtil.debug("等待height=" + wait.HeightValue + "完成");
}
}
else if (wait.WaitType == 5)
{
//string msg = "";
//wait.IsEnd = ShuoKeIsEnd(wait, out msg);
// NotOkMsg = NotOkMsg +" "+ msg;
wait.IsEnd = false;
}
if (wait.IsEnd)
{
if (StoreMove.OneWaitCanEndStep)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!