Commit 620506d7 LN

ng料修改

1 个父辈 7d3db7a1
......@@ -36,10 +36,10 @@
this.cmbLineType = new System.Windows.Forms.ComboBox();
this.btnLine1Test = new System.Windows.Forms.Button();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.lblThisSta = new System.Windows.Forms.Label();
this.lblMoveInfo = new System.Windows.Forms.Label();
this.lblTrayNum = 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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox4 = new System.Windows.Forms.GroupBox();
......@@ -316,6 +316,21 @@
this.groupBox6.TabStop = false;
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
//
this.lblMoveInfo.AutoSize = true;
......@@ -350,21 +365,6 @@
this.lblInstoreList.Size = new System.Drawing.Size(524, 53);
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
//
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
......
......@@ -128,7 +128,6 @@ namespace OnlineStore.AssemblyLine
LoadOk = true;
HideForm();
timer1.Start();
}
private void LoadListView()
......@@ -174,6 +173,7 @@ namespace OnlineStore.AssemblyLine
{
ListViewItem lvi = new ListViewItem();
lvi.Text = equip.Name;
lvi.SubItems.Add(equip.Config.IsDebug.Equals(1) ? "✘" : "✔");
lvi.SubItems.Add(equip.alarmType.ToString());
lvi.SubItems.Add(KTK_Store.GetRunStr(equip.lineStatus, equip.runStatus));
this.listView1.Items.Add(lvi);
......@@ -184,6 +184,7 @@ namespace OnlineStore.AssemblyLine
{
ListViewItem lvi = new ListViewItem();
lvi.Text = equip.Name;
lvi.SubItems.Add(equip.Config.IsDebug.Equals(1) ? "✘" : "✔");
lvi.SubItems.Add(equip.alarmType.ToString());
lvi.SubItems.Add(KTK_Store.GetRunStr(equip.lineStatus, equip.runStatus));
this.listView1.Items.Add(lvi);
......@@ -193,6 +194,7 @@ namespace OnlineStore.AssemblyLine
{
ListViewItem lvi = new ListViewItem();
lvi.Text = equip.Name;
lvi.SubItems.Add(equip.Config.IsDebug.Equals(1) ? "✘" : "✔");
lvi.SubItems.Add(equip.alarmType.ToString());
lvi.SubItems.Add(KTK_Store.GetRunStr(equip.lineStatus, equip.runStatus));
this.listView1.Items.Add(lvi);
......@@ -430,32 +432,27 @@ namespace OnlineStore.AssemblyLine
return;
}
string canScanCode = "";
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(""))
//if (lineBean.lineStatus.Equals(LineStatus.StoreOnline) && lineBean.runStatus.Equals(LineRunStatus.Runing))
//{
// 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();
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)
{
if (move.WarnMsg.Equals("").Equals(false))
{
warnMsg+= move.WarnMsg+ "\r\n";
break;
}
warnMsg += move.WarnMsg + "\r\n";
}
}
lblWarnMsg.Text = warnMsg;
int i = 0;
......
......@@ -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.ForeColor = System.Drawing.Color.Red;
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.Size = new System.Drawing.Size(528, 120);
this.lblThisSta.Size = new System.Drawing.Size(528, 243);
this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......
......@@ -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.ForeColor = System.Drawing.Color.Red;
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.Size = new System.Drawing.Size(531, 120);
this.lblThisSta.Size = new System.Drawing.Size(531, 197);
this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......
......@@ -140,7 +140,7 @@ namespace OnlineStore.Common
logBox.AppendText(now.ToLongTimeString() + " " + msg + Environment.NewLine); //增加文本
TimeSpan span = DateTime.Now - lastTime;
if (span.TotalSeconds > 10)
if (span.TotalSeconds > 30000)
{
lastTime = DateTime.Now;
logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾
......@@ -160,10 +160,15 @@ namespace OnlineStore.Common
{
logBox.Text = LastText;
TimeSpan span = DateTime.Now - lastTime;
if (span.TotalSeconds > 30000)
{
lastTime = DateTime.Now;
logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾
logBox.ScrollToCaret(); //滚动到控件光标处
}
}
}
public static void ClearLog()
{
......
......@@ -60,7 +60,7 @@ namespace OnlineStore.DeviceLibrary
private string posId = "";
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.NewMove(LineMoveType.OutStore);
......@@ -76,7 +76,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogUtil.error(Name + " 启动出料【" + moveParam.PosId + "】 失败");
LogUtil.error(Name + " 启动出料【" + moveParam.ToStr() + "】 失败");
return false;
}
}
......
......@@ -373,10 +373,10 @@ namespace OnlineStore.DeviceLibrary
{
CheckWait(MoveInfo);
}
if (SecondMoveInfo.IsInWait)
{
CheckWait(SecondMoveInfo);
}
//if (SecondMoveInfo.IsInWait)
//{
// CheckWait(SecondMoveInfo);
//}
if (MoveInfo.IsInWait)
{
return;
......@@ -448,6 +448,16 @@ namespace OnlineStore.DeviceLibrary
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
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))
{
......@@ -537,11 +547,11 @@ namespace OnlineStore.DeviceLibrary
{
return true;
}
if (outline.MoveInfo.MoveStep.Equals(LineMoveStep.DLO_04_CanReviceTray))
else if (outline.MoveInfo.MoveStep.Equals(LineMoveStep.DLO_04_CanReviceTray))
{
return true;
}
else if (outline.MoveInfo.Equals(LineMoveType.None))
else if (outline.MoveInfo.MoveType.Equals(LineMoveType.None))
{
outline.StartOut(MoveInfo.MoveParam);
}
......
......@@ -69,11 +69,6 @@ namespace OnlineStore.DeviceLibrary
{
return msg = deviceName + "未扫到条码";
}
//if (LineManager.Line.runStatus.Equals(LineRunStatus.Wait))
//{
// return msg = deviceName + "托盘【" + trayNum + "】 收到条码<< " + codeStr + ",暂未开启,不需要发送服务器";
//}
//http://localhost/myproject/service/store/emptyPosForPutin
// 参数:cids: 多个 cid
//code: 条码内容
......@@ -116,8 +111,8 @@ namespace OnlineStore.DeviceLibrary
InOutParam param = new InOutParam(trayNum, wareNum, posId, plateH, plateW);
if (LineManager.Line.IsReviceInPosId(moveEquip, posId))
{
LineManager.Line.SetWarnMsg("入库库位重复: " + param.ToStr() + " ,入库失败!");
moveEquip.SetWarnMsg("入库库位重复: " + param.ToStr() + " ,入库失败!");
//LineManager.Line.SetWarnMsg("入库库位重复: " + param.ToStr() + " ,入库失败!");
//moveEquip.SetWarnMsg("入库库位重复: " + param.ToStr() + "");
return msg = ("收到服务器入库命令 " + "入库库位重复: " + param.ToStr() + " ,入库失败!");
}
LogUtil.info("收到入库命令: " + param.ToStr() + " ,更新盘空满信息,托盘号【" + trayNum + "】,有料," + ReelType.InStore + "");
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!