Commit 8e3f0ffb LN

工位报警分开处理

1 个父辈 3220004e
...@@ -162,6 +162,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -162,6 +162,7 @@ namespace OnlineStore.DeviceLibrary
RFIDManager.Open(); RFIDManager.Open();
//RFIDManager.Open(new string[] { Config.RFID_IP1, Config.RFID_IP2, Config.RFID_IP3 }); //RFIDManager.Open(new string[] { Config.RFID_IP1, Config.RFID_IP2, Config.RFID_IP3 });
lineConn.StartConnect(); lineConn.StartConnect();
WarnMsg = "";
ReturnHome(); ReturnHome();
StartTime = DateTime.Now; StartTime = DateTime.Now;
...@@ -996,7 +997,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -996,7 +997,7 @@ namespace OnlineStore.DeviceLibrary
} }
public string GetMoveStr() public string GetMoveStr()
{ {
string msg = LineConnect.DoorPosInfo?.ToStr() + "\r\n"; string msg = LineConnect.DoorPosInfo?.ToStr() + "\r\n" + "料架信息:" + CurrTray?.ToStr()+"\r\n";
foreach (WorkStation shelf in StationMap.Values) foreach (WorkStation shelf in StationMap.Values)
{ {
...@@ -1058,6 +1059,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -1058,6 +1059,10 @@ namespace OnlineStore.DeviceLibrary
lastConTime = DateTime.Now; lastConTime = DateTime.Now;
try try
{ {
if (IsDebug)
{ }
else
{
if (lineConn.IsConnect()) if (lineConn.IsConnect())
{ {
int hasTray = (int)IOValue(IO_Type.TrayCheck_Door); int hasTray = (int)IOValue(IO_Type.TrayCheck_Door);
...@@ -1069,7 +1074,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1069,7 +1074,7 @@ namespace OnlineStore.DeviceLibrary
StoreSendBean store = lineConn.GetBean((int)ss, (int)storeRunStatus, hasTray, (int)alarmType); StoreSendBean store = lineConn.GetBean((int)ss, (int)storeRunStatus, hasTray, (int)alarmType);
lineConn.SendHeart(store); lineConn.SendHeart(store);
} }
}
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -1128,6 +1133,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -1128,6 +1133,13 @@ namespace OnlineStore.DeviceLibrary
{ {
isNeedAlarmLed = true; isNeedAlarmLed = true;
} }
foreach(WorkStation station in StationMap.Values)
{
if (station.alarmType.Equals(StoreAlarmType.None).Equals(false))
{
isNeedAlarmLed = true;
}
}
} }
//黄灯 //黄灯
......
...@@ -21,6 +21,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -21,6 +21,8 @@ namespace OnlineStore.DeviceLibrary
private string rfidIp = ""; private string rfidIp = "";
public ShelfInfo CurrShelf = new ShelfInfo(); public ShelfInfo CurrShelf = new ShelfInfo();
public int StationId = 0; public int StationId = 0;
public string WarnMsg = "";
public StoreAlarmType alarmType = StoreAlarmType.None;
public WorkStation(int id,string name,string agvName,string rfidip) public WorkStation(int id,string name,string agvName,string rfidip)
{ {
this.rfidIp = rfidip; this.rfidIp = rfidip;
...@@ -47,6 +49,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -47,6 +49,10 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
if (!alarmType.Equals(StoreAlarmType.None))
{
return false;
}
if (CheckShelf(IO_VALUE.HIGH)) if (CheckShelf(IO_VALUE.HIGH))
{ {
if (!CurrShelf.IsNeedLeave && (!String.IsNullOrEmpty(CurrShelf.RealShelf)) && LocationIsUp()) if (!CurrShelf.IsNeedLeave && (!String.IsNullOrEmpty(CurrShelf.RealShelf)) && LocationIsUp())
...@@ -88,15 +94,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -88,15 +94,15 @@ namespace OnlineStore.DeviceLibrary
CurrShelf = new ShelfInfo(rfid); CurrShelf = new ShelfInfo(rfid);
return CurrShelf.RealShelf; return CurrShelf.RealShelf;
} }
private void ClearShelfId()
{
CurrShelf = new ShelfInfo();
}
public void Reset() public void Reset()
{ {
if (IsDis()) if (IsDis())
{ {
alarmType = StoreAlarmType.None;
WarnMsg = "";
MoveInfo.EndMove();
return; return;
} }
if (CurrShelf.IsBusy) if (CurrShelf.IsBusy)
...@@ -104,7 +110,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -104,7 +110,8 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + "复位失败,料架忙碌中"); LogUtil.error(Name + "复位失败,料架忙碌中");
return ; return ;
} }
alarmType = StoreAlarmType.None;
WarnMsg = "";
MoveInfo.EndMove(); MoveInfo.EndMove();
MoveInfo.NewMove(StoreMoveType.StoreReset); MoveInfo.NewMove(StoreMoveType.StoreReset);
MoveInfo.NextMoveStep(MoveStep.SR_01_LocationDown); MoveInfo.NextMoveStep(MoveStep.SR_01_LocationDown);
...@@ -116,7 +123,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -116,7 +123,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (MoveInfo.IsInWait) if (MoveInfo.IsInWait)
{ {
EquipManager.Equip.CheckWait(MoveInfo); CheckWait(MoveInfo);
} }
if (MoveInfo.IsInWait) if (MoveInfo.IsInWait)
{ {
...@@ -154,7 +161,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -154,7 +161,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (CheckShelf(IO_VALUE.LOW)) else if (CheckShelf(IO_VALUE.LOW))
{ {
ClearShelfId(); CurrShelf = new ShelfInfo();
LogUtil.info(Name + "复位完成,当前无料架"); LogUtil.info(Name + "复位完成,当前无料架");
MoveInfo.EndMove(); MoveInfo.EndMove();
} }
...@@ -172,7 +179,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -172,7 +179,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (CheckShelf(IO_VALUE.LOW)) else if (CheckShelf(IO_VALUE.LOW))
{ {
ClearShelfId(); CurrShelf = new ShelfInfo();
LogUtil.info(Name + "复位完成,当前无料架"); LogUtil.info(Name + "复位完成,当前无料架");
MoveInfo.EndMove(); MoveInfo.EndMove();
} }
...@@ -297,6 +304,124 @@ namespace OnlineStore.DeviceLibrary ...@@ -297,6 +304,124 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
#region 出料结果验证
private DateTime preRWTime = DateTime.Now;
public void CheckWait(StoreMoveInfo checkmove)
{
List<WaitResultInfo> list = checkmove.WaitList;
//当等待超过一分钟时,需要打印提示
TimeSpan span = DateTime.Now - checkmove.LastSetpTime;
string NotOkMsg = "";
if (list.Count <= 0)
{
checkmove.EndStepWait();
return;
}
bool isOk = true;
if (checkmove.OneWaitCanEndStep)
{
isOk = false;
}
foreach (WaitResultInfo wait in list)
{
if (wait.IsEnd)
{
continue;
}
NotOkMsg = wait.ToStr();
if (wait.WaitType == 1)
{
}
else if (wait.WaitType == 2)
{
wait.IsEnd = EquipManager.Equip.IOValue(wait.IoType).Equals(wait.IoValue);
int timeOutMs = EquipManager.Equip.Config.IOSingle_TimerOut;
if ((!wait.IsEnd) && span.TotalMilliseconds > timeOutMs)
{
ConfigIO io = EquipManager.Equip.Config.getWaitIO(wait.IoType);
WarnMsg = Name + "[" + checkmove.MoveType + "][" + checkmove.MoveStep + "] 等待" + io.DisplayStr + "=" + wait.IoValue + "超时 ";
if (WarnMsg.Contains("Check_Pos") || WarnMsg.Contains("X03_点检"))
{
WarnMsg = "";
break;
}
alarmType = StoreAlarmType.IoSingleTimeOut;
LogUtil.error(Name + wait.IoType + "等待信号(" + io.DisplayStr + "=" + wait.IoValue + ") 超时", 14);
isOk = false;
break;
}
TimeSpan rwSpan = DateTime.Now - preRWTime;
if (!wait.IsEnd && rwSpan.TotalSeconds > 5 && span.TotalSeconds > 6)
{
preRWTime = DateTime.Now;
string msg = Name + " " + NotOkMsg + "已等待 " + Math.Abs(span.TotalSeconds) + "秒,重写DO:";
bool isLog = false;
foreach (WaitResultInfo ww in list)
{
if (ww != null && ww.WaitType.Equals(2) && EquipManager.Equip.Config.DOList.ContainsKey(ww.IoType))
{
isLog = true;
EquipManager.Equip.IOMove(ww.IoType, ww.IoValue);
msg += ww.ToStr() + ",";
}
}
if (isLog)
{
LogUtil.error(msg);
}
isOk = false;
break;
}
}
else if (wait.WaitType == 3)
{
wait.IsEnd = (span.TotalMilliseconds >= wait.TimeMSeconds);
}
if (wait.IsEnd)
{
if (checkmove.OneWaitCanEndStep)
{
isOk = true;
break;
}
}
else
{
if (!checkmove.OneWaitCanEndStep)
{
isOk = false;
break;
}
}
}
if (isOk)
{
checkmove.EndStepWait();
}
else if (span.TotalSeconds > checkmove.TimeOutSeconds)
{
WarnMsg = Name + "[" + checkmove.MoveType + "][" + checkmove.MoveStep + "] 等待超时 [" + NotOkMsg
+ "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒";
if (WarnMsg.Contains("Check_Pos") || WarnMsg.Contains("X03_点检"))
{
WarnMsg = "";
return;
}
LogUtil.error(WarnMsg, 100);
alarmType = StoreAlarmType.IoSingleTimeOut;
}
}
private static DateTime lastComRHomeTime = DateTime.Now;
#endregion
#region AGV #region AGV
...@@ -445,7 +570,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -445,7 +570,7 @@ namespace OnlineStore.DeviceLibrary
ProcessShelfOut = false; ProcessShelfOut = false;
LogUtil.info(logName + ",停止转动,清空"+CurrShelf.ToStr()+", 结束"); LogUtil.info(logName + ",停止转动,清空"+CurrShelf.ToStr()+", 结束");
ClearShelfId(); CurrShelf = new ShelfInfo();
} }
catch (TimeoutException te) catch (TimeoutException te)
...@@ -470,7 +595,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -470,7 +595,7 @@ namespace OnlineStore.DeviceLibrary
string logName = Name + "AGV料架进入 [" + AgvName + "] "; string logName = Name + "AGV料架进入 [" + AgvName + "] ";
try try
{ {
ClearShelfId(); CurrShelf = new ShelfInfo();
LogUtil.info(logName + " 开始,设置状态=MayEnter"); LogUtil.info(logName + " 开始,设置状态=MayEnter");
AgvClient.SetStatus(AgvName, "", ClientAction.MayEnter, ClientLevel.High, true); AgvClient.SetStatus(AgvName, "", ClientAction.MayEnter, ClientLevel.High, true);
ProcessShelfEnter = true; ProcessShelfEnter = true;
......
...@@ -176,6 +176,7 @@ ...@@ -176,6 +176,7 @@
// //
// tabPage2 // tabPage2
// //
this.tabPage2.Controls.Add(this.lblWarnMsg);
this.tabPage2.Controls.Add(this.chbMoveStop); this.tabPage2.Controls.Add(this.chbMoveStop);
this.tabPage2.Controls.Add(this.checkBox3); this.tabPage2.Controls.Add(this.checkBox3);
this.tabPage2.Controls.Add(this.checkBox2); this.tabPage2.Controls.Add(this.checkBox2);
...@@ -190,7 +191,6 @@ ...@@ -190,7 +191,6 @@
this.tabPage2.Controls.Add(this.groupBox2); this.tabPage2.Controls.Add(this.groupBox2);
this.tabPage2.Controls.Add(this.lblThisSta); this.tabPage2.Controls.Add(this.lblThisSta);
this.tabPage2.Controls.Add(this.chbDebug); this.tabPage2.Controls.Add(this.chbDebug);
this.tabPage2.Controls.Add(this.lblWarnMsg);
this.tabPage2.Location = new System.Drawing.Point(4, 29); this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(988, 594); this.tabPage2.Size = new System.Drawing.Size(988, 594);
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
this.btnS3Reset.BackColor = System.Drawing.Color.White; this.btnS3Reset.BackColor = System.Drawing.Color.White;
this.btnS3Reset.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnS3Reset.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnS3Reset.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnS3Reset.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnS3Reset.Location = new System.Drawing.Point(549, 150); this.btnS3Reset.Location = new System.Drawing.Point(549, 185);
this.btnS3Reset.Name = "btnS3Reset"; this.btnS3Reset.Name = "btnS3Reset";
this.btnS3Reset.Size = new System.Drawing.Size(132, 39); this.btnS3Reset.Size = new System.Drawing.Size(132, 39);
this.btnS3Reset.TabIndex = 282; this.btnS3Reset.TabIndex = 282;
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
this.btnS2Reset.BackColor = System.Drawing.Color.White; this.btnS2Reset.BackColor = System.Drawing.Color.White;
this.btnS2Reset.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnS2Reset.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnS2Reset.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnS2Reset.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnS2Reset.Location = new System.Drawing.Point(411, 150); this.btnS2Reset.Location = new System.Drawing.Point(411, 185);
this.btnS2Reset.Name = "btnS2Reset"; this.btnS2Reset.Name = "btnS2Reset";
this.btnS2Reset.Size = new System.Drawing.Size(132, 39); this.btnS2Reset.Size = new System.Drawing.Size(132, 39);
this.btnS2Reset.TabIndex = 281; this.btnS2Reset.TabIndex = 281;
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
this.btnS1Reset.BackColor = System.Drawing.Color.White; this.btnS1Reset.BackColor = System.Drawing.Color.White;
this.btnS1Reset.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnS1Reset.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnS1Reset.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnS1Reset.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnS1Reset.Location = new System.Drawing.Point(273, 150); this.btnS1Reset.Location = new System.Drawing.Point(273, 185);
this.btnS1Reset.Name = "btnS1Reset"; this.btnS1Reset.Name = "btnS1Reset";
this.btnS1Reset.Size = new System.Drawing.Size(132, 39); this.btnS1Reset.Size = new System.Drawing.Size(132, 39);
this.btnS1Reset.TabIndex = 280; this.btnS1Reset.TabIndex = 280;
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
this.btnClearDoor.BackColor = System.Drawing.Color.White; this.btnClearDoor.BackColor = System.Drawing.Color.White;
this.btnClearDoor.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnClearDoor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnClearDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClearDoor.Location = new System.Drawing.Point(135, 150); this.btnClearDoor.Location = new System.Drawing.Point(135, 185);
this.btnClearDoor.Name = "btnClearDoor"; this.btnClearDoor.Name = "btnClearDoor";
this.btnClearDoor.Size = new System.Drawing.Size(132, 39); this.btnClearDoor.Size = new System.Drawing.Size(132, 39);
this.btnClearDoor.TabIndex = 279; this.btnClearDoor.TabIndex = 279;
...@@ -307,9 +307,9 @@ ...@@ -307,9 +307,9 @@
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.logBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.logBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.logBox.Location = new System.Drawing.Point(4, 195); this.logBox.Location = new System.Drawing.Point(4, 232);
this.logBox.Name = "logBox"; this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(978, 380); this.logBox.Size = new System.Drawing.Size(978, 356);
this.logBox.TabIndex = 278; this.logBox.TabIndex = 278;
this.logBox.Text = ""; this.logBox.Text = "";
this.logBox.VisibleChanged += new System.EventHandler(this.logBox_VisibleChanged); this.logBox.VisibleChanged += new System.EventHandler(this.logBox_VisibleChanged);
...@@ -433,9 +433,9 @@ ...@@ -433,9 +433,9 @@
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red; this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(356, 46); this.lblWarnMsg.Location = new System.Drawing.Point(343, 48);
this.lblWarnMsg.Name = "lblWarnMsg"; this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(534, 92); this.lblWarnMsg.Size = new System.Drawing.Size(534, 125);
this.lblWarnMsg.TabIndex = 224; this.lblWarnMsg.TabIndex = 224;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
...@@ -447,9 +447,9 @@ ...@@ -447,9 +447,9 @@
this.tabPage3.Controls.Add(this.btnUpdown); this.tabPage3.Controls.Add(this.btnUpdown);
this.tabPage3.Controls.Add(this.btnAxisOn); this.tabPage3.Controls.Add(this.btnAxisOn);
this.tabPage3.Controls.Add(this.btnAxisOff); this.tabPage3.Controls.Add(this.btnAxisOff);
this.tabPage3.Location = new System.Drawing.Point(4, 26); this.tabPage3.Location = new System.Drawing.Point(4, 29);
this.tabPage3.Name = "tabPage3"; this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(988, 597); this.tabPage3.Size = new System.Drawing.Size(988, 594);
this.tabPage3.TabIndex = 2; this.tabPage3.TabIndex = 2;
this.tabPage3.Text = " 库位调试 "; this.tabPage3.Text = " 库位调试 ";
this.tabPage3.UseVisualStyleBackColor = true; this.tabPage3.UseVisualStyleBackColor = true;
...@@ -1512,7 +1512,7 @@ ...@@ -1512,7 +1512,7 @@
// //
this.chbMoveStop.AutoSize = true; this.chbMoveStop.AutoSize = true;
this.chbMoveStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbMoveStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbMoveStop.Location = new System.Drawing.Point(29, 157); this.chbMoveStop.Location = new System.Drawing.Point(29, 192);
this.chbMoveStop.Name = "chbMoveStop"; this.chbMoveStop.Name = "chbMoveStop";
this.chbMoveStop.Size = new System.Drawing.Size(84, 24); this.chbMoveStop.Size = new System.Drawing.Size(84, 24);
this.chbMoveStop.TabIndex = 288; this.chbMoveStop.TabIndex = 288;
......
...@@ -174,22 +174,34 @@ namespace OnlineStore.ACSingleStore ...@@ -174,22 +174,34 @@ namespace OnlineStore.ACSingleStore
//ReadPosistion(); //ReadPosistion();
if (equip.storeRunStatus > StoreRunStatus.Wait) if (equip.storeRunStatus > StoreRunStatus.Wait)
{ {
lblWarnMsg.Text = equip.WarnMsg; string wmsg = "";
//如果不在出料中,且叉子上有信号,需要提示检查叉子 //lblWarnMsg.Text = equip.WarnMsg;
if (equip.storeRunStatus.Equals(StoreRunStatus.Runing) && equip.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (!String.IsNullOrEmpty(equip.WarnMsg))
{ {
lblWarnMsg.Text = lblWarnMsg.Text + " 叉子料盘检测有料,请检查"; wmsg += equip.WarnMsg+"\r\n";
} }
foreach (WorkStation s in equip.StationMap.Values)
if (lblWarnMsg.Text.Equals(""))
{ {
if (!string.IsNullOrEmpty(s.WarnMsg))
if (LineConnect.DoorPosInfo != null)
{ {
string msg = "出料口物料:" + LineConnect.DoorPosInfo?.ToStr()+"\r\n"+"料架信息:"+equip.CurrTray?.ToStr(); wmsg += s.WarnMsg + "\r\n";
lblWarnMsg.Text = msg; }
} }
//如果不在出料中,且叉子上有信号,需要提示检查叉子
if (equip.storeRunStatus.Equals(StoreRunStatus.Runing) && equip.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
wmsg += "叉子料盘检测有料,请检查" + "\r\n";
} }
lblWarnMsg.Text = wmsg;
//if (lblWarnMsg.Text.Equals(""))
//{
// if (LineConnect.DoorPosInfo != null)
// {
// string msg = "出料口物料:" + LineConnect.DoorPosInfo?.ToStr()+"\r\n"+"料架信息:"+equip.CurrTray?.ToStr();
// lblWarnMsg.Text = msg;
// }
//}
if (equip.autoNext) if (equip.autoNext)
{ {
string msg = equip.autoMsg; string msg = equip.autoMsg;
...@@ -1142,38 +1154,29 @@ namespace OnlineStore.ACSingleStore ...@@ -1142,38 +1154,29 @@ namespace OnlineStore.ACSingleStore
LineConnect.DoorPosInfo = null; LineConnect.DoorPosInfo = null;
} }
} }
private void SReset(int num)
private void btnS1Reset_Click(object sender, EventArgs e)
{ {
LogUtil.info(equip.Name + "点击:S1复位"); LogUtil.info(equip.Name + "点击:S"+ num + "复位");
if (equip.storeRunStatus.Equals(StoreRunStatus.Wait)) if (equip.storeRunStatus.Equals(StoreRunStatus.Wait))
{ {
MessageBox.Show(equip.Name + "设备未启动,无法复位"); MessageBox.Show(equip.Name + "设备未启动,无法复位");
return; return;
} }
equip.StationMap[1].Reset(); equip.StationMap[num].Reset();
}
private void btnS1Reset_Click(object sender, EventArgs e)
{
SReset(1);
} }
private void btnS2Reset_Click(object sender, EventArgs e) private void btnS2Reset_Click(object sender, EventArgs e)
{ {
LogUtil.info(equip.Name + "点击:S2复位"); SReset(2);
if (equip.storeRunStatus.Equals(StoreRunStatus.Wait))
{
MessageBox.Show(equip.Name + "设备未启动,无法复位");
return;
}
equip.StationMap[2].Reset();
} }
private void btnS3Reset_Click(object sender, EventArgs e) private void btnS3Reset_Click(object sender, EventArgs e)
{ {
LogUtil.info(equip.Name + "点击:S3复位"); SReset(3);
if (equip.storeRunStatus.Equals(StoreRunStatus.Wait))
{
MessageBox.Show(equip.Name + "设备未启动,无法复位");
return;
}
equip.StationMap[3].Reset();
} }
private void DisS(int num,CheckBox chebox) private void DisS(int num,CheckBox chebox)
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!