Commit e4680c31 几米阳光

1

1 个父辈 a26aa0d0
...@@ -1564,11 +1564,11 @@ namespace OnlineStore.AutoInOutStore ...@@ -1564,11 +1564,11 @@ namespace OnlineStore.AutoInOutStore
} }
private void btnBatchInStore_Click(object sender, EventArgs e) private void btnBatchInStore_Click(object sender, EventArgs e)
{ {
if (AutomaticBaiting.DoorStatus.Equals(1)) //if (AutomaticBaiting.DoorStatus.Equals(2))
{ //{
MessageBox.Show("请先关闭批量上下料门"); // MessageBox.Show("请先关闭批量上下料门");
return; // return;
} //}
if (!AutomaticBaiting.DoorIsClose()) if (!AutomaticBaiting.DoorIsClose())
{ {
MessageBox.Show("请先关闭批量上下料门"); MessageBox.Show("请先关闭批量上下料门");
...@@ -1581,11 +1581,11 @@ namespace OnlineStore.AutoInOutStore ...@@ -1581,11 +1581,11 @@ namespace OnlineStore.AutoInOutStore
private void btnStartBatchInStore_Click(object sender, EventArgs e) private void btnStartBatchInStore_Click(object sender, EventArgs e)
{ {
if (AutomaticBaiting.DoorStatus.Equals(1)) //if (AutomaticBaiting.DoorStatus.Equals(1))
{ //{
MessageBox.Show("请先关闭批量上下料门"); // MessageBox.Show("请先关闭批量上下料门");
return; // return;
} //}
if (!AutomaticBaiting.DoorIsClose()) if (!AutomaticBaiting.DoorIsClose())
{ {
MessageBox.Show("请先关闭批量上下料门"); MessageBox.Show("请先关闭批量上下料门");
......
...@@ -156,6 +156,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -156,6 +156,11 @@ namespace OnlineStore.DeviceLibrary
{ {
wait.IsEnd = ACAxisMoveIsEnd(wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg); wait.IsEnd = ACAxisMoveIsEnd(wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg);
} }
if (!wait.IsEnd && (wait.AxisInfo.DeviceName.Equals(Config.Batch_Axis.DeviceName))&&wait.TargetPosition.Equals(Config.BatchAxis_P1))
{
wait.IsEnd = AutomaticBaiting.BatchAxisIsEnd(wait);
}
if (!msg.Equals("")) if (!msg.Equals(""))
{ {
isOk = false; isOk = false;
...@@ -304,7 +309,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -304,7 +309,8 @@ namespace OnlineStore.DeviceLibrary
StoreMove.IsNeedInStore = isNeedInStore; StoreMove.IsNeedInStore = isNeedInStore;
if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0)) if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0))
{ {
SI_02_Move(param.MoveP); //SI_02_Move(param.MoveP);
StoreMove.NextMoveStep(StoreMoveStep.SI_01_LocationCylinderDown);
} }
else else
{ {
...@@ -587,7 +593,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -587,7 +593,8 @@ namespace OnlineStore.DeviceLibrary
StoreMove.IsBatchInOutStore = IsBatchWork; StoreMove.IsBatchInOutStore = IsBatchWork;
if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0)) if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0))
{ {
SO_02_DeviceBack(); StoreMove.NextMoveStep(StoreMoveStep.SO_01_LocationCylinderDown);
//SO_02_DeviceBack();
} }
else else
{ {
...@@ -744,6 +751,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -744,6 +751,9 @@ namespace OnlineStore.DeviceLibrary
if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW)) if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW))
{ {
StoreMove.TimeOutSeconds = 120; StoreMove.TimeOutSeconds = 120;
//ACServerManager.AbsMove(Config.Batch_Axis.DeviceName, Config.Batch_Axis.GetAxisValue(), Config.BatchAxis_P1, Config.BatchAxis_P1_Speed);
//StoreMove.WaitList.Add(WaitResultInfo.WaitAxis(Config.Batch_Axis, Config.BatchAxis_P1, Config.BatchAxis_P1_Speed));
//Config.Batch_Axis.TargetPosition = Config.BatchAxis_P1;
ACAxisMove(Config.Batch_Axis, Config.BatchAxis_P1, Config.BatchAxis_P1_Speed); ACAxisMove(Config.Batch_Axis, Config.BatchAxis_P1, Config.BatchAxis_P1_Speed);
OutStoreLog("出库:SO_02 批量上下料轴走到P1点 "); OutStoreLog("出库:SO_02 批量上下料轴走到P1点 ");
} }
......
...@@ -130,7 +130,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -130,7 +130,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (wait.WaitType == 10) else if (wait.WaitType == 10)
{ {
wait.IsEnd = AutoAxisIsEnd(wait); wait.IsEnd = BatchAxisIsEnd(wait);
} }
else if (wait.WaitType == 11) else if (wait.WaitType == 11)
{ {
...@@ -241,8 +241,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -241,8 +241,12 @@ namespace OnlineStore.DeviceLibrary
} }
return wait.IsEnd; return wait.IsEnd;
} }
/// <summary>
private static bool AutoAxisIsEnd(WaitResultInfo wait) /// 判断批量上下轴是否运动完成
/// </summary>
/// <param name="wait"></param>
/// <returns></returns>
public static bool BatchAxisIsEnd(WaitResultInfo wait)
{ {
bool result = false; bool result = false;
if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH)) if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH))
......
...@@ -357,8 +357,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -357,8 +357,8 @@ namespace OnlineStore.DeviceLibrary
protected void ACAxisMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed) protected void ACAxisMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed)
{ {
StoreMove.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, targetPosition, targetSpeed)); StoreMove.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, targetPosition, targetSpeed));
moveAxis.TargetPosition = targetPosition; moveAxis.TargetPosition = targetPosition;
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition,targetSpeed); ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed);
} }
/// <summary> /// <summary>
...@@ -378,12 +378,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -378,12 +378,11 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
} }
bool isOk = ACServerManager.GetBusyStatus(deviceName, axisNo).Equals(0);
bool isOk = ACServerManager.GetBusyStatus(deviceName, axisNo).Equals(0);
int outCount = ACServerManager.GetActualtPosition(deviceName, axisNo); int outCount = ACServerManager.GetActualtPosition(deviceName, axisNo);
int errorCount = Math.Abs(outCount - targetPosition); int errorCount = Math.Abs(outCount - targetPosition);
if (isOk) if (isOk)
{ {
if (errorCount > moveAxis.CanErrorCountMax) if (errorCount > moveAxis.CanErrorCountMax)
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!