Commit 301cb911 LN

上料模块增加模拟测试功能。NG接驳台bug修改

1 个父辈 f0f32343
...@@ -73,6 +73,11 @@ ...@@ -73,6 +73,11 @@
this.groupBox8 = new System.Windows.Forms.GroupBox(); this.groupBox8 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.lblTestMsg = new System.Windows.Forms.Label();
this.btnTestStop = new System.Windows.Forms.Button();
this.lblTargetP3 = new System.Windows.Forms.Label();
this.btnStartTest = new System.Windows.Forms.Button();
this.groupDetial = new System.Windows.Forms.GroupBox(); this.groupDetial = new System.Windows.Forms.GroupBox();
this.btnDSave = new System.Windows.Forms.Button(); this.btnDSave = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
...@@ -115,6 +120,7 @@ ...@@ -115,6 +120,7 @@
this.groupBox7.SuspendLayout(); this.groupBox7.SuspendLayout();
this.groupBox8.SuspendLayout(); this.groupBox8.SuspendLayout();
this.tabPage2.SuspendLayout(); this.tabPage2.SuspendLayout();
this.groupBox5.SuspendLayout();
this.groupDetial.SuspendLayout(); this.groupDetial.SuspendLayout();
this.groupBox9.SuspendLayout(); this.groupBox9.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
...@@ -906,6 +912,7 @@ ...@@ -906,6 +912,7 @@
// //
// tabPage2 // tabPage2
// //
this.tabPage2.Controls.Add(this.groupBox5);
this.tabPage2.Controls.Add(this.groupDetial); this.tabPage2.Controls.Add(this.groupDetial);
this.tabPage2.Controls.Add(this.groupBox9); this.tabPage2.Controls.Add(this.groupBox9);
this.tabPage2.Controls.Add(this.axisMoveControl1); this.tabPage2.Controls.Add(this.axisMoveControl1);
...@@ -918,6 +925,76 @@ ...@@ -918,6 +925,76 @@
this.tabPage2.Text = " 伺服信息 "; this.tabPage2.Text = " 伺服信息 ";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
// //
// groupBox5
//
this.groupBox5.Controls.Add(this.lblTestMsg);
this.groupBox5.Controls.Add(this.btnTestStop);
this.groupBox5.Controls.Add(this.lblTargetP3);
this.groupBox5.Controls.Add(this.btnStartTest);
this.groupBox5.Location = new System.Drawing.Point(16, 405);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(557, 114);
this.groupBox5.TabIndex = 320;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "批量轴上料测试";
//
// lblTestMsg
//
this.lblTestMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTestMsg.ForeColor = System.Drawing.Color.Black;
this.lblTestMsg.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblTestMsg.Location = new System.Drawing.Point(6, 64);
this.lblTestMsg.Name = "lblTestMsg";
this.lblTestMsg.Size = new System.Drawing.Size(545, 43);
this.lblTestMsg.TabIndex = 318;
this.lblTestMsg.Text = "测试信息:";
this.lblTestMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnTestStop
//
this.btnTestStop.BackColor = System.Drawing.SystemColors.Control;
this.btnTestStop.Cursor = System.Windows.Forms.Cursors.Default;
this.btnTestStop.Enabled = false;
this.btnTestStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTestStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTestStop.ForeColor = System.Drawing.Color.Red;
this.btnTestStop.Location = new System.Drawing.Point(354, 23);
this.btnTestStop.Name = "btnTestStop";
this.btnTestStop.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnTestStop.Size = new System.Drawing.Size(163, 34);
this.btnTestStop.TabIndex = 317;
this.btnTestStop.Text = "批量轴停止";
this.btnTestStop.UseVisualStyleBackColor = true;
this.btnTestStop.Click += new System.EventHandler(this.btnTestStop_Click);
//
// lblTargetP3
//
this.lblTargetP3.AutoSize = true;
this.lblTargetP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTargetP3.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblTargetP3.Location = new System.Drawing.Point(39, 32);
this.lblTargetP3.Name = "lblTargetP3";
this.lblTargetP3.Size = new System.Drawing.Size(70, 17);
this.lblTargetP3.TabIndex = 316;
this.lblTargetP3.Text = "目标点P3:";
this.lblTargetP3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnStartTest
//
this.btnStartTest.BackColor = System.Drawing.SystemColors.Control;
this.btnStartTest.Cursor = System.Windows.Forms.Cursors.Default;
this.btnStartTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStartTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStartTest.ForeColor = System.Drawing.Color.Red;
this.btnStartTest.Location = new System.Drawing.Point(167, 23);
this.btnStartTest.Name = "btnStartTest";
this.btnStartTest.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnStartTest.Size = new System.Drawing.Size(163, 34);
this.btnStartTest.TabIndex = 307;
this.btnStartTest.Text = "批量轴入料运动开始";
this.btnStartTest.UseVisualStyleBackColor = true;
this.btnStartTest.Click += new System.EventHandler(this.btnStartTest_Click);
//
// groupDetial // groupDetial
// //
this.groupDetial.Controls.Add(this.btnDSave); this.groupDetial.Controls.Add(this.btnDSave);
...@@ -1153,7 +1230,7 @@ ...@@ -1153,7 +1230,7 @@
// //
this.axisMoveControl1.Location = new System.Drawing.Point(6, 4); this.axisMoveControl1.Location = new System.Drawing.Point(6, 4);
this.axisMoveControl1.Name = "axisMoveControl1"; this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(575, 440); this.axisMoveControl1.Size = new System.Drawing.Size(575, 398);
this.axisMoveControl1.TabIndex = 219; this.axisMoveControl1.TabIndex = 219;
// //
// groupBox2 // groupBox2
...@@ -1356,6 +1433,8 @@ ...@@ -1356,6 +1433,8 @@
this.groupBox7.ResumeLayout(false); this.groupBox7.ResumeLayout(false);
this.groupBox8.ResumeLayout(false); this.groupBox8.ResumeLayout(false);
this.tabPage2.ResumeLayout(false); this.tabPage2.ResumeLayout(false);
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.groupDetial.ResumeLayout(false); this.groupDetial.ResumeLayout(false);
this.groupDetial.PerformLayout(); this.groupDetial.PerformLayout();
this.groupBox9.ResumeLayout(false); this.groupBox9.ResumeLayout(false);
...@@ -1454,6 +1533,11 @@ ...@@ -1454,6 +1533,11 @@
private System.Windows.Forms.Button SL_ClampCylinder_Work; private System.Windows.Forms.Button SL_ClampCylinder_Work;
private System.Windows.Forms.Button SL_OutTopCylinder_Down; private System.Windows.Forms.Button SL_OutTopCylinder_Down;
private System.Windows.Forms.Button SL_TrayLocation_After; private System.Windows.Forms.Button SL_TrayLocation_After;
private System.Windows.Forms.GroupBox groupBox5;
internal System.Windows.Forms.Button btnTestStop;
private System.Windows.Forms.Label lblTargetP3;
internal System.Windows.Forms.Button btnStartTest;
private System.Windows.Forms.Label lblTestMsg;
} }
} }
...@@ -113,6 +113,7 @@ namespace OnlineStore.AssemblyLine ...@@ -113,6 +113,7 @@ namespace OnlineStore.AssemblyLine
} }
ReadIOList(); ReadIOList();
ReadBtnDO(); ReadBtnDO();
BatchTimerPro();
lblName.BackColor = equipBean.GetShowColor(); lblName.BackColor = equipBean.GetShowColor();
if (equipBean.runStatus > LineRunStatus.Wait) if (equipBean.runStatus > LineRunStatus.Wait)
{ {
...@@ -273,6 +274,9 @@ namespace OnlineStore.AssemblyLine ...@@ -273,6 +274,9 @@ namespace OnlineStore.AssemblyLine
btnScan.Visible = equipBean.Config.IsCanOut.Equals(0); btnScan.Visible = equipBean.Config.IsCanOut.Equals(0);
chbBoxSendShelf.Checked = equipBean.OutEndSendShelfOut; chbBoxSendShelf.Checked = equipBean.OutEndSendShelfOut;
btnOutStore.Visible = equipBean.Config.IsCanOut.Equals(1); btnOutStore.Visible = equipBean.Config.IsCanOut.Equals(1);
lblTargetP3.Text = "目标P3:" + equipBean.Config.BatchAxisP3 ;
lblTestMsg.Text = "";
TargetP3 = equipBean.Config.BatchAxisP3;
IsLoad = true; IsLoad = true;
} }
...@@ -534,6 +538,8 @@ namespace OnlineStore.AssemblyLine ...@@ -534,6 +538,8 @@ namespace OnlineStore.AssemblyLine
equipBean.Config.BatchAxisP3 = p3; equipBean.Config.BatchAxisP3 = p3;
LineManager.SaveFeedingEquipConfig(equipBean.Config); LineManager.SaveFeedingEquipConfig(equipBean.Config);
MessageBox.Show("保存成功!"); MessageBox.Show("保存成功!");
lblTargetP3.Text = "目标P3:" + equipBean.Config.BatchAxisP3;
TargetP3 = equipBean.Config.BatchAxisP3;
} }
private void btnScan_Click(object sender, EventArgs e) private void btnScan_Click(object sender, EventArgs e)
...@@ -817,6 +823,98 @@ namespace OnlineStore.AssemblyLine ...@@ -817,6 +823,98 @@ namespace OnlineStore.AssemblyLine
MessageBox.Show("未启动或不在空闲中,出库测试失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("未启动或不在空闲中,出库测试失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
private int TargetP3 = 0;
private bool StartTest = false ;
private void btnStartTest_Click(object sender, EventArgs e)
{
ConfigMoveAxis moveAxis = equipBean.Config.Batch_Axis;
bool isServoOn = AxisManager.instance.IsServeoOn(moveAxis.DeviceName, moveAxis.GetAxisValue());
if (!isServoOn)
{
MessageBox.Show(moveAxis.Explain + " 未打开,请先打开伺服 ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
bool isStop = AxisManager.instance.GetBusyStatus(moveAxis.DeviceName, moveAxis.GetAxisValue()).Equals(0);
if (isServoOn && isStop)
{
//判断批量轴是否停止且到位
TargetP3 = equipBean.Config.BatchAxisP3;
LogUtil.info(equipBean.Name + "点击:" + btnStartTest.Text + ",目标位置:" + equipBean.Config.BatchAxisP3);
equipBean.BatchAxisToP3(true, false, true);
lblTestMsg.Text = "开始入料运动,目标位置[" + TargetP3 + "] ,开始位置[" + equipBean.StartMovePosition + "],";
StartTest = true;
}
else
{
MessageBox.Show(moveAxis.Explain + " 忙碌中,无法开始运动 ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
}
private void btnTestStop_Click(object sender, EventArgs e)
{
LogUtil.info(equipBean.Name + "点击:" + btnTestStop.Text);
equipBean.BatchAxisStopCheck();
equipBean.BatchAxis.SuddenStop();
}
private void BatchTimerPro()
{
if(equipBean.IsBatchMove())
{
btnStartTest.Enabled = false;
if (equipBean.LastMoveIsTest)
{
ConfigMoveAxis moveAxis = equipBean.Config.Batch_Axis;
bool countError = false ;
bool isStop = false;
bool result= AxisManager.instance.AbsMoveIsEnd(moveAxis.DeviceName, moveAxis.GetAxisValue(), TargetP3, moveAxis.CanErrorCountMax, out countError);
if (result)
{
isStop = true ;
LogUtil.info(equipBean.Name + "批量轴上料功能测试,发现批量轴已到达目标位置【" + TargetP3 + "】,停止上料测试 ");
}
else
{
bool axisMoveIsEnd = HuichuanLibrary.HCBoardManager.MoveIsEnd(equipBean.Config.Batch_Axis.GetAxisValue());
if (axisMoveIsEnd)
{
isStop = true;
LogUtil.info(equipBean.Name + "批量轴上料功能测试,发现批量轴已停止运动,停止上料测试");
}
}
if (isStop)
{
StartTest = false;
equipBean.BatchAxisStopCheck();
btnStartTest.Enabled = true;
btnTestStop.Enabled = false;
int height = equipBean.GetHeight();
lblTestMsg.Text = "目标位置[" + TargetP3 + "] ,开始位置[" + equipBean.StartMovePosition + "],停止位置[" + equipBean.EndMovePosition + "],高度[" + height + "]mm";
}
else
{
btnTestStop.Enabled = true;
}
}
else
{
btnTestStop.Enabled = false;
}
}
else
{
if (StartTest)
{
StartTest = false;
int height = equipBean.GetHeight();
lblTestMsg.Text = "目标位置[" + TargetP3 + "] ,开始位置[" + equipBean.StartMovePosition + "],停止位置[" + equipBean.EndMovePosition + "],高度[" + height + "]mm";
}
btnStartTest.Enabled = true;
btnTestStop.Enabled = false;
}
}
} }
} }
......
...@@ -81,9 +81,9 @@ namespace OnlineStore.AssemblyLine ...@@ -81,9 +81,9 @@ namespace OnlineStore.AssemblyLine
resul = data.NumStr(); resul = data.NumStr();
numNum.Value = data.Num; numNum.Value = data.Num;
int selIndex = data.RFType - 64; int selIndex = data.RFType - 64;
if (selIndex >= 0 && selIndex <= comboxType.Items.Count) if (selIndex >= 0 && selIndex <= comType.Items.Count)
{ {
comboxType.SelectedIndex = selIndex; comType.SelectedIndex = selIndex;
} }
} }
......
...@@ -618,6 +618,40 @@ namespace OnlineStore.DeviceLibrary ...@@ -618,6 +618,40 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 提升轴匀速上升处理 #region 提升轴匀速上升处理
public bool LastMoveIsTest = true;
public void BatchAxisToP3(bool isFirstMove = true, bool isWait = true, bool IsTest = false )
{
int targetP3 = Config.BatchAxisP3;
int targetSpeed = Config.BatchAxis_P3Speed;
if (!isFirstMove)
{
int currPosition = BatchAxis.GetAclPosition();
if (currPosition != -1)
{
targetP3 = currPosition + Config.Height_ChangeValue * 80;
if (targetP3 > Config.BatchAxisP3)
{
targetP3 = Config.BatchAxisP3;
}
LogUtil.info(Name + " BatchAxisToP3 目标P3: " + targetP3 + "(" + currPosition + ")");
}
//targetSpeed = Config.BatchAxis_P3Speed / 2;
}
// 需要增加定时器,获取验证信号并停止伺服
StartMovePosition = BatchAxis.GetAclPosition();
if (isWait)
{
MoveInfo.TimeOutSeconds = 200;
MoveInfo.CanWhileCount = 0;
MoveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxis(Config.Batch_Axis, targetP3, targetSpeed));
}
Config.Batch_Axis.TargetPosition = targetP3;
BatchAxis.AbsMove(null, targetP3, targetSpeed);
//开始检测信号
BatchAxisStartCheck();
LastMoveIsTest = IsTest;
}
private System.Timers.Timer axisCheckTimer = null; private System.Timers.Timer axisCheckTimer = null;
private string TargetIoType = IO_Type.SL_AxisLocationCheck; private string TargetIoType = IO_Type.SL_AxisLocationCheck;
private IO_VALUE TargetIoValue = IO_VALUE.HIGH; private IO_VALUE TargetIoValue = IO_VALUE.HIGH;
...@@ -641,7 +675,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -641,7 +675,7 @@ namespace OnlineStore.DeviceLibrary
return true; return true;
} }
private bool BatchAxisStopCheck() public bool BatchAxisStopCheck()
{ {
if (!(axisCheckTimer == null)) if (!(axisCheckTimer == null))
{ {
...@@ -649,6 +683,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -649,6 +683,15 @@ namespace OnlineStore.DeviceLibrary
} }
return true; return true;
} }
public bool IsBatchMove()
{
if (axisCheckTimer!=null&& axisCheckTimer.Enabled)
{
return true;
}
return false;
}
private bool IsInProcess = false; private bool IsInProcess = false;
private DateTime lastOkTime = DateTime.Now; private DateTime lastOkTime = DateTime.Now;
private void CheckTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) private void CheckTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
...@@ -665,7 +708,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -665,7 +708,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + "上料轴,检测到 " + TargetIoType + "=" + TargetIoValue + ",停止运动"); LogUtil.info(Name + "上料轴,检测到 " + TargetIoType + "=" + TargetIoValue + ",停止运动");
BatchAxis.SuddenStop(); BatchAxis.SuddenStop();
BatchAxisStopCheck(); BatchAxisStopCheck();
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -892,45 +892,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -892,45 +892,14 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private void BatchAxisToP3(bool isFirstMove = true, bool isWait = true)
{
int targetP3 = Config.BatchAxisP3;
int targetSpeed = Config.BatchAxis_P3Speed;
if (!isFirstMove)
{
int currPosition = BatchAxis.GetAclPosition();
if (currPosition != -1)
{
targetP3 = currPosition + Config.Height_ChangeValue * 80;
if (targetP3 > Config.BatchAxisP3)
{
targetP3 = Config.BatchAxisP3;
}
LogUtil.info(Name + " BatchAxisToP3 目标P3: " + targetP3 + "(" + currPosition + ")");
}
//targetSpeed = Config.BatchAxis_P3Speed / 2;
}
// 需要增加定时器,获取验证信号并停止伺服
StartMovePosition = BatchAxis.GetAclPosition();
if (isWait)
{
MoveInfo.TimeOutSeconds = 200;
MoveInfo.CanWhileCount = 0;
MoveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxis(Config.Batch_Axis, targetP3, targetSpeed));
}
Config.Batch_Axis.TargetPosition = targetP3;
BatchAxis.AbsMove(null, targetP3, targetSpeed);
//开始检测信号
BatchAxisStartCheck();
}
private int StartMovePosition = 0; public int StartMovePosition = 0;
private int EndMovePosition = 0; public int EndMovePosition = 0;
private int LastHeight = 0; private int LastHeight = 0;
private int LastWidth = 0; private int LastWidth = 0;
private List<string> LastCodeList = new List<string>(); private List<string> LastCodeList = new List<string>();
private List<string> NextCodeList = new List<string>(); private List<string> NextCodeList = new List<string>();
private int GetHeight() public int GetHeight()
{ {
LastHeight = 0; LastHeight = 0;
int AxisChangeValue = Config.Height_ChangeValue; int AxisChangeValue = Config.Height_ChangeValue;
......
...@@ -327,8 +327,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -327,8 +327,8 @@ namespace OnlineStore.DeviceLibrary
//直接放盘通过 //直接放盘通过
MoveInfo.NextMoveStep(LineMoveStep.HY91_TrayCanGo); MoveInfo.NextMoveStep(LineMoveStep.HY91_TrayCanGo);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 无需处理,放托盘离开"); CheckLog("托盘阻挡" + MoveInfo.SLog + " 无需处理,放托盘离开");
} }
} }
#endregion #endregion
#region C1线->出料线横移处理 31 #region C1线->出料线横移处理 31
...@@ -369,10 +369,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -369,10 +369,16 @@ namespace OnlineStore.DeviceLibrary
HY_StopCylinderUp(MoveInfo); HY_StopCylinderUp(MoveInfo);
OL_StopCylinderUp(MoveInfo); OL_StopCylinderUp(MoveInfo);
int lineId = DeviceID % 100;
LogInfo("C1线->出料线 【" + MoveInfo.MoveParam.ToShortStr() + "】" + MoveInfo.SLog + " 更新料盘位置【" + MoveInfo.MoveParam.WareCode + "】【INBELT】【" + lineId + "】"); //如果是出库料,才需要更新位置
//更新料盘位置 TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.INBELT, Config.LineName); if (tray.IsFull && tray.InOrOutStore.Equals(2))
{
int lineId = DeviceID % 100;
LogInfo("C1线->出料线 【" + MoveInfo.MoveParam.ToShortStr() + "】" + MoveInfo.SLog + " 更新料盘位置【" + MoveInfo.MoveParam.WareCode + "】【INBELT】【" + lineId + "】");
//更新料盘位置
SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.INBELT, Config.LineName);
}
} }
else if (MoveInfo.IsStep(LineMoveStep.HY35_IOL_TopDown)) else if (MoveInfo.IsStep(LineMoveStep.HY35_IOL_TopDown))
{ {
...@@ -704,7 +710,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -704,7 +710,7 @@ namespace OnlineStore.DeviceLibrary
{ {
FeedingEquip feed1 = LineManager.Line.FeedingEquipMap[101]; FeedingEquip feed1 = LineManager.Line.FeedingEquipMap[101];
FeedingEquip feed2 = LineManager.Line.FeedingEquipMap[102]; FeedingEquip feed2 = LineManager.Line.FeedingEquipMap[102];
if ((!feed1.MoveInfo.MoveType.Equals(LineMoveType.InStore)) || (!feed2.MoveInfo.MoveType.Equals(LineMoveType.InStore))) if ((!feed1.MoveInfo.MoveType.Equals(LineMoveType.InStore)) && (!feed2.MoveInfo.MoveType.Equals(LineMoveType.InStore)))
{ {
return true; return true;
} }
......
...@@ -207,6 +207,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -207,6 +207,9 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveTimeOut(SecondMoveInfo, "等待移栽机构开始抓料超时"); MoveTimeOut(SecondMoveInfo, "等待移栽机构开始抓料超时");
} }
}else if (SecondMoveInfo.IsStep(LineMoveStep.JHY_09_WaitProcessReel))
{
//等待料盘拿走
} }
else if (SecondMoveInfo.IsStep(LineMoveStep.JHY_10_ReelProEnd)) else if (SecondMoveInfo.IsStep(LineMoveStep.JHY_10_ReelProEnd))
{ {
...@@ -462,7 +465,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -462,7 +465,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(LineMoveStep.JM_05_ClampWork)) else if (MoveInfo.IsStep(LineMoveStep.JM_05_ClampWork))
{ {
MoveInfo.NextMoveStep(LineMoveStep.JM_06_UpdownToP1); MoveInfo.NextMoveStep(LineMoveStep.JM_06_UpdownToP1);
OutLog(logName + MoveInfo.SLog + ":升降轴到P1 ["+ Config.UpDownAxisP1 + "]"); OutLog(logName + MoveInfo.SLog + ":升降轴到P1 [" + Config.UpDownAxisP1 + "]");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_06_UpdownToP1)) else if (MoveInfo.IsStep(LineMoveStep.JM_06_UpdownToP1))
...@@ -480,15 +483,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -480,15 +483,23 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
OutLog(logName + MoveInfo.SLog + ":SecondMoveInfo当前无处理,暂时不用 JHY_10_ReelProEnd "); OutLog(logName + MoveInfo.SLog + ":SecondMoveInfo当前无处理,暂时不用 JHY_10_ReelProEnd ");
}
if (IsNgPro())
{
MoveInfo.NextMoveStep(LineMoveStep.JM_11_CylinderGive);
OutLog(logName + MoveInfo.SLog + ":接驳台气缸放料 ");
CylinderMove(MoveInfo, IO_Type.HY_MoveCylinder_Take, IO_Type.HY_MoveCylinder_Give);
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.JM_10_WaitJNoReel);
OutLog(logName + MoveInfo.SLog + ":等待接驳台无料 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck1, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck2, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck3, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck4, IO_VALUE.LOW));
} }
MoveInfo.NextMoveStep(LineMoveStep.JM_10_WaitJNoReel);
OutLog(logName + MoveInfo.SLog + ":等待接驳台无料 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck1, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck2, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck3, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck4, IO_VALUE.LOW));
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_10_WaitJNoReel)) else if (MoveInfo.IsStep(LineMoveStep.JM_10_WaitJNoReel))
{ {
...@@ -533,7 +544,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -533,7 +544,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(LineMoveStep.JM_13_ClampRelax)) else if (MoveInfo.IsStep(LineMoveStep.JM_13_ClampRelax))
{ {
MoveInfo.NextMoveStep(LineMoveStep.JM_14_UpdownToP1); MoveInfo.NextMoveStep(LineMoveStep.JM_14_UpdownToP1);
OutLog(logName + MoveInfo.SLog + ":升降轴上升到P1 ["+ Config.UpDownAxisP1 + "] "); OutLog(logName + MoveInfo.SLog + ":升降轴上升到P1 [" + Config.UpDownAxisP1 + "] ");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_14_UpdownToP1)) else if (MoveInfo.IsStep(LineMoveStep.JM_14_UpdownToP1))
...@@ -541,8 +552,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -541,8 +552,10 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.JM_15_ClampCheck); MoveInfo.NextMoveStep(LineMoveStep.JM_15_ClampCheck);
OutLog(logName + MoveInfo.SLog + ":夹爪料盘检测无料,接驳台有料 "); OutLog(logName + MoveInfo.SLog + ":夹爪料盘检测无料,接驳台有料 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_ClampCylinder_Check, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_ClampCylinder_Check, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck1, IO_VALUE.HIGH)); if (!IsNgPro())
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck1, IO_VALUE.HIGH));
}
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_15_ClampCheck)) else if (MoveInfo.IsStep(LineMoveStep.JM_15_ClampCheck))
{ {
...@@ -571,7 +584,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -571,7 +584,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsTimeOut(60)) else if (MoveInfo.IsTimeOut(60))
{ {
MoveTimeOut(MoveInfo, "等待给服务器发送afterPutCutTask完成"); MoveTimeOut(MoveInfo, "等待给服务器发送afterPutCutTask完成");
} }
} }
else else
......
...@@ -191,7 +191,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -191,7 +191,7 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
List<TrayInfo> trayList = new List<TrayInfo>(); List<TrayInfo> trayList = new List<TrayInfo>(TrayInfoMap.Values);
List<string> lineList = new List<string>(); List<string> lineList = new List<string>();
foreach (TrayInfo tray in trayList) foreach (TrayInfo tray in trayList)
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!