Commit 5b74988c 几米阳光

门锁增加验证

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