Commit b1b24648 LN

1

1 个父辈 2efb4cde
......@@ -62,23 +62,26 @@ namespace OnlineStore.DeviceLibrary
bool countError = false;
return AxisManager.instance.AbsMoveIsEnd(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetP, moveAxis.CanErrorCountMax, out countError);
}
public DateTime LastTime = DateTime.Now;
private void ToolTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
TimeSpan span = DateTime.Now - paramInfo.LastTime;
TimeSpan span = DateTime.Now - LastTime;
if (isInProcesss && span.TotalSeconds < 1)
{
return;
}
isInProcesss = true;
LastTime = DateTime.Now;
try
{
int currIndex = paramInfo.CurrIndex;
if (CurrStep.Equals(StoreMoveStep.AP_01_InoutHome))
{
if (HomeIsEnd(box.Config.InOut_Axis))
{
CurrStep=(StoreMoveStep.AP_02_UpdownHome);
CurrStep = (StoreMoveStep.AP_02_UpdownHome);
LogUtil.info(LogName + CurrStep + " "+ currIndex + ":升降轴原点返回");
LogUtil.info(LogName + CurrStep + " " + currIndex + ":升降轴原点返回");
ConfigMoveAxis axis = box.Config.UpDown_Axis;
AxisManager.instance.HomeMove(axis.DeviceName, (short)axis.GetAxisValue(), axis.HomeHighSpeed, axis.HomeLowSpeed, axis.HomeAddSpeed);
}
......@@ -105,7 +108,8 @@ namespace OnlineStore.DeviceLibrary
}
}
}else if (CurrStep.Equals(StoreMoveStep.AP_03_UpdownMove))
}
else if (CurrStep.Equals(StoreMoveStep.AP_03_UpdownMove))
{
if (AbsMoveIsEnd(box.Config.UpDown_Axis, paramInfo.UpdownStartPosition))
{
......@@ -122,7 +126,7 @@ namespace OnlineStore.DeviceLibrary
if (AbsMoveIsEnd(box.Config.Middle_Axis, p))
{
CurrStep=(StoreMoveStep.AP_05_InoutToP);
CurrStep = (StoreMoveStep.AP_05_InoutToP);
ConfigMoveAxis iaxis = box.Config.InOut_Axis;
LogUtil.info(LogName + CurrStep + " " + currIndex + ":进出轴移动到目标位置:" + paramInfo.InoutTargetPosition);
......@@ -133,7 +137,7 @@ namespace OnlineStore.DeviceLibrary
{
if (AbsMoveIsEnd(box.Config.InOut_Axis, paramInfo.InoutTargetPosition))
{
CurrStep=(StoreMoveStep.AP_06_UpdownMove);
CurrStep = (StoreMoveStep.AP_06_UpdownMove);
ConfigMoveAxis axis = box.Config.UpDown_Axis;
LogUtil.info(LogName + CurrStep + " " + currIndex + ":升降轴移动到目标位置:" + paramInfo.UpdownTargetPosition);
AxisManager.instance.AbsMove(axis.DeviceName, (short)axis.GetAxisValue(), paramInfo.UpdownTargetPosition, paramInfo.UpdownSpeed, axis.AddSpeed, axis.DelSpeed);
......@@ -181,6 +185,14 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(LogName + "ToolTimer_Elapsed" + ex.ToString());
}
}
else
{
LogUtil.error("BoxAutoPoint ToolTimer_Elapsed 出错:未找到"+ CurrStep + "的处理" );
}
}catch(Exception ex)
{
LogUtil.error("BoxAutoPoint ToolTimer_Elapsed 出错:" + ex.ToString());
}
isInProcesss = false;
}
......@@ -302,7 +314,6 @@ namespace OnlineStore.DeviceLibrary
public IO_VALUE LastValue = IO_VALUE.LOW;
public DateTime LastGetPTime = DateTime.Now;
public DateTime LastTime = DateTime.Now;
public string ParamStr()
{
string msgStr = "请确认以下对点位参数,点击“确定”按钮开始自动校准点位:\r\n";
......
......@@ -773,7 +773,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + "已经累计出入库" + CurrInOutCount + "次,需要复位一下旋转轴");
}
}
else if (lineConnect.CanStartOut() || IsDebug)
else if (lineConnect.CanStartOut() || IsDebug || autoNext)
{
InOutPosInfo currInOutFixture = null;
lock (waitOutListLock)
......
......@@ -979,13 +979,13 @@ namespace OnlineStore.DeviceLibrary
autoMsg = "自动出库:" + posid;
AddWaitOutInfo(inoutinfo);
}
else if (CurrInOutCount >= Config.Box_ResetMCount)
{
LogUtil.info(Name + "自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutCount + "次,需要重置BOX旋转轴,先把出库信息存入排队列表中");
//ResetMiddleAxis(false);
autoMsg = "自动出库:" + posid;
AddWaitOutInfo(inoutinfo);
}
//else if (CurrInOutCount >= Config.Box_ResetMCount)
//{
// LogUtil.info(Name + "自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutCount + "次,需要重置BOX旋转轴,先把出库信息存入排队列表中");
// //ResetMiddleAxis(false);
// autoMsg = "自动出库:" + posid;
// AddWaitOutInfo(inoutinfo);
//}
else
{
LogUtil.info(Name + "自动进入下一个出库:posid=" + posid);
......
......@@ -314,7 +314,7 @@
this.groupBox1.Controls.Add(this.label43);
this.groupBox1.Controls.Add(this.label42);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(11, 420);
this.groupBox1.Location = new System.Drawing.Point(11, 424);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(476, 136);
this.groupBox1.TabIndex = 217;
......@@ -493,7 +493,7 @@
this.groupBox2.Controls.Add(this.button6);
this.groupBox2.Controls.Add(this.button3);
this.groupBox2.Controls.Add(this.button5);
this.groupBox2.Location = new System.Drawing.Point(11, 336);
this.groupBox2.Location = new System.Drawing.Point(11, 340);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(476, 78);
this.groupBox2.TabIndex = 276;
......@@ -666,10 +666,10 @@
//
this.tabPage5.Controls.Add(this.picAxis4);
this.tabPage5.Controls.Add(this.picPPoint);
this.tabPage5.Location = new System.Drawing.Point(4, 22);
this.tabPage5.Location = new System.Drawing.Point(4, 29);
this.tabPage5.Name = "tabPage5";
this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
this.tabPage5.Size = new System.Drawing.Size(580, 559);
this.tabPage5.Size = new System.Drawing.Size(573, 551);
this.tabPage5.TabIndex = 1;
this.tabPage5.Text = "点位示意图";
this.tabPage5.UseVisualStyleBackColor = true;
......@@ -689,7 +689,7 @@
this.picPPoint.Image = ((System.Drawing.Image)(resources.GetObject("picPPoint.Image")));
this.picPPoint.Location = new System.Drawing.Point(3, 6);
this.picPPoint.Name = "picPPoint";
this.picPPoint.Size = new System.Drawing.Size(572, 235);
this.picPPoint.Size = new System.Drawing.Size(566, 235);
this.picPPoint.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picPPoint.TabIndex = 306;
this.picPPoint.TabStop = false;
......@@ -746,7 +746,7 @@
this.groupInout.Enabled = false;
this.groupInout.Location = new System.Drawing.Point(5, 6);
this.groupInout.Name = "groupInout";
this.groupInout.Size = new System.Drawing.Size(494, 585);
this.groupInout.Size = new System.Drawing.Size(899, 585);
this.groupInout.TabIndex = 100;
this.groupInout.TabStop = false;
this.groupInout.Text = "料仓操作";
......@@ -1432,10 +1432,10 @@
// tabPage1
//
this.tabPage1.Controls.Add(this.panel1);
this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1091, 607);
this.tabPage1.Size = new System.Drawing.Size(192, 74);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = " IO调试 ";
this.tabPage1.UseVisualStyleBackColor = true;
......
......@@ -133,6 +133,7 @@ namespace OnlineStore.ACSingleStore
}
private void btnSdStop_Click(object sender, EventArgs e)
{
LogUtil.info(LogName + "点击:停止运动");
autoP.StopMove();
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!