Commit fa21c837 LN

报警文字显示红色

1 个父辈 c20a9f00
...@@ -88,7 +88,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -88,7 +88,7 @@ namespace OnlineStore.DeviceLibrary
ConfigMoveAxis axis = box.Config.UpDown_Axis; ConfigMoveAxis axis = box.Config.UpDown_Axis;
AxisManager.instance.HomeMove(axis.DeviceName, (short)axis.GetAxisValue(), axis.HomeHighSpeed, axis.HomeLowSpeed, axis.HomeAddSpeed); AxisManager.instance.HomeMove(axis.DeviceName, (short)axis.GetAxisValue(), axis.HomeHighSpeed, axis.HomeLowSpeed, axis.HomeAddSpeed);
} }
else if (MoveInfo.IsTimeOut(120)) else if (MoveInfo.IsTimeOut(60))
{ {
WarnMsg = LogName + "[" + MoveInfo.MoveStep + "]等待进出轴原点返回 超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒 "; WarnMsg = LogName + "[" + MoveInfo.MoveStep + "]等待进出轴原点返回 超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒 ";
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg);
...@@ -166,7 +166,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -166,7 +166,7 @@ namespace OnlineStore.DeviceLibrary
AxisManager.instance.AbsMove(axis.DeviceName, (short)axis.GetAxisValue(), paramInfo.UpdownTargetPosition, paramInfo.UpdownSpeed, axis.AddSpeed, axis.DelSpeed); AxisManager.instance.AbsMove(axis.DeviceName, (short)axis.GetAxisValue(), paramInfo.UpdownTargetPosition, paramInfo.UpdownSpeed, axis.AddSpeed, axis.DelSpeed);
toolTimer.Interval = 50; toolTimer.Interval = 50;
} }
else if (MoveInfo.IsTimeOut(120)) else if (MoveInfo.IsTimeOut(60))
{ {
WarnMsg = LogName + "[" + MoveInfo.MoveStep + "]进出轴移动到目标位置" + paramInfo.InoutTargetPosition + " 超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒 "; WarnMsg = LogName + "[" + MoveInfo.MoveStep + "]进出轴移动到目标位置" + paramInfo.InoutTargetPosition + " 超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒 ";
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg);
...@@ -295,13 +295,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -295,13 +295,8 @@ namespace OnlineStore.DeviceLibrary
} }
public string CurrStr() public string CurrStr()
{ {
string str= "位置校准中:"+MoveInfo + "\r\n" + string str= "位置校准中:"+MoveInfo.MoveStep + " "+MoveInfo.LastSetpTime.ToLongTimeString()+"\r\n" +
"当前第" + (paramInfo.CurrIndex + 1) + "/" + paramInfo.MiddlePositionList.Count + "列,已校准库位" + paramInfo.PositionList.Count + "个"; "当前第" + (paramInfo.CurrIndex + 1) + "/" + paramInfo.MiddlePositionList.Count + "列,已校准库位" + paramInfo.PositionList.Count + "个";
if (WarnMsg != "")
{
str += "\r\n" + WarnMsg;
}
return str; return str;
} }
} }
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.panelAll = new System.Windows.Forms.Panel(); this.panelAll = new System.Windows.Forms.Panel();
this.lblErrorMsg = new System.Windows.Forms.Label();
this.lblMoveInfo = new System.Windows.Forms.Label(); this.lblMoveInfo = new System.Windows.Forms.Label();
this.group6 = new System.Windows.Forms.GroupBox(); this.group6 = new System.Windows.Forms.GroupBox();
this.lblFileP = new System.Windows.Forms.Label(); this.lblFileP = new System.Windows.Forms.Label();
...@@ -87,6 +88,7 @@ ...@@ -87,6 +88,7 @@
this.panelAll.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.panelAll.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.panelAll.Controls.Add(this.lblErrorMsg);
this.panelAll.Controls.Add(this.lblMoveInfo); this.panelAll.Controls.Add(this.lblMoveInfo);
this.panelAll.Controls.Add(this.group6); this.panelAll.Controls.Add(this.group6);
this.panelAll.Controls.Add(this.group2); this.panelAll.Controls.Add(this.group2);
...@@ -102,13 +104,23 @@ ...@@ -102,13 +104,23 @@
this.panelAll.Size = new System.Drawing.Size(1089, 649); this.panelAll.Size = new System.Drawing.Size(1089, 649);
this.panelAll.TabIndex = 250; this.panelAll.TabIndex = 250;
// //
// lblErrorMsg
//
this.lblErrorMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblErrorMsg.ForeColor = System.Drawing.Color.Red;
this.lblErrorMsg.Location = new System.Drawing.Point(417, 443);
this.lblErrorMsg.Name = "lblErrorMsg";
this.lblErrorMsg.Size = new System.Drawing.Size(661, 24);
this.lblErrorMsg.TabIndex = 325;
this.lblErrorMsg.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lblMoveInfo // lblMoveInfo
// //
this.lblMoveInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblMoveInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveInfo.ForeColor = System.Drawing.Color.Blue; this.lblMoveInfo.ForeColor = System.Drawing.Color.Blue;
this.lblMoveInfo.Location = new System.Drawing.Point(422, 379); this.lblMoveInfo.Location = new System.Drawing.Point(417, 394);
this.lblMoveInfo.Name = "lblMoveInfo"; this.lblMoveInfo.Name = "lblMoveInfo";
this.lblMoveInfo.Size = new System.Drawing.Size(498, 94); this.lblMoveInfo.Size = new System.Drawing.Size(523, 43);
this.lblMoveInfo.TabIndex = 324; this.lblMoveInfo.TabIndex = 324;
this.lblMoveInfo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.lblMoveInfo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
...@@ -625,6 +637,7 @@ ...@@ -625,6 +637,7 @@
private System.Windows.Forms.Button btnMStop; private System.Windows.Forms.Button btnMStop;
private System.Windows.Forms.TextBox txtUpdownStart; private System.Windows.Forms.TextBox txtUpdownStart;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lblErrorMsg;
} }
} }
...@@ -161,6 +161,7 @@ namespace OnlineStore.ACSingleStore ...@@ -161,6 +161,7 @@ namespace OnlineStore.ACSingleStore
{ {
lblMoveInfo.Text = "点位校准已结束,请打开文件夹查看位置文件"; lblMoveInfo.Text = "点位校准已结束,请打开文件夹查看位置文件";
} }
lblErrorMsg.Text = "";
} }
else else
{ {
...@@ -170,6 +171,7 @@ namespace OnlineStore.ACSingleStore ...@@ -170,6 +171,7 @@ namespace OnlineStore.ACSingleStore
} }
lblMoveInfo.Text = autoP.CurrStr(); lblMoveInfo.Text = autoP.CurrStr();
lblErrorMsg.Text = autoP.WarnMsg;
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -126,6 +126,15 @@ ...@@ -126,6 +126,15 @@
<metadata name="Column_Del.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column_Del.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Column_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_position.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Del.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!