Commit 37feaee7 几米阳光

等待条件添加结果记录

1 个父辈 98df55ac
......@@ -115,7 +115,7 @@ namespace OnlineStore.DeviceLibrary
string msg = "";
if (wait.IsHomeMove)
{
if ((!ACHomeMoveIsEnd(wait.AxisInfo,out msg)))
if (wait.IsEnd.Equals(false) && (!ACHomeMoveIsEnd(wait.AxisInfo, out msg)))
{
if (!msg.Equals(""))
{
......@@ -125,10 +125,15 @@ namespace OnlineStore.DeviceLibrary
isOk = false;
break;
}
else
{
wait.IsEnd = true;
}
}
else
{
if (!wait.IsEnd)
{
bool isEnd = ACAxisMoveIsEnd(wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg);
if (!msg.Equals(""))
{
......@@ -142,6 +147,11 @@ namespace OnlineStore.DeviceLibrary
isOk = false;
break;
}
else
{
wait.IsEnd = true;
}
}
}
}
else if (wait.WaitType == 2)
......
......@@ -149,6 +149,7 @@ namespace OnlineStore.DeviceLibrary
wait.WaitType = 2;
wait.IoType = ioType;
wait.IoValue = ioValue;
wait.IsEnd = false;
return wait;
}
public static WaitResultInfo WaitAxis(ConfigMoveAxis axis,int targetPosition,int targetSpeed )
......@@ -160,6 +161,7 @@ namespace OnlineStore.DeviceLibrary
wait.IsHomeMove = false;
wait.TargetPosition = targetPosition;
wait.TargetSpeed = targetSpeed;
wait.IsEnd = false;
return wait;
}
public static WaitResultInfo WaitAxis(ConfigMoveAxis axis, bool isHomeMove)
......@@ -169,6 +171,7 @@ namespace OnlineStore.DeviceLibrary
wait.WaitType = 1;
wait.AxisInfo = axis;
wait.IsHomeMove = true;
wait.IsEnd = false;
return wait;
}
public static WaitResultInfo WaitStell(byte slvAddr, int targetPosition, int speed)
......@@ -180,6 +183,7 @@ namespace OnlineStore.DeviceLibrary
wait.IsHomeMove = false;
wait.TargetPosition = targetPosition;
wait.TargetSpeed = speed;
wait.IsEnd = false;
return wait;
}
public static WaitResultInfo WaitStellHome(byte slvAddr, int targetPosition, int speed)
......@@ -191,6 +195,7 @@ namespace OnlineStore.DeviceLibrary
wait.IsHomeMove = true;
wait.TargetPosition = 0;
wait.TargetSpeed = speed;
wait.IsEnd = false;
return wait;
}
public static WaitResultInfo WaitShuoKe(int slvAddr, int targetPosition, bool isHome)
......@@ -209,6 +214,7 @@ namespace OnlineStore.DeviceLibrary
wait.CanWhileMoveCount = 0;
wait.WaitType = 3;
wait.TimeMSeconds = MScends;
wait.IsEnd = false;
return wait;
}
public static WaitResultInfo WaitAxisOrg(ConfigMoveAxis axis,IO_VALUE value )
......@@ -219,6 +225,7 @@ namespace OnlineStore.DeviceLibrary
wait.AxisInfo = axis;
wait.IsHomeMove = true;
wait.IoValue = value;
wait.IsEnd = false;
return wait;
}
public string ToStr()
......@@ -299,7 +306,10 @@ namespace OnlineStore.DeviceLibrary
/// 轴目标速度
/// </summary>
public int TargetSpeed { get; set; }
/// <summary>
/// 是否已经结束
/// </summary>
public bool IsEnd{ get; set; }
}
public enum StoreMoveType
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!