Commit 05d0c0eb LN

出入库中断时打印日志

1 个父辈 15e8b795
...@@ -286,9 +286,9 @@ ...@@ -286,9 +286,9 @@
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox4.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)));
this.groupBox4.Controls.Add(this.tableLayoutPanel2); this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(232, 174); this.groupBox4.Location = new System.Drawing.Point(232, 178);
this.groupBox4.Name = "groupBox4"; this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(220, 337); this.groupBox4.Size = new System.Drawing.Size(220, 333);
this.groupBox4.TabIndex = 104; this.groupBox4.TabIndex = 104;
this.groupBox4.TabStop = false; this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表"; this.groupBox4.Text = "DO列表";
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
this.tableLayoutPanel2.RowCount = 2; this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(209, 317); this.tableLayoutPanel2.Size = new System.Drawing.Size(209, 313);
this.tableLayoutPanel2.TabIndex = 103; this.tableLayoutPanel2.TabIndex = 103;
// //
// groupBox3 // groupBox3
...@@ -314,9 +314,9 @@ ...@@ -314,9 +314,9 @@
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)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.groupBox3.Controls.Add(this.tableLayoutPanel1); this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(6, 174); this.groupBox3.Location = new System.Drawing.Point(6, 178);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(220, 337); this.groupBox3.Size = new System.Drawing.Size(220, 333);
this.groupBox3.TabIndex = 103; this.groupBox3.TabIndex = 103;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "DI列表"; this.groupBox3.Text = "DI列表";
...@@ -334,7 +334,7 @@ ...@@ -334,7 +334,7 @@
this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(209, 317); this.tableLayoutPanel1.Size = new System.Drawing.Size(209, 313);
this.tableLayoutPanel1.TabIndex = 102; this.tableLayoutPanel1.TabIndex = 102;
// //
// groupDO // groupDO
......
...@@ -61,7 +61,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -61,7 +61,7 @@ namespace OnlineStore.DeviceLibrary
this.alarmType = alarmType; this.alarmType = alarmType;
if (alarmType.Equals(LineAlarmType.SuddenStop) || alarmType.Equals(LineAlarmType.NoAirCheck)) if (alarmType.Equals(LineAlarmType.SuddenStop) || alarmType.Equals(LineAlarmType.NoAirCheck))
{ {
StopMove(); StopMove(alarmType + "报警");
} }
} }
public virtual void CheckAlarmProcess(LineMoveInfo moveInfo,LineAlarmType alarmType) public virtual void CheckAlarmProcess(LineMoveInfo moveInfo,LineAlarmType alarmType)
......
...@@ -93,7 +93,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -93,7 +93,7 @@ namespace OnlineStore.DeviceLibrary
public override bool Reset() public override bool Reset()
{ {
runStatus = LineRunStatus.Reset; runStatus = LineRunStatus.Reset;
StopMove(); StopMove("复位");
MoveInfo.NewMove(LineMoveType.Reset); MoveInfo.NewMove(LineMoveType.Reset);
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
if (RunAxis(true, BatchAxis) && RunAxis(true, UpdownAxis)) if (RunAxis(true, BatchAxis) && RunAxis(true, UpdownAxis))
...@@ -306,8 +306,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -306,8 +306,15 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.SL_LocationSideWay_Run, value); IOMove(IO_Type.SL_LocationSideWay_Run, value);
IOMove(IO_Type.SL_OutSideWay_Run, value); IOMove(IO_Type.SL_OutSideWay_Run, value);
} }
internal override void StopMove() internal override void StopMove(string stopDes = "")
{ {
if (!String.IsNullOrEmpty(stopDes))
{
if (MoveInfo.MoveType.Equals(LineMoveType.InStore) || MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{
LogInfo("[" + stopDes + "]时中止运动: " + MoveInfo.ToStr());
}
}
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
//StopMove时设置状态为none //StopMove时设置状态为none
......
...@@ -799,7 +799,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -799,7 +799,7 @@ namespace OnlineStore.DeviceLibrary
} }
#endregion #endregion
internal override void StopMove() internal override void StopMove(string stopDes = "")
{ {
foreach (EquipBase equip in this.AllEquipMap.Values) foreach (EquipBase equip in this.AllEquipMap.Values)
......
...@@ -67,7 +67,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -67,7 +67,7 @@ namespace OnlineStore.DeviceLibrary
public override bool Reset() public override bool Reset()
{ {
StopMove(); StopMove("复位");
if (!RunAxis(true, UpdownAxis)) if (!RunAxis(true, UpdownAxis))
{ {
return false; return false;
...@@ -152,8 +152,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -152,8 +152,16 @@ namespace OnlineStore.DeviceLibrary
} }
} }
internal override void StopMove() internal override void StopMove(string stopDes = "")
{ {
if (!String.IsNullOrEmpty(stopDes))
{
if (MoveInfo.MoveType.Equals(LineMoveType.InStore) || MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{
LogInfo("[" + stopDes + "]时中止运动: " + MoveInfo.ToStr());
}
}
trayCheck2LowWait.Stop(); trayCheck2LowWait.Stop();
trayCheckWait.Stop(); trayCheckWait.Stop();
......
...@@ -192,8 +192,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -192,8 +192,8 @@ namespace OnlineStore.DeviceLibrary
public abstract bool Reset(); public abstract bool Reset();
internal abstract void StopMove( ); internal abstract void StopMove(string stopDes = "");
protected abstract void ResetProcess(); protected abstract void ResetProcess();
protected virtual void Init() protected virtual void Init()
......
...@@ -168,6 +168,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -168,6 +168,20 @@ namespace OnlineStore.DeviceLibrary
moveStep = PreMoveStep; moveStep = PreMoveStep;
IsInWait = false; IsInWait = false;
} }
internal string ToStr()
{
string str = "";
if (MoveParam != null)
{
str = "[" + MoveType + "][" + MoveStep + "]" + MoveParam.ToStr();
}
else
{
str = "[" + MoveType + "][" + MoveStep + "]";
}
return str;
}
} }
public class WriteIOInfo public class WriteIOInfo
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!