Commit 5b74988c 几米阳光

门锁增加验证

1 个父辈 c56f3fcd
...@@ -35,7 +35,6 @@ namespace OnlineStore.AutoInOutStore ...@@ -35,7 +35,6 @@ namespace OnlineStore.AutoInOutStore
inout = boxBean.Config.InOut_Axis; inout = boxBean.Config.InOut_Axis;
auto = boxBean.Config.Batch_Axis; auto = boxBean.Config.Batch_Axis;
InitializeComponent(); InitializeComponent();
txtComSpeed.Text = boxBean.Config.CompressAxis_EndSpeed.ToString();
this.Text = boxBean.StoreName + "_轴点动调试"; this.Text = boxBean.StoreName + "_轴点动调试";
} }
...@@ -47,11 +46,11 @@ namespace OnlineStore.AutoInOutStore ...@@ -47,11 +46,11 @@ namespace OnlineStore.AutoInOutStore
} }
private void FrmAxisDebug_Load(object sender, EventArgs e) private void FrmAxisDebug_Load(object sender, EventArgs e)
{ {
txtMiddleSpeed.Text = middle.TargetSpeed.ToString(); txtMiddleSpeed.Text = (middle.TargetSpeed / 5).ToString();
txtInOutSpeed.Text = inout.TargetSpeed.ToString(); txtInOutSpeed.Text = (inout.TargetSpeed / 5).ToString();
txtUpDownSpeed.Text = updown.TargetSpeed.ToString(); txtUpDownSpeed.Text = (updown.TargetSpeed / 5).ToString();
txtAutoSpeed.Text = auto.TargetSpeed.ToString(); txtAutoSpeed.Text = (auto.TargetSpeed / 5).ToString();
txtComSpeed.Text = StoreManager.Config.CompressAxis_EndSpeed.ToString(); txtComSpeed.Text = (StoreManager.Config.CompressAxis_EndSpeed / 5).ToString();
timer1.Start(); timer1.Start();
} }
/// <summary> /// <summary>
......
...@@ -299,14 +299,18 @@ namespace OnlineStore.AutoInOutStore ...@@ -299,14 +299,18 @@ namespace OnlineStore.AutoInOutStore
private void btnDOpen_Click(object sender, EventArgs e) private void btnDOpen_Click(object sender, EventArgs e)
{ {
KND.IOMove(IO_Type.BatchDoor_Close, IO_VALUE.LOW); if (AutomaticBaiting.CanOpenBatchDoor())
KND.IOMove(IO_Type.BatchDoor_Open, IO_VALUE.HIGH); {
AutomaticBaiting.BatchDoorOpen(false);
}
else
{
MessageBox.Show("忙碌中,无法打开门锁");
}
} }
private void btnDClose_Click(object sender, EventArgs e) private void btnDClose_Click(object sender, EventArgs e)
{ {
KND.IOMove(IO_Type.BatchDoor_Open, IO_VALUE.LOW); AutomaticBaiting.BatchDoorClose(false );
KND.IOMove(IO_Type.BatchDoor_Close, IO_VALUE.HIGH);
} }
private void btnSXi_Click(object sender, EventArgs e) private void btnSXi_Click(object sender, EventArgs e)
......
...@@ -1566,14 +1566,14 @@ namespace OnlineStore.AutoInOutStore ...@@ -1566,14 +1566,14 @@ namespace OnlineStore.AutoInOutStore
} }
private void BtnOpenDoor_Click(object sender, EventArgs e) private void BtnOpenDoor_Click(object sender, EventArgs e)
{ {
if (store.storeRunStatus.Equals(StoreRunStatus.Runing) && AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing)) if (AutomaticBaiting.CanOpenBatchDoor())
{ {
AutomaticBaiting.BatchDoorOpen(false); AutomaticBaiting.BatchDoorOpen(false);
AutomaticBaiting.IsNeedStartInout = false ; AutomaticBaiting.IsNeedStartInout = false ;
} }
else else
{ {
MessageBox.Show("当前忙碌中,无法进行此操作"); MessageBox.Show("忙碌中,无法打开门锁");
} }
} }
private void btnBatchInStore_Click(object sender, EventArgs e) private void btnBatchInStore_Click(object sender, EventArgs e)
...@@ -1581,7 +1581,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -1581,7 +1581,7 @@ namespace OnlineStore.AutoInOutStore
if (!AutomaticBaiting.DoorIsClose()) if (!AutomaticBaiting.DoorIsClose())
{ {
MessageBox.Show("请先关闭批量上下料门"); MessageBox.Show("请先关闭门锁");
return; return;
} }
...@@ -1593,7 +1593,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -1593,7 +1593,7 @@ namespace OnlineStore.AutoInOutStore
{ {
if (!AutomaticBaiting.DoorIsClose()) if (!AutomaticBaiting.DoorIsClose())
{ {
MessageBox.Show("请先关闭批量上下料门"); MessageBox.Show("请先关闭门锁");
return; return;
} }
AutomaticBaiting.BatchDoorClose(false); AutomaticBaiting.BatchDoorClose(false);
...@@ -1602,7 +1602,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -1602,7 +1602,7 @@ namespace OnlineStore.AutoInOutStore
} }
private void btnGetOutTray_Click(object sender, EventArgs e) private void btnGetOutTray_Click(object sender, EventArgs e)
{ {
if (store.storeRunStatus.Equals(StoreRunStatus.Runing) && AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing)) if (AutomaticBaiting.CanOpenBatchDoor())
{ {
if (AutomaticBaiting.BatchOutStoreCount > 0 && AutomaticBaiting.BatchOutStoreHeight > 0) if (AutomaticBaiting.BatchOutStoreCount > 0 && AutomaticBaiting.BatchOutStoreHeight > 0)
{ {
...@@ -1615,7 +1615,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -1615,7 +1615,7 @@ namespace OnlineStore.AutoInOutStore
} }
else else
{ {
MessageBox.Show("当前忙碌中,无法进行此操作"); MessageBox.Show("忙碌中,无法打开门锁");
} }
} }
......
...@@ -49,7 +49,10 @@ ...@@ -49,7 +49,10 @@
入库时,叉子深入料盘之后,开始下降时就给服务器发送入库位结束消息。 入库时,叉子深入料盘之后,开始下降时就给服务器发送入库位结束消息。
上下料过程中,不能开门。
批量上料过程中,不能开门。
批量出料过程中不能开门。
单个出库可以开门。
......
...@@ -290,9 +290,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -290,9 +290,9 @@ namespace OnlineStore.DeviceLibrary
InOutWatch.Restart(); InOutWatch.Restart();
string posId = param != null ? param.PositionNum : ""; string posId = param != null ? param.PositionNum : "";
string logMsg = IsBatchWork ? " 启动批量入库【" + posId + "】" : " 启动入库【" + posId + "】"; string logMsg = IsBatchWork ? " 启动批量入库【" + posId + "】" : " 启动入库【" + posId + "】";
if (!AutomaticBaiting.DoorStatus.Equals(2)) if (!AutomaticBaiting.DoorCloseOK())
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,批量上下料门未关闭"); LogUtil.error(LOGGER, StoreName + logMsg + " 出错,门锁未关闭");
return false; return false;
} }
if (storeRunStatus == StoreRunStatus.Runing) if (storeRunStatus == StoreRunStatus.Runing)
...@@ -554,9 +554,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -554,9 +554,9 @@ namespace OnlineStore.DeviceLibrary
InOutWatch.Restart(); InOutWatch.Restart();
string posId = param != null ? param.PositionNum : ""; string posId = param != null ? param.PositionNum : "";
string logMsg = IsBatchWork ? " 启动批量出库【" + posId + "】" : " 启动出库【" + posId + "】"; string logMsg = IsBatchWork ? " 启动批量出库【" + posId + "】" : " 启动出库【" + posId + "】";
if (!AutomaticBaiting.DoorStatus.Equals(2)) if (!AutomaticBaiting.DoorCloseOK())
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,批量上下料门未关闭"); LogUtil.error(LOGGER, StoreName + logMsg + " 出错,门锁未关闭");
return false; return false;
} }
if (storeRunStatus == StoreRunStatus.Runing) if (storeRunStatus == StoreRunStatus.Runing)
...@@ -813,7 +813,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -813,7 +813,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_08_ToDoorPosition); StoreMove.NextMoveStep(StoreMoveStep.SO_08_ToDoorPosition);
if (StoreMove.IsBatchInOutStore) if (StoreMove.IsBatchInOutStore)
{ {
OutStoreLog("出库:SO_08 升降轴到出料高点P2,旋转轴至P1(待机点) "); OutStoreLog("出库:SO_08 升降轴到出料高点P2,旋转轴至P1(待机点),等待门锁关闭 ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_OutHigh_P2, Config.UpDownAxis_P2_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_OutHigh_P2, Config.UpDownAxis_P2_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
BatchAxisUpTrayHeight(); BatchAxisUpTrayHeight();
...@@ -831,7 +831,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -831,7 +831,6 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_10_DeviceToDoor); StoreMove.NextMoveStep(StoreMoveStep.SO_10_DeviceToDoor);
OutStoreLog("出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) "); OutStoreLog("出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed); ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
//NeedCheckSafetyLight = 1;
} }
#endregion #endregion
......
...@@ -438,6 +438,36 @@ namespace OnlineStore.DeviceLibrary ...@@ -438,6 +438,36 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
public static bool DoorCloseOK()
{
if (DoorIsClose())
{
if (KND.IOValue(IO_Type.BatchDoor_Close).Equals(IO_VALUE.HIGH) && KND.IOValue(IO_Type.BatchDoor_Open).Equals(IO_VALUE.LOW))
{
return true;
}
}
return false;
}
/// <summary>
/// 是否可以打开门锁
/// </summary>
public static bool CanOpenBatchDoor()
{
if (!StoreMove.MoveType.Equals(StoreMoveType.None))
{
return false;
}
if (!StoreManager.Store.StoreMove.MoveType.Equals(StoreMoveType.None))
{
return false;
}
if (StoreManager.Store.storeRunStatus.Equals(StoreRunStatus.Runing) && AutoBaitingStatus.Equals(StoreRunStatus.Runing))
{
return true;
}
return false;
}
public static void BatchDoorOpen(bool isWait) public static void BatchDoorOpen(bool isWait)
{ {
ClearInOutInfo(); ClearInOutInfo();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!