Commit 620506d7 LN

ng料修改

1 个父辈 7d3db7a1
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
this.cmbLineType = new System.Windows.Forms.ComboBox(); this.cmbLineType = new System.Windows.Forms.ComboBox();
this.btnLine1Test = new System.Windows.Forms.Button(); this.btnLine1Test = new System.Windows.Forms.Button();
this.groupBox6 = new System.Windows.Forms.GroupBox(); this.groupBox6 = new System.Windows.Forms.GroupBox();
this.lblThisSta = new System.Windows.Forms.Label();
this.lblMoveInfo = new System.Windows.Forms.Label(); this.lblMoveInfo = new System.Windows.Forms.Label();
this.lblTrayNum = new System.Windows.Forms.Label(); this.lblTrayNum = new System.Windows.Forms.Label();
this.lblInstoreList = new System.Windows.Forms.Label(); this.lblInstoreList = new System.Windows.Forms.Label();
this.lblThisSta = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox4 = new System.Windows.Forms.GroupBox(); this.groupBox4 = new System.Windows.Forms.GroupBox();
...@@ -316,6 +316,21 @@ ...@@ -316,6 +316,21 @@
this.groupBox6.TabStop = false; this.groupBox6.TabStop = false;
this.groupBox6.Text = "消息"; this.groupBox6.Text = "消息";
// //
// lblThisSta
//
this.lblThisSta.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Red;
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(271, 19);
this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(520, 234);
this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblMoveInfo // lblMoveInfo
// //
this.lblMoveInfo.AutoSize = true; this.lblMoveInfo.AutoSize = true;
...@@ -350,21 +365,6 @@ ...@@ -350,21 +365,6 @@
this.lblInstoreList.Size = new System.Drawing.Size(524, 53); this.lblInstoreList.Size = new System.Drawing.Size(524, 53);
this.lblInstoreList.TabIndex = 277; this.lblInstoreList.TabIndex = 277;
// //
// lblThisSta
//
this.lblThisSta.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Red;
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(263, 29);
this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(528, 224);
this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// groupBox3 // groupBox3
// //
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
......
...@@ -128,7 +128,6 @@ namespace OnlineStore.AssemblyLine ...@@ -128,7 +128,6 @@ namespace OnlineStore.AssemblyLine
LoadOk = true; LoadOk = true;
HideForm(); HideForm();
timer1.Start(); timer1.Start();
} }
private void LoadListView() private void LoadListView()
...@@ -174,6 +173,7 @@ namespace OnlineStore.AssemblyLine ...@@ -174,6 +173,7 @@ namespace OnlineStore.AssemblyLine
{ {
ListViewItem lvi = new ListViewItem(); ListViewItem lvi = new ListViewItem();
lvi.Text = equip.Name; lvi.Text = equip.Name;
lvi.SubItems.Add(equip.Config.IsDebug.Equals(1) ? "✘" : "✔");
lvi.SubItems.Add(equip.alarmType.ToString()); lvi.SubItems.Add(equip.alarmType.ToString());
lvi.SubItems.Add(KTK_Store.GetRunStr(equip.lineStatus, equip.runStatus)); lvi.SubItems.Add(KTK_Store.GetRunStr(equip.lineStatus, equip.runStatus));
this.listView1.Items.Add(lvi); this.listView1.Items.Add(lvi);
...@@ -184,6 +184,7 @@ namespace OnlineStore.AssemblyLine ...@@ -184,6 +184,7 @@ namespace OnlineStore.AssemblyLine
{ {
ListViewItem lvi = new ListViewItem(); ListViewItem lvi = new ListViewItem();
lvi.Text = equip.Name; lvi.Text = equip.Name;
lvi.SubItems.Add(equip.Config.IsDebug.Equals(1) ? "✘" : "✔");
lvi.SubItems.Add(equip.alarmType.ToString()); lvi.SubItems.Add(equip.alarmType.ToString());
lvi.SubItems.Add(KTK_Store.GetRunStr(equip.lineStatus, equip.runStatus)); lvi.SubItems.Add(KTK_Store.GetRunStr(equip.lineStatus, equip.runStatus));
this.listView1.Items.Add(lvi); this.listView1.Items.Add(lvi);
...@@ -193,6 +194,7 @@ namespace OnlineStore.AssemblyLine ...@@ -193,6 +194,7 @@ namespace OnlineStore.AssemblyLine
{ {
ListViewItem lvi = new ListViewItem(); ListViewItem lvi = new ListViewItem();
lvi.Text = equip.Name; lvi.Text = equip.Name;
lvi.SubItems.Add(equip.Config.IsDebug.Equals(1) ? "✘" : "✔");
lvi.SubItems.Add(equip.alarmType.ToString()); lvi.SubItems.Add(equip.alarmType.ToString());
lvi.SubItems.Add(KTK_Store.GetRunStr(equip.lineStatus, equip.runStatus)); lvi.SubItems.Add(KTK_Store.GetRunStr(equip.lineStatus, equip.runStatus));
this.listView1.Items.Add(lvi); this.listView1.Items.Add(lvi);
...@@ -430,32 +432,27 @@ namespace OnlineStore.AssemblyLine ...@@ -430,32 +432,27 @@ namespace OnlineStore.AssemblyLine
return; return;
} }
string canScanCode = ""; string canScanCode = "";
if (lineBean.lineStatus.Equals(LineStatus.StoreOnline) && lineBean.runStatus.Equals(LineRunStatus.Runing)) //if (lineBean.lineStatus.Equals(LineStatus.StoreOnline) && lineBean.runStatus.Equals(LineRunStatus.Runing))
{
//canScanCode = lineBean.CanScanCode() ? "(可扫码入库)" : "(出库未完成,不可扫码入库)";
}
lblStatus.Text = KTK_Store.GetRunStr(lineBean.lineStatus, lineBean.runStatus)+canScanCode;
string warnMsg= LineManager.Line.WarnMsg.Equals("")?"":LineManager.Line.WarnMsg+"\r\n";
//if (lineBean.isNotScanCode && lblWarnMsg.Text.Equals(""))
//{ //{
// lblWarnMsg.Text = "未扫到二维码,请重新放入料盘"; // //canScanCode = lineBean.CanScanCode() ? "(可扫码入库)" : "(出库未完成,不可扫码入库)";
//} //}
lblStatus.Text = KTK_Store.GetRunStr(lineBean.lineStatus, lineBean.runStatus)+canScanCode;
string warnMsg= LineManager.Line.WarnMsg.Equals("")?"":LineManager.Line.WarnMsg+"\r\n";
lblMoveInfo.Text = LineManager.Line.GetMoveStr(); lblMoveInfo.Text = LineManager.Line.GetMoveStr();
if (lblWarnMsg.Text.Equals("")) if (TrayManager.TrayErrorMsg.Equals("").Equals(false))
{ {
lblWarnMsg.Text = TrayManager.TrayErrorMsg; warnMsg+= TrayManager.TrayErrorMsg + "\r\n";
} }
if (lblWarnMsg.Text.Equals(""))
foreach (EquipBase move in lineBean.AllEquipMap.Values)
{ {
foreach (EquipBase move in lineBean.AllEquipMap.Values) if (move.WarnMsg.Equals("").Equals(false))
{ {
if (move.WarnMsg.Equals("").Equals(false)) warnMsg += move.WarnMsg + "\r\n";
{
warnMsg+= move.WarnMsg+ "\r\n";
break;
}
} }
} }
lblWarnMsg.Text = warnMsg; lblWarnMsg.Text = warnMsg;
int i = 0; int i = 0;
...@@ -533,7 +530,7 @@ namespace OnlineStore.AssemblyLine ...@@ -533,7 +530,7 @@ namespace OnlineStore.AssemblyLine
SetMenuS(启动AToolStripMenuItem, true); SetMenuS(启动AToolStripMenuItem, true);
SetMenuS(复位RToolStripMenuItem, false); SetMenuS(复位RToolStripMenuItem, false);
SetMenuS(停止TToolStripMenuItem, false); SetMenuS(停止TToolStripMenuItem, false);
} }
} }
private void SetItemColor(int i, LineRunStatus runStatus) private void SetItemColor(int i, LineRunStatus runStatus)
......
...@@ -410,9 +410,9 @@ ...@@ -410,9 +410,9 @@
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Red; this.lblThisSta.ForeColor = System.Drawing.Color.Red;
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(274, 29); this.lblThisSta.Location = new System.Drawing.Point(274, 19);
this.lblThisSta.Name = "lblThisSta"; this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(528, 120); this.lblThisSta.Size = new System.Drawing.Size(528, 243);
this.lblThisSta.TabIndex = 246; this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动"; this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......
...@@ -409,9 +409,9 @@ ...@@ -409,9 +409,9 @@
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Red; this.lblThisSta.ForeColor = System.Drawing.Color.Red;
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(255, 29); this.lblThisSta.Location = new System.Drawing.Point(255, 13);
this.lblThisSta.Name = "lblThisSta"; this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(531, 120); this.lblThisSta.Size = new System.Drawing.Size(531, 197);
this.lblThisSta.TabIndex = 246; this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动"; this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......
...@@ -140,7 +140,7 @@ namespace OnlineStore.Common ...@@ -140,7 +140,7 @@ namespace OnlineStore.Common
logBox.AppendText(now.ToLongTimeString() + " " + msg + Environment.NewLine); //增加文本 logBox.AppendText(now.ToLongTimeString() + " " + msg + Environment.NewLine); //增加文本
TimeSpan span = DateTime.Now - lastTime; TimeSpan span = DateTime.Now - lastTime;
if (span.TotalSeconds > 10) if (span.TotalSeconds > 30000)
{ {
lastTime = DateTime.Now; lastTime = DateTime.Now;
logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾 logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾
...@@ -160,8 +160,13 @@ namespace OnlineStore.Common ...@@ -160,8 +160,13 @@ namespace OnlineStore.Common
{ {
logBox.Text = LastText; logBox.Text = LastText;
logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾 TimeSpan span = DateTime.Now - lastTime;
logBox.ScrollToCaret(); //滚动到控件光标处 if (span.TotalSeconds > 30000)
{
lastTime = DateTime.Now;
logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾
logBox.ScrollToCaret(); //滚动到控件光标处
}
} }
} }
public static void ClearLog() public static void ClearLog()
......
...@@ -60,7 +60,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -60,7 +60,7 @@ namespace OnlineStore.DeviceLibrary
private string posId = ""; private string posId = "";
public bool StartOut(InOutParam moveParam) public bool StartOut(InOutParam moveParam)
{ {
if (MoveInfo.MoveType.Equals(LineMoveType.None) && equipBean.runStatus > LineRunStatus.HomeMoving) if (MoveInfo.MoveType.Equals(LineMoveType.None) && (equipBean.runStatus .Equals(LineRunStatus.Runing)|| equipBean.runStatus.Equals(LineRunStatus.Busy)))
{ {
MoveInfo.MoveParam = moveParam; MoveInfo.MoveParam = moveParam;
MoveInfo.NewMove(LineMoveType.OutStore); MoveInfo.NewMove(LineMoveType.OutStore);
...@@ -76,7 +76,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -76,7 +76,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.error(Name + " 启动出料【" + moveParam.PosId + "】 失败"); LogUtil.error(Name + " 启动出料【" + moveParam.ToStr() + "】 失败");
return false; return false;
} }
} }
......
...@@ -373,10 +373,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -373,10 +373,10 @@ namespace OnlineStore.DeviceLibrary
{ {
CheckWait(MoveInfo); CheckWait(MoveInfo);
} }
if (SecondMoveInfo.IsInWait) //if (SecondMoveInfo.IsInWait)
{ //{
CheckWait(SecondMoveInfo); // CheckWait(SecondMoveInfo);
} //}
if (MoveInfo.IsInWait) if (MoveInfo.IsInWait)
{ {
return; return;
...@@ -448,6 +448,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -448,6 +448,16 @@ namespace OnlineStore.DeviceLibrary
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down); // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
UpdownDownP3Move(MoveInfo.MoveParam.PlateH); UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
} }
else
{
TimeSpan span = DateTime.Now - MoveInfo.LastSetpTime;
if (span.TotalSeconds > 60)
{
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "]等待 皮带线可放料 " + "超时[" + Math.Round(span.TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, DeviceID + 20);
Alarm(LineAlarmType.IoSingleTimeOut);
}
}
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_07_UpDownCylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_07_UpDownCylinderDown))
{ {
...@@ -537,11 +547,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -537,11 +547,11 @@ namespace OnlineStore.DeviceLibrary
{ {
return true; return true;
} }
if (outline.MoveInfo.MoveStep.Equals(LineMoveStep.DLO_04_CanReviceTray)) else if (outline.MoveInfo.MoveStep.Equals(LineMoveStep.DLO_04_CanReviceTray))
{ {
return true; return true;
} }
else if (outline.MoveInfo.Equals(LineMoveType.None)) else if (outline.MoveInfo.MoveType.Equals(LineMoveType.None))
{ {
outline.StartOut(MoveInfo.MoveParam); outline.StartOut(MoveInfo.MoveParam);
} }
......
...@@ -69,11 +69,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -69,11 +69,6 @@ namespace OnlineStore.DeviceLibrary
{ {
return msg = deviceName + "未扫到条码"; return msg = deviceName + "未扫到条码";
} }
//if (LineManager.Line.runStatus.Equals(LineRunStatus.Wait))
//{
// return msg = deviceName + "托盘【" + trayNum + "】 收到条码<< " + codeStr + ",暂未开启,不需要发送服务器";
//}
//http://localhost/myproject/service/store/emptyPosForPutin //http://localhost/myproject/service/store/emptyPosForPutin
// 参数:cids: 多个 cid // 参数:cids: 多个 cid
//code: 条码内容 //code: 条码内容
...@@ -116,8 +111,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -116,8 +111,8 @@ namespace OnlineStore.DeviceLibrary
InOutParam param = new InOutParam(trayNum, wareNum, posId, plateH, plateW); InOutParam param = new InOutParam(trayNum, wareNum, posId, plateH, plateW);
if (LineManager.Line.IsReviceInPosId(moveEquip, posId)) if (LineManager.Line.IsReviceInPosId(moveEquip, posId))
{ {
LineManager.Line.SetWarnMsg("入库库位重复: " + param.ToStr() + " ,入库失败!"); //LineManager.Line.SetWarnMsg("入库库位重复: " + param.ToStr() + " ,入库失败!");
moveEquip.SetWarnMsg("入库库位重复: " + param.ToStr() + " ,入库失败!"); //moveEquip.SetWarnMsg("入库库位重复: " + param.ToStr() + "");
return msg = ("收到服务器入库命令 " + "入库库位重复: " + param.ToStr() + " ,入库失败!"); return msg = ("收到服务器入库命令 " + "入库库位重复: " + param.ToStr() + " ,入库失败!");
} }
LogUtil.info("收到入库命令: " + param.ToStr() + " ,更新盘空满信息,托盘号【" + trayNum + "】,有料," + ReelType.InStore + ""); LogUtil.info("收到入库命令: " + param.ToStr() + " ,更新盘空满信息,托盘号【" + trayNum + "】,有料," + ReelType.InStore + "");
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!