Commit 82e759d4 LN

1

1 个父辈 3d146856
正在显示 47 个修改的文件 包含 576 行增加4800 行删除
......@@ -11,9 +11,9 @@
<!--<add key="http.server" value="http://localhost/myproject/service/store/emptyPosForPutin"/>-->
<add key="http.server" value="http://10.85.199.25/myproject/" />
<!--storeType-->
<add key="Line_moveEquip_count" value="6" />
<add key="Line_moveEquip_count" value="7" />
<add key="Line_feedingEquip_count" value="1" />
<add key="Line_HYEquip_count" value="5" />
<add key="Line_HYEquip_count" value="4" />
<!--<add key="Line_dischargeLine_count" value="2" />-->
<!--start one store config-->
<add key="ConfigPath_Line" value="\LineConfig\Config_Line.csv" />
......
......@@ -68,10 +68,11 @@
this.lblAgvInfo = new System.Windows.Forms.Label();
this.lblInstoreList = new System.Windows.Forms.Label();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupClamp = new System.Windows.Forms.GroupBox();
this.btnClampWork = new System.Windows.Forms.Button();
this.btnClampRelax = new System.Windows.Forms.Button();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox8 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.lblTestMsg = new System.Windows.Forms.Label();
......@@ -118,8 +119,8 @@
this.tabPage3.SuspendLayout();
this.groupBox6.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupClamp.SuspendLayout();
this.groupBox7.SuspendLayout();
this.groupBox8.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBox5.SuspendLayout();
this.groupDetial.SuspendLayout();
......@@ -197,7 +198,7 @@
this.groupBox1.Controls.Add(this.txtWriteTime);
this.groupBox1.Controls.Add(this.label5);
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(685, 410);
this.groupBox1.Location = new System.Drawing.Point(685, 378);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(521, 107);
this.groupBox1.TabIndex = 105;
......@@ -330,7 +331,7 @@
this.btnCloseAll.BackColor = System.Drawing.Color.White;
this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAll.Location = new System.Drawing.Point(347, 339);
this.btnCloseAll.Location = new System.Drawing.Point(347, 322);
this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(140, 34);
this.btnCloseAll.TabIndex = 259;
......@@ -424,7 +425,7 @@
this.groupDO.Controls.Add(this.SL_ClampCylinder_Relax);
this.groupDO.Location = new System.Drawing.Point(685, 4);
this.groupDO.Name = "groupDO";
this.groupDO.Size = new System.Drawing.Size(521, 402);
this.groupDO.Size = new System.Drawing.Size(521, 371);
this.groupDO.TabIndex = 255;
this.groupDO.TabStop = false;
this.groupDO.Text = "IO操作测试";
......@@ -434,7 +435,7 @@
this.SL_TrayLocation_After.BackColor = System.Drawing.Color.White;
this.SL_TrayLocation_After.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_TrayLocation_After.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_TrayLocation_After.Location = new System.Drawing.Point(183, 339);
this.SL_TrayLocation_After.Location = new System.Drawing.Point(183, 322);
this.SL_TrayLocation_After.Name = "SL_TrayLocation_After";
this.SL_TrayLocation_After.Size = new System.Drawing.Size(153, 34);
this.SL_TrayLocation_After.TabIndex = 282;
......@@ -447,7 +448,7 @@
this.SL_OutTopCylinder_Down.BackColor = System.Drawing.Color.White;
this.SL_OutTopCylinder_Down.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_OutTopCylinder_Down.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_OutTopCylinder_Down.Location = new System.Drawing.Point(347, 284);
this.SL_OutTopCylinder_Down.Location = new System.Drawing.Point(347, 273);
this.SL_OutTopCylinder_Down.Name = "SL_OutTopCylinder_Down";
this.SL_OutTopCylinder_Down.Size = new System.Drawing.Size(140, 34);
this.SL_OutTopCylinder_Down.TabIndex = 281;
......@@ -460,7 +461,7 @@
this.SL_ClampCylinder_Work.BackColor = System.Drawing.Color.White;
this.SL_ClampCylinder_Work.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_ClampCylinder_Work.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_ClampCylinder_Work.Location = new System.Drawing.Point(183, 284);
this.SL_ClampCylinder_Work.Location = new System.Drawing.Point(183, 273);
this.SL_ClampCylinder_Work.Name = "SL_ClampCylinder_Work";
this.SL_ClampCylinder_Work.Size = new System.Drawing.Size(140, 34);
this.SL_ClampCylinder_Work.TabIndex = 280;
......@@ -473,7 +474,7 @@
this.SL_MoveCylinder_Give.BackColor = System.Drawing.Color.White;
this.SL_MoveCylinder_Give.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_MoveCylinder_Give.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_MoveCylinder_Give.Location = new System.Drawing.Point(20, 284);
this.SL_MoveCylinder_Give.Location = new System.Drawing.Point(20, 273);
this.SL_MoveCylinder_Give.Name = "SL_MoveCylinder_Give";
this.SL_MoveCylinder_Give.Size = new System.Drawing.Size(140, 34);
this.SL_MoveCylinder_Give.TabIndex = 279;
......@@ -486,7 +487,7 @@
this.SL_LocationCylinder_Down.BackColor = System.Drawing.Color.White;
this.SL_LocationCylinder_Down.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_LocationCylinder_Down.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_LocationCylinder_Down.Location = new System.Drawing.Point(347, 193);
this.SL_LocationCylinder_Down.Location = new System.Drawing.Point(347, 187);
this.SL_LocationCylinder_Down.Name = "SL_LocationCylinder_Down";
this.SL_LocationCylinder_Down.Size = new System.Drawing.Size(140, 34);
this.SL_LocationCylinder_Down.TabIndex = 278;
......@@ -499,7 +500,7 @@
this.SL_FixedCylinder_Down.BackColor = System.Drawing.Color.White;
this.SL_FixedCylinder_Down.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_FixedCylinder_Down.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_FixedCylinder_Down.Location = new System.Drawing.Point(183, 193);
this.SL_FixedCylinder_Down.Location = new System.Drawing.Point(183, 187);
this.SL_FixedCylinder_Down.Name = "SL_FixedCylinder_Down";
this.SL_FixedCylinder_Down.Size = new System.Drawing.Size(140, 34);
this.SL_FixedCylinder_Down.TabIndex = 277;
......@@ -512,7 +513,7 @@
this.SL_TopCylinder_Down.BackColor = System.Drawing.Color.White;
this.SL_TopCylinder_Down.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_TopCylinder_Down.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_TopCylinder_Down.Location = new System.Drawing.Point(20, 193);
this.SL_TopCylinder_Down.Location = new System.Drawing.Point(20, 187);
this.SL_TopCylinder_Down.Name = "SL_TopCylinder_Down";
this.SL_TopCylinder_Down.Size = new System.Drawing.Size(140, 34);
this.SL_TopCylinder_Down.TabIndex = 276;
......@@ -538,7 +539,7 @@
this.SL_TopCylinder_Up.BackColor = System.Drawing.Color.White;
this.SL_TopCylinder_Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_TopCylinder_Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_TopCylinder_Up.Location = new System.Drawing.Point(20, 153);
this.SL_TopCylinder_Up.Location = new System.Drawing.Point(20, 147);
this.SL_TopCylinder_Up.Name = "SL_TopCylinder_Up";
this.SL_TopCylinder_Up.Size = new System.Drawing.Size(140, 34);
this.SL_TopCylinder_Up.TabIndex = 274;
......@@ -551,7 +552,7 @@
this.SL_FixedCylinder_Up.BackColor = System.Drawing.Color.White;
this.SL_FixedCylinder_Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_FixedCylinder_Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_FixedCylinder_Up.Location = new System.Drawing.Point(183, 153);
this.SL_FixedCylinder_Up.Location = new System.Drawing.Point(183, 147);
this.SL_FixedCylinder_Up.Name = "SL_FixedCylinder_Up";
this.SL_FixedCylinder_Up.Size = new System.Drawing.Size(140, 34);
this.SL_FixedCylinder_Up.TabIndex = 273;
......@@ -577,7 +578,7 @@
this.SL_TrayLocation_Before.BackColor = System.Drawing.Color.White;
this.SL_TrayLocation_Before.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_TrayLocation_Before.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_TrayLocation_Before.Location = new System.Drawing.Point(20, 339);
this.SL_TrayLocation_Before.Location = new System.Drawing.Point(20, 322);
this.SL_TrayLocation_Before.Name = "SL_TrayLocation_Before";
this.SL_TrayLocation_Before.Size = new System.Drawing.Size(153, 34);
this.SL_TrayLocation_Before.TabIndex = 255;
......@@ -655,7 +656,7 @@
this.SL_OutTopCylinder_Up.BackColor = System.Drawing.Color.White;
this.SL_OutTopCylinder_Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_OutTopCylinder_Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_OutTopCylinder_Up.Location = new System.Drawing.Point(347, 244);
this.SL_OutTopCylinder_Up.Location = new System.Drawing.Point(347, 233);
this.SL_OutTopCylinder_Up.Name = "SL_OutTopCylinder_Up";
this.SL_OutTopCylinder_Up.Size = new System.Drawing.Size(140, 34);
this.SL_OutTopCylinder_Up.TabIndex = 258;
......@@ -681,7 +682,7 @@
this.SL_LocationCylinder_Up.BackColor = System.Drawing.Color.White;
this.SL_LocationCylinder_Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_LocationCylinder_Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_LocationCylinder_Up.Location = new System.Drawing.Point(347, 153);
this.SL_LocationCylinder_Up.Location = new System.Drawing.Point(347, 147);
this.SL_LocationCylinder_Up.Name = "SL_LocationCylinder_Up";
this.SL_LocationCylinder_Up.Size = new System.Drawing.Size(140, 34);
this.SL_LocationCylinder_Up.TabIndex = 256;
......@@ -694,7 +695,7 @@
this.SL_MoveCylinder_Take.BackColor = System.Drawing.Color.White;
this.SL_MoveCylinder_Take.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_MoveCylinder_Take.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_MoveCylinder_Take.Location = new System.Drawing.Point(20, 244);
this.SL_MoveCylinder_Take.Location = new System.Drawing.Point(20, 233);
this.SL_MoveCylinder_Take.Name = "SL_MoveCylinder_Take";
this.SL_MoveCylinder_Take.Size = new System.Drawing.Size(140, 34);
this.SL_MoveCylinder_Take.TabIndex = 252;
......@@ -707,7 +708,7 @@
this.SL_ClampCylinder_Relax.BackColor = System.Drawing.Color.White;
this.SL_ClampCylinder_Relax.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.SL_ClampCylinder_Relax.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SL_ClampCylinder_Relax.Location = new System.Drawing.Point(183, 244);
this.SL_ClampCylinder_Relax.Location = new System.Drawing.Point(183, 233);
this.SL_ClampCylinder_Relax.Name = "SL_ClampCylinder_Relax";
this.SL_ClampCylinder_Relax.Size = new System.Drawing.Size(140, 34);
this.SL_ClampCylinder_Relax.TabIndex = 249;
......@@ -841,10 +842,10 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.groupClamp);
this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Controls.Add(this.groupDO);
this.tabPage1.Controls.Add(this.groupBox7);
this.tabPage1.Controls.Add(this.groupBox8);
this.tabPage1.Controls.Add(this.groupBox3);
this.tabPage1.Controls.Add(this.groupBox4);
this.tabPage1.Location = new System.Drawing.Point(4, 26);
......@@ -855,6 +856,41 @@
this.tabPage1.Text = " IO列表 ";
this.tabPage1.UseVisualStyleBackColor = true;
//
// groupClamp
//
this.groupClamp.Controls.Add(this.btnClampWork);
this.groupClamp.Controls.Add(this.btnClampRelax);
this.groupClamp.Location = new System.Drawing.Point(685, 490);
this.groupClamp.Name = "groupClamp";
this.groupClamp.Size = new System.Drawing.Size(521, 81);
this.groupClamp.TabIndex = 281;
this.groupClamp.TabStop = false;
this.groupClamp.Text = "夹爪操作";
//
// btnClampWork
//
this.btnClampWork.BackColor = System.Drawing.Color.White;
this.btnClampWork.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClampWork.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClampWork.Location = new System.Drawing.Point(183, 28);
this.btnClampWork.Name = "btnClampWork";
this.btnClampWork.Size = new System.Drawing.Size(140, 34);
this.btnClampWork.TabIndex = 282;
this.btnClampWork.Text = "夹料气缸夹紧";
this.btnClampWork.UseVisualStyleBackColor = false;
//
// btnClampRelax
//
this.btnClampRelax.BackColor = System.Drawing.Color.White;
this.btnClampRelax.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClampRelax.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClampRelax.Location = new System.Drawing.Point(17, 28);
this.btnClampRelax.Name = "btnClampRelax";
this.btnClampRelax.Size = new System.Drawing.Size(140, 34);
this.btnClampRelax.TabIndex = 281;
this.btnClampRelax.Text = "夹料气缸放松";
this.btnClampRelax.UseVisualStyleBackColor = false;
//
// groupBox7
//
this.groupBox7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
......@@ -883,34 +919,6 @@
this.tableLayoutPanel3.Size = new System.Drawing.Size(209, 584);
this.tableLayoutPanel3.TabIndex = 102;
//
// groupBox8
//
this.groupBox8.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox8.Controls.Add(this.tableLayoutPanel4);
this.groupBox8.Location = new System.Drawing.Point(685, 51);
this.groupBox8.Name = "groupBox8";
this.groupBox8.Size = new System.Drawing.Size(240, 437);
this.groupBox8.TabIndex = 280;
this.groupBox8.TabStop = false;
this.groupBox8.Text = "DO列表";
this.groupBox8.Visible = false;
//
// tableLayoutPanel4
//
this.tableLayoutPanel4.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.tableLayoutPanel4.ColumnCount = 1;
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel4.Location = new System.Drawing.Point(5, 14);
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
this.tableLayoutPanel4.RowCount = 2;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(229, 417);
this.tableLayoutPanel4.TabIndex = 103;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.groupBox5);
......@@ -1443,8 +1451,8 @@
this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout();
this.tabPage1.ResumeLayout(false);
this.groupClamp.ResumeLayout(false);
this.groupBox7.ResumeLayout(false);
this.groupBox8.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
......@@ -1495,8 +1503,6 @@
private System.Windows.Forms.Label lblInstoreList;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.GroupBox groupBox8;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
private System.Windows.Forms.Button btnOpenDo;
private System.Windows.Forms.TextBox txtDOIndex;
private System.Windows.Forms.TextBox txtDoName;
......@@ -1552,6 +1558,9 @@
internal System.Windows.Forms.Button btnStartTest;
private System.Windows.Forms.Label lblTestMsg;
private System.Windows.Forms.Label lblP2List;
private System.Windows.Forms.GroupBox groupClamp;
private System.Windows.Forms.Button btnClampWork;
private System.Windows.Forms.Button btnClampRelax;
}
}
......@@ -62,20 +62,19 @@ namespace OnlineStore.AssemblyLine
tableLayoutPanel2.RowStyles.Clear();
this.tableLayoutPanel2.RowCount = maxCount;
this.tableLayoutPanel4.RowStyles.Clear();
this.tableLayoutPanel4.RowCount = maxCount;
roleindex = 0;
i = 0;
foreach (ConfigIO ioValue in equipBean.Config.DOList.Values)
{
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName);
control.Click += Control_Click;
if (i >= maxCount)
{
this.tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
this.tableLayoutPanel4.Controls.Add(control, 0, roleindex - maxCount);
}
else
//if (i >= maxCount)
//{
// this.tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
// this.tableLayoutPanel4.Controls.Add(control, 0, roleindex - maxCount);
//}
//else
{
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
this.tableLayoutPanel2.Controls.Add(control, 0, roleindex);
......
......@@ -151,7 +151,7 @@
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.cmbWriteIO);
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(497, 391);
this.groupBox1.Location = new System.Drawing.Point(497, 380);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(731, 111);
this.groupBox1.TabIndex = 105;
......@@ -362,7 +362,7 @@
this.groupDo.Controls.Add(this.HY_LineRun);
this.groupDo.Controls.Add(this.HY_TopCylinder_Up);
this.groupDo.Controls.Add(this.HY_LineBackRun);
this.groupDo.Location = new System.Drawing.Point(497, 192);
this.groupDo.Location = new System.Drawing.Point(497, 180);
this.groupDo.Name = "groupDo";
this.groupDo.Size = new System.Drawing.Size(731, 195);
this.groupDo.TabIndex = 255;
......@@ -374,7 +374,7 @@
this.HY_MoveCylinder_Give.BackColor = System.Drawing.Color.White;
this.HY_MoveCylinder_Give.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.HY_MoveCylinder_Give.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.HY_MoveCylinder_Give.Location = new System.Drawing.Point(338, 61);
this.HY_MoveCylinder_Give.Location = new System.Drawing.Point(328, 63);
this.HY_MoveCylinder_Give.Name = "HY_MoveCylinder_Give";
this.HY_MoveCylinder_Give.Size = new System.Drawing.Size(140, 34);
this.HY_MoveCylinder_Give.TabIndex = 268;
......@@ -387,7 +387,7 @@
this.HY_LocationCylinder_Down.BackColor = System.Drawing.Color.White;
this.HY_LocationCylinder_Down.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.HY_LocationCylinder_Down.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.HY_LocationCylinder_Down.Location = new System.Drawing.Point(175, 61);
this.HY_LocationCylinder_Down.Location = new System.Drawing.Point(172, 63);
this.HY_LocationCylinder_Down.Name = "HY_LocationCylinder_Down";
this.HY_LocationCylinder_Down.Size = new System.Drawing.Size(140, 34);
this.HY_LocationCylinder_Down.TabIndex = 267;
......@@ -400,7 +400,7 @@
this.HY_TopCylinder_Down.BackColor = System.Drawing.Color.White;
this.HY_TopCylinder_Down.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.HY_TopCylinder_Down.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.HY_TopCylinder_Down.Location = new System.Drawing.Point(17, 61);
this.HY_TopCylinder_Down.Location = new System.Drawing.Point(17, 63);
this.HY_TopCylinder_Down.Name = "HY_TopCylinder_Down";
this.HY_TopCylinder_Down.Size = new System.Drawing.Size(140, 34);
this.HY_TopCylinder_Down.TabIndex = 266;
......@@ -413,7 +413,7 @@
this.HY_MoveCylinder_Take.BackColor = System.Drawing.Color.White;
this.HY_MoveCylinder_Take.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.HY_MoveCylinder_Take.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.HY_MoveCylinder_Take.Location = new System.Drawing.Point(338, 22);
this.HY_MoveCylinder_Take.Location = new System.Drawing.Point(328, 22);
this.HY_MoveCylinder_Take.Name = "HY_MoveCylinder_Take";
this.HY_MoveCylinder_Take.Size = new System.Drawing.Size(140, 34);
this.HY_MoveCylinder_Take.TabIndex = 263;
......@@ -426,7 +426,7 @@
this.HY_FrontStopDown.BackColor = System.Drawing.Color.White;
this.HY_FrontStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.HY_FrontStopDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.HY_FrontStopDown.Location = new System.Drawing.Point(17, 146);
this.HY_FrontStopDown.Location = new System.Drawing.Point(17, 145);
this.HY_FrontStopDown.Name = "HY_FrontStopDown";
this.HY_FrontStopDown.Size = new System.Drawing.Size(140, 34);
this.HY_FrontStopDown.TabIndex = 261;
......@@ -439,7 +439,7 @@
this.HY_LocationCylinder_Up.BackColor = System.Drawing.Color.White;
this.HY_LocationCylinder_Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.HY_LocationCylinder_Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.HY_LocationCylinder_Up.Location = new System.Drawing.Point(175, 22);
this.HY_LocationCylinder_Up.Location = new System.Drawing.Point(172, 22);
this.HY_LocationCylinder_Up.Name = "HY_LocationCylinder_Up";
this.HY_LocationCylinder_Up.Size = new System.Drawing.Size(140, 34);
this.HY_LocationCylinder_Up.TabIndex = 260;
......@@ -452,7 +452,7 @@
this.HY_StopDown.BackColor = System.Drawing.Color.White;
this.HY_StopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.HY_StopDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.HY_StopDown.Location = new System.Drawing.Point(17, 107);
this.HY_StopDown.Location = new System.Drawing.Point(172, 145);
this.HY_StopDown.Name = "HY_StopDown";
this.HY_StopDown.Size = new System.Drawing.Size(140, 34);
this.HY_StopDown.TabIndex = 258;
......@@ -465,7 +465,7 @@
this.HY_LineRun.BackColor = System.Drawing.Color.White;
this.HY_LineRun.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.HY_LineRun.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.HY_LineRun.Location = new System.Drawing.Point(175, 107);
this.HY_LineRun.Location = new System.Drawing.Point(17, 104);
this.HY_LineRun.Name = "HY_LineRun";
this.HY_LineRun.Size = new System.Drawing.Size(140, 34);
this.HY_LineRun.TabIndex = 256;
......@@ -491,7 +491,7 @@
this.HY_LineBackRun.BackColor = System.Drawing.Color.White;
this.HY_LineBackRun.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.HY_LineBackRun.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.HY_LineBackRun.Location = new System.Drawing.Point(175, 146);
this.HY_LineBackRun.Location = new System.Drawing.Point(172, 104);
this.HY_LineBackRun.Name = "HY_LineBackRun";
this.HY_LineBackRun.Size = new System.Drawing.Size(140, 34);
this.HY_LineBackRun.TabIndex = 246;
......@@ -507,9 +507,9 @@
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 9F, 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(6, 103);
this.lblThisSta.Location = new System.Drawing.Point(6, 93);
this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(719, 71);
this.lblThisSta.Size = new System.Drawing.Size(719, 63);
this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -553,7 +553,7 @@
this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Location = new System.Drawing.Point(497, 6);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(731, 182);
this.groupBox6.Size = new System.Drawing.Size(731, 169);
this.groupBox6.TabIndex = 278;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "消息";
......
......@@ -529,14 +529,14 @@ namespace OnlineStore.AssemblyLine
private void btnLineBackRun_Click(object sender, EventArgs e)
{
if (equipBase.IOValue(IO_Type.HY_LineBackRun).Equals(IO_VALUE.HIGH))
{
LogUtil.info(equipBase.Name + "界面点击:" + HY_LineRun.Text + ",已在反转中,停止转动");
equipBean.LineStop();
return;
}
LogUtil.info(equipBase.Name + "界面点击:" + HY_LineBackRun.Text);
equipBean.LineBackRun();
//if (equipBase.IOValue(IO_Type.HY_LineBackRun).Equals(IO_VALUE.HIGH))
//{
// LogUtil.info(equipBase.Name + "界面点击:" + HY_LineRun.Text + ",已在反转中,停止转动");
// equipBean.LineStop();
// return;
//}
//LogUtil.info(equipBase.Name + "界面点击:" + HY_LineBackRun.Text);
//equipBean.LineBackRun();
}
......
......@@ -225,7 +225,7 @@
this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(289, 5);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(276, 360);
this.groupBox4.Size = new System.Drawing.Size(276, 364);
this.groupBox4.TabIndex = 104;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表";
......@@ -243,7 +243,7 @@
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.Size = new System.Drawing.Size(265, 340);
this.tableLayoutPanel2.Size = new System.Drawing.Size(265, 344);
this.tableLayoutPanel2.TabIndex = 103;
//
// groupBox3
......@@ -253,7 +253,7 @@
this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(6, 5);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(276, 360);
this.groupBox3.Size = new System.Drawing.Size(276, 364);
this.groupBox3.TabIndex = 103;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "DI列表";
......@@ -271,16 +271,16 @@
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.Size = new System.Drawing.Size(265, 340);
this.tableLayoutPanel1.Size = new System.Drawing.Size(265, 344);
this.tableLayoutPanel1.TabIndex = 102;
//
// groupBox5
//
this.groupBox5.Controls.Add(this.btnLineStop);
this.groupBox5.Controls.Add(this.btnDriveMotor_Run);
this.groupBox5.Location = new System.Drawing.Point(573, 141);
this.groupBox5.Location = new System.Drawing.Point(573, 137);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(475, 119);
this.groupBox5.Size = new System.Drawing.Size(475, 83);
this.groupBox5.TabIndex = 246;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "IO操作测试";
......@@ -289,7 +289,7 @@
//
this.btnLineStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLineStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLineStop.Location = new System.Drawing.Point(13, 69);
this.btnLineStop.Location = new System.Drawing.Point(171, 25);
this.btnLineStop.Name = "btnLineStop";
this.btnLineStop.Size = new System.Drawing.Size(140, 37);
this.btnLineStop.TabIndex = 278;
......@@ -301,7 +301,7 @@
//
this.btnDriveMotor_Run.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDriveMotor_Run.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDriveMotor_Run.Location = new System.Drawing.Point(13, 22);
this.btnDriveMotor_Run.Location = new System.Drawing.Point(13, 25);
this.btnDriveMotor_Run.Name = "btnDriveMotor_Run";
this.btnDriveMotor_Run.Size = new System.Drawing.Size(140, 37);
this.btnDriveMotor_Run.TabIndex = 260;
......@@ -314,7 +314,7 @@
this.lblTrayNum.AutoSize = true;
this.lblTrayNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTrayNum.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblTrayNum.Location = new System.Drawing.Point(262, 371);
this.lblTrayNum.Location = new System.Drawing.Point(215, 546);
this.lblTrayNum.Name = "lblTrayNum";
this.lblTrayNum.Size = new System.Drawing.Size(68, 17);
this.lblTrayNum.TabIndex = 275;
......@@ -347,9 +347,9 @@
this.groupBox2.Controls.Add(this.btnClear);
this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.lblSelTrayNum);
this.groupBox2.Location = new System.Drawing.Point(571, 271);
this.groupBox2.Location = new System.Drawing.Point(571, 227);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(477, 327);
this.groupBox2.Size = new System.Drawing.Size(475, 327);
this.groupBox2.TabIndex = 283;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "托盘信息编辑";
......@@ -612,7 +612,7 @@
//
this.lblMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMsg.ForeColor = System.Drawing.Color.Red;
this.lblMsg.Location = new System.Drawing.Point(3, 476);
this.lblMsg.Location = new System.Drawing.Point(3, 375);
this.lblMsg.Name = "lblMsg";
this.lblMsg.Size = new System.Drawing.Size(562, 131);
this.lblMsg.TabIndex = 279;
......@@ -622,7 +622,7 @@
//
this.lblMoveInfo.AutoSize = true;
this.lblMoveInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveInfo.Location = new System.Drawing.Point(12, 371);
this.lblMoveInfo.Location = new System.Drawing.Point(17, 546);
this.lblMoveInfo.Name = "lblMoveInfo";
this.lblMoveInfo.Size = new System.Drawing.Size(29, 17);
this.lblMoveInfo.TabIndex = 276;
......
......@@ -792,7 +792,7 @@ namespace OnlineStore.AssemblyLine
int num = 0;
//List<int> moveIDList = new List<int>() { 1, 3, 5, 7, 9, 11, 2, 4, 6, 8, 10, 12, 13, 15, 17, 19, 21, 23, 14, 16, 18, 20, 22, 24 };
List<int> moveIDList = new List<int>() { 1, 2, 3, 4, 5, 6, 101, 201, 202, 203, 204, 205 };
List<int> moveIDList = new List<int>() { 1, 2, 3, 4, 5, 6, 7,101, 201, 202, 203, 204 };
//for (int i = 0; i < moveEquipList.Count; i++)
foreach (int i in moveIDList)
{
......
......@@ -75,6 +75,9 @@
this.label4 = new System.Windows.Forms.Label();
this.btnP2 = new System.Windows.Forms.Button();
this.txtP2 = new System.Windows.Forms.TextBox();
this.groupClamp = new System.Windows.Forms.GroupBox();
this.btnClampWork = new System.Windows.Forms.Button();
this.btnClampRelax = new System.Windows.Forms.Button();
this.panBase.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout();
......@@ -86,6 +89,7 @@
this.tabPage2.SuspendLayout();
this.groupDetial.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupClamp.SuspendLayout();
this.SuspendLayout();
//
// panBase
......@@ -141,9 +145,9 @@
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.cmbWriteIO);
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(496, 411);
this.groupBox1.Location = new System.Drawing.Point(496, 356);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(661, 102);
this.groupBox1.Size = new System.Drawing.Size(373, 159);
this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入";
......@@ -153,7 +157,7 @@
this.btnCloseAll.BackColor = System.Drawing.Color.White;
this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAll.Location = new System.Drawing.Point(479, 18);
this.btnCloseAll.Location = new System.Drawing.Point(242, 105);
this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(110, 34);
this.btnCloseAll.TabIndex = 259;
......@@ -165,7 +169,7 @@
//
this.txtDOIndex.Enabled = false;
this.txtDOIndex.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDOIndex.Location = new System.Drawing.Point(150, 64);
this.txtDOIndex.Location = new System.Drawing.Point(149, 63);
this.txtDOIndex.MaxLength = 10;
this.txtDOIndex.Name = "txtDOIndex";
this.txtDOIndex.Size = new System.Drawing.Size(40, 23);
......@@ -176,7 +180,7 @@
//
this.txtDoName.Enabled = false;
this.txtDoName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDoName.Location = new System.Drawing.Point(66, 64);
this.txtDoName.Location = new System.Drawing.Point(65, 63);
this.txtDoName.MaxLength = 10;
this.txtDoName.Name = "txtDoName";
this.txtDoName.Size = new System.Drawing.Size(27, 23);
......@@ -188,7 +192,7 @@
this.label17.AutoSize = true;
this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label17.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label17.Location = new System.Drawing.Point(20, 67);
this.label17.Location = new System.Drawing.Point(19, 66);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(35, 17);
this.label17.TabIndex = 274;
......@@ -200,7 +204,7 @@
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label14.Location = new System.Drawing.Point(104, 67);
this.label14.Location = new System.Drawing.Point(103, 66);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(35, 17);
this.label14.TabIndex = 273;
......@@ -212,7 +216,7 @@
this.btnOpenDo.BackColor = System.Drawing.Color.White;
this.btnOpenDo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenDo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDo.Location = new System.Drawing.Point(347, 18);
this.btnOpenDo.Location = new System.Drawing.Point(12, 105);
this.btnOpenDo.Name = "btnOpenDo";
this.btnOpenDo.Size = new System.Drawing.Size(110, 34);
this.btnOpenDo.TabIndex = 272;
......@@ -225,7 +229,7 @@
this.btnWriteSingleDO.BackColor = System.Drawing.Color.White;
this.btnWriteSingleDO.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnWriteSingleDO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWriteSingleDO.Location = new System.Drawing.Point(348, 58);
this.btnWriteSingleDO.Location = new System.Drawing.Point(127, 105);
this.btnWriteSingleDO.Name = "btnWriteSingleDO";
this.btnWriteSingleDO.Size = new System.Drawing.Size(110, 34);
this.btnWriteSingleDO.TabIndex = 269;
......@@ -236,7 +240,7 @@
// txtWriteTime
//
this.txtWriteTime.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtWriteTime.Location = new System.Drawing.Point(272, 64);
this.txtWriteTime.Location = new System.Drawing.Point(271, 63);
this.txtWriteTime.MaxLength = 10;
this.txtWriteTime.Name = "txtWriteTime";
this.txtWriteTime.Size = new System.Drawing.Size(40, 23);
......@@ -248,7 +252,7 @@
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(201, 67);
this.label5.Location = new System.Drawing.Point(200, 66);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 17);
this.label5.TabIndex = 270;
......@@ -258,7 +262,7 @@
// txtSlaveId
//
this.txtSlaveId.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtSlaveId.Location = new System.Drawing.Point(322, 24);
this.txtSlaveId.Location = new System.Drawing.Point(317, 63);
this.txtSlaveId.MaxLength = 10;
this.txtSlaveId.Name = "txtSlaveId";
this.txtSlaveId.Size = new System.Drawing.Size(12, 23);
......@@ -274,9 +278,9 @@
this.cmbWriteIO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbWriteIO.FormattingEnabled = true;
this.cmbWriteIO.ItemHeight = 22;
this.cmbWriteIO.Location = new System.Drawing.Point(17, 24);
this.cmbWriteIO.Location = new System.Drawing.Point(12, 22);
this.cmbWriteIO.Name = "cmbWriteIO";
this.cmbWriteIO.Size = new System.Drawing.Size(299, 28);
this.cmbWriteIO.Size = new System.Drawing.Size(340, 28);
this.cmbWriteIO.TabIndex = 234;
this.cmbWriteIO.ValueMember = "ProName";
this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem);
......@@ -347,14 +351,14 @@
this.groupDO.Controls.Add(this.UpDownCylinder_Down);
this.groupDO.Controls.Add(this.TopCylinder_Down);
this.groupDO.Controls.Add(this.StopDown2);
this.groupDO.Controls.Add(this.StopDown1);
this.groupDO.Controls.Add(this.ClampCylinder_Relax);
this.groupDO.Controls.Add(this.StopDown1);
this.groupDO.Controls.Add(this.BeforeAfterCylinder_Before);
this.groupDO.Controls.Add(this.TopCylinder_Up);
this.groupDO.Controls.Add(this.UpDownCylinder_Up);
this.groupDO.Location = new System.Drawing.Point(496, 281);
this.groupDO.Location = new System.Drawing.Point(496, 238);
this.groupDO.Name = "groupDO";
this.groupDO.Size = new System.Drawing.Size(661, 125);
this.groupDO.Size = new System.Drawing.Size(661, 115);
this.groupDO.TabIndex = 255;
this.groupDO.TabStop = false;
this.groupDO.Text = "IO操作测试";
......@@ -364,7 +368,7 @@
this.ClampCylinder_Work.BackColor = System.Drawing.Color.White;
this.ClampCylinder_Work.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.ClampCylinder_Work.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ClampCylinder_Work.Location = new System.Drawing.Point(266, 30);
this.ClampCylinder_Work.Location = new System.Drawing.Point(527, 26);
this.ClampCylinder_Work.Name = "ClampCylinder_Work";
this.ClampCylinder_Work.Size = new System.Drawing.Size(120, 34);
this.ClampCylinder_Work.TabIndex = 262;
......@@ -377,7 +381,7 @@
this.BeforeAfterCylinder_After.BackColor = System.Drawing.Color.White;
this.BeforeAfterCylinder_After.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.BeforeAfterCylinder_After.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.BeforeAfterCylinder_After.Location = new System.Drawing.Point(395, 70);
this.BeforeAfterCylinder_After.Location = new System.Drawing.Point(271, 66);
this.BeforeAfterCylinder_After.Name = "BeforeAfterCylinder_After";
this.BeforeAfterCylinder_After.Size = new System.Drawing.Size(120, 34);
this.BeforeAfterCylinder_After.TabIndex = 261;
......@@ -390,7 +394,7 @@
this.UpDownCylinder_Down.BackColor = System.Drawing.Color.White;
this.UpDownCylinder_Down.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.UpDownCylinder_Down.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.UpDownCylinder_Down.Location = new System.Drawing.Point(524, 70);
this.UpDownCylinder_Down.Location = new System.Drawing.Point(399, 66);
this.UpDownCylinder_Down.Name = "UpDownCylinder_Down";
this.UpDownCylinder_Down.Size = new System.Drawing.Size(120, 34);
this.UpDownCylinder_Down.TabIndex = 260;
......@@ -403,7 +407,7 @@
this.TopCylinder_Down.BackColor = System.Drawing.Color.White;
this.TopCylinder_Down.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.TopCylinder_Down.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.TopCylinder_Down.Location = new System.Drawing.Point(137, 70);
this.TopCylinder_Down.Location = new System.Drawing.Point(143, 66);
this.TopCylinder_Down.Name = "TopCylinder_Down";
this.TopCylinder_Down.Size = new System.Drawing.Size(120, 34);
this.TopCylinder_Down.TabIndex = 259;
......@@ -416,7 +420,7 @@
this.StopDown2.BackColor = System.Drawing.Color.White;
this.StopDown2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.StopDown2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.StopDown2.Location = new System.Drawing.Point(8, 70);
this.StopDown2.Location = new System.Drawing.Point(15, 66);
this.StopDown2.Name = "StopDown2";
this.StopDown2.Size = new System.Drawing.Size(120, 34);
this.StopDown2.TabIndex = 258;
......@@ -429,7 +433,7 @@
this.StopDown1.BackColor = System.Drawing.Color.White;
this.StopDown1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.StopDown1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.StopDown1.Location = new System.Drawing.Point(8, 30);
this.StopDown1.Location = new System.Drawing.Point(15, 26);
this.StopDown1.Name = "StopDown1";
this.StopDown1.Size = new System.Drawing.Size(120, 34);
this.StopDown1.TabIndex = 256;
......@@ -442,7 +446,7 @@
this.ClampCylinder_Relax.BackColor = System.Drawing.Color.White;
this.ClampCylinder_Relax.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.ClampCylinder_Relax.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ClampCylinder_Relax.Location = new System.Drawing.Point(266, 70);
this.ClampCylinder_Relax.Location = new System.Drawing.Point(527, 66);
this.ClampCylinder_Relax.Name = "ClampCylinder_Relax";
this.ClampCylinder_Relax.Size = new System.Drawing.Size(120, 34);
this.ClampCylinder_Relax.TabIndex = 255;
......@@ -455,7 +459,7 @@
this.BeforeAfterCylinder_Before.BackColor = System.Drawing.Color.White;
this.BeforeAfterCylinder_Before.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.BeforeAfterCylinder_Before.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.BeforeAfterCylinder_Before.Location = new System.Drawing.Point(395, 30);
this.BeforeAfterCylinder_Before.Location = new System.Drawing.Point(271, 26);
this.BeforeAfterCylinder_Before.Name = "BeforeAfterCylinder_Before";
this.BeforeAfterCylinder_Before.Size = new System.Drawing.Size(120, 34);
this.BeforeAfterCylinder_Before.TabIndex = 249;
......@@ -468,7 +472,7 @@
this.TopCylinder_Up.BackColor = System.Drawing.Color.White;
this.TopCylinder_Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.TopCylinder_Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.TopCylinder_Up.Location = new System.Drawing.Point(137, 30);
this.TopCylinder_Up.Location = new System.Drawing.Point(143, 26);
this.TopCylinder_Up.Name = "TopCylinder_Up";
this.TopCylinder_Up.Size = new System.Drawing.Size(120, 34);
this.TopCylinder_Up.TabIndex = 246;
......@@ -481,7 +485,7 @@
this.UpDownCylinder_Up.BackColor = System.Drawing.Color.White;
this.UpDownCylinder_Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.UpDownCylinder_Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.UpDownCylinder_Up.Location = new System.Drawing.Point(524, 30);
this.UpDownCylinder_Up.Location = new System.Drawing.Point(399, 26);
this.UpDownCylinder_Up.Name = "UpDownCylinder_Up";
this.UpDownCylinder_Up.Size = new System.Drawing.Size(120, 34);
this.UpDownCylinder_Up.TabIndex = 252;
......@@ -496,9 +500,9 @@
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 9F, 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(4, 181);
this.lblThisSta.Location = new System.Drawing.Point(2, 169);
this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(652, 84);
this.lblThisSta.Size = new System.Drawing.Size(655, 51);
this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -518,6 +522,7 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.groupClamp);
this.tabPage1.Controls.Add(this.groupDO);
this.tabPage1.Controls.Add(this.groupBox6);
this.tabPage1.Controls.Add(this.groupBox3);
......@@ -542,7 +547,7 @@
this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Location = new System.Drawing.Point(496, 6);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(661, 270);
this.groupBox6.Size = new System.Drawing.Size(661, 229);
this.groupBox6.TabIndex = 278;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "消息";
......@@ -552,9 +557,9 @@
this.lblInoutInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblInoutInfo.ForeColor = System.Drawing.Color.Green;
this.lblInoutInfo.Location = new System.Drawing.Point(16, 19);
this.lblInoutInfo.Location = new System.Drawing.Point(2, 19);
this.lblInoutInfo.Name = "lblInoutInfo";
this.lblInoutInfo.Size = new System.Drawing.Size(637, 40);
this.lblInoutInfo.Size = new System.Drawing.Size(655, 40);
this.lblInoutInfo.TabIndex = 281;
this.lblInoutInfo.Text = "当前出入库:";
//
......@@ -576,9 +581,9 @@
this.lblInstoreList.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblInstoreList.ForeColor = System.Drawing.Color.Green;
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(249, 65);
this.lblInstoreList.Location = new System.Drawing.Point(247, 66);
this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(407, 96);
this.lblInstoreList.Size = new System.Drawing.Size(410, 96);
this.lblInstoreList.TabIndex = 277;
//
// tabPage2
......@@ -880,6 +885,41 @@
this.txtP2.TabIndex = 305;
this.txtP2.Text = "-1";
//
// groupClamp
//
this.groupClamp.Controls.Add(this.btnClampWork);
this.groupClamp.Controls.Add(this.btnClampRelax);
this.groupClamp.Location = new System.Drawing.Point(875, 356);
this.groupClamp.Name = "groupClamp";
this.groupClamp.Size = new System.Drawing.Size(282, 159);
this.groupClamp.TabIndex = 282;
this.groupClamp.TabStop = false;
this.groupClamp.Text = "夹爪操作";
//
// btnClampWork
//
this.btnClampWork.BackColor = System.Drawing.Color.White;
this.btnClampWork.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClampWork.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClampWork.Location = new System.Drawing.Point(39, 76);
this.btnClampWork.Name = "btnClampWork";
this.btnClampWork.Size = new System.Drawing.Size(140, 34);
this.btnClampWork.TabIndex = 282;
this.btnClampWork.Text = "夹料气缸夹紧";
this.btnClampWork.UseVisualStyleBackColor = false;
//
// btnClampRelax
//
this.btnClampRelax.BackColor = System.Drawing.Color.White;
this.btnClampRelax.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClampRelax.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClampRelax.Location = new System.Drawing.Point(39, 34);
this.btnClampRelax.Name = "btnClampRelax";
this.btnClampRelax.Size = new System.Drawing.Size(140, 34);
this.btnClampRelax.TabIndex = 281;
this.btnClampRelax.Text = "夹料气缸放松";
this.btnClampRelax.UseVisualStyleBackColor = false;
//
// FrmMoveEquip
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......@@ -912,6 +952,7 @@
this.groupDetial.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupClamp.ResumeLayout(false);
this.ResumeLayout(false);
}
......@@ -976,6 +1017,9 @@
private System.Windows.Forms.Button TopCylinder_Down;
private System.Windows.Forms.Label lblP2;
private System.Windows.Forms.Label lblP3List;
private System.Windows.Forms.GroupBox groupClamp;
private System.Windows.Forms.Button btnClampWork;
private System.Windows.Forms.Button btnClampRelax;
}
}
......@@ -61,6 +61,12 @@ namespace OnlineStore.AssemblyLine
this.Text = equipBean.Name;
LoadDP2();
LoadDOBtn(groupDO);
if (equipBean.OnlyProOutTray)
{
btnInStore.Text = "出库盘移栽";
btnOutStore.Visible = false;
}
IsLoad = true;
}
......@@ -90,7 +96,7 @@ namespace OnlineStore.AssemblyLine
roleindex++;
DOControlList.Add(ioValue.ProName, control);
}
this.SuspendLayout(); //此处为不闪屏,一定要有的!
this.SuspendLayout();
cmbWriteIO.DataSource = new List<ConfigIO>(equipBean.Config.DOList.Values);
cmbWriteIO.ValueMember = "ProName";
......@@ -138,7 +144,14 @@ namespace OnlineStore.AssemblyLine
}
if (equipBean.MoveInfo.MoveType.Equals(LineMoveType.InStore) || equipBean.MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{
lblInoutInfo.Text = (equipBean.MoveInfo.MoveType.Equals(LineMoveType.InStore) ? "入库:" : "出库") + equipBean.MoveInfo.MoveParam.ToStr();
if (!equipBean.OnlyProOutTray)
{
lblInoutInfo.Text = (equipBean.MoveInfo.MoveType.Equals(LineMoveType.InStore) ? "入库:" : "出库:") + equipBean.MoveInfo.MoveParam.ToStr();
}
else
{
lblInoutInfo.Text = "出料:" + equipBean.MoveInfo.MoveParam.ToStr();
}
}
else
{
......@@ -149,6 +162,8 @@ namespace OnlineStore.AssemblyLine
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.runStatus) + "(" + canOut + ")";
lblThisSta.Text = equipBean.WarnMsg;
string text = "";
if (!equipBean.OnlyProOutTray)
{
List<InOutParam> ps = new List<InOutParam>(equipBean.waitInStoreList);
if (ps.Count > 0)
{
......@@ -170,6 +185,7 @@ namespace OnlineStore.AssemblyLine
}
}
}
}
if (!lblInstoreList.Text.Equals(text))
{
lblInstoreList.Text = text;
......@@ -378,7 +394,7 @@ namespace OnlineStore.AssemblyLine
}
else
{
MessageBox.Show("未启动或不在空闲中,无法入库测试!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
MessageBox.Show("未启动或不在空闲中,无法"+btnInStore.Text+"!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
private void cmbSizeList_SelectedIndexChanged(object sender, EventArgs e)
......

8.6 KB | 宽: | 高:

21.1 KB | 宽: | 高:

source/AssemblyLineClient/image/line.png
source/AssemblyLineClient/image/line.png
source/AssemblyLineClient/image/line.png
source/AssemblyLineClient/image/line.png
  • 两方对比
  • 交换覆盖
  • 透明覆盖
20200105
1.获取入库库位号时需要判断是否是出库料。
2.HY9和HY15,如果是NG料直接横移。
3.入库时需要判断托盘的库位号和入库任务的库位号一致。
4.横移模块出口加延迟。
5.入料使用维护数据高度。
6.暂停运动时界面未显示勾选。
7.上料提升上料轴增加P4速度/料盘拿走后提升轴下降速度。
20201022
新建项目,SO664环形线
移栽修改:夹紧信号需要拿料,气缸上升之后再检测。
上料修改:夹紧信号需要拿料,气缸上升之后再检测。
新加固定气缸,固定气缸固定之后,定位气缸再动作
定位工位的顶升气缸只有在横移料架离开的时候才用。
出料线分为两种。
上料环形线托盘处理模块放入横移处理中,或者T3-C1处理。
夹爪气缸修改。上料模块增加固定气缸
上料机构,入料判断托盘是否到位,放行托盘,从lineBean里调用
紧急出料,开始紧急出库横移主动调用开始 托盘出库方法。放行从lineBean里调用
HY,T3C1,只使用MoveInfo,暂不使用,托盘处理MoveType=CheckFixture;
接驳台横移,托盘处理用SecondMoveInfo,料盘移栽用MoveInfo
出料与托盘关联
20201210
定位气缸定位之后,固定气缸才下降。
固定气缸默认是上升状态
上料模块,顶升气缸升降时,出口顶升气缸同时动作。
上料机构,入料横移到放料端时,再检测料盘宽度
20201216
前阻挡放行10秒后,若还未收到托盘检测信号,结束托盘处理。
进仓和T3-C1料盘检测增加验证,若未检测到信号结束处理。
20201217
HY17,HY5,顶升气缸默认上升。
20201218
HY3等待HY0托盘检测和前阻挡检测都没信号时再放行空托盘。
出料料盘更新的线体位置错误。
接驳台托盘离开线体没转。
T4,缓冲阻挡去掉
20201228
机器人编号修改,左侧2,右侧1.
1.HY8托盘逻辑修改。
2.接驳台提前放行托盘.
T4料架处理修改。
/****************************************原有更改**********************************************/
20200429:
入料口定位工位检测料架后延迟3秒
停止运行时需要给agv发none
needEnter和needLeave都延迟3秒再发。
入料缓冲阻挡修改。
20200428:
出大料时,横移气缸还未后退,叉子出料与横移气缸相撞
料仓出料到门口后,最好验证门口有料盘信号,否则报警。
20200417
进料阻挡只下降500ms。
入库未收到服务器反馈时,调用下取消入库任务。
放托盘放在前面.
agvCancelState默认需要不打勾
急停时agv需要设置None
20200415
findTempRfid只有启动之后第一个料料架需要验证,其他不需要。
皮带线每一个都扫码。
20200411
紧急出料料串逻辑修改:
//如果虚拟料架号为空,或者虚拟料架号与当前一致才可以出库
//料架号不一致时,直接送出料架
第一次启动时,需要查询下当前料架是否有虚拟料架号,没有虚拟料架号,可以直接用
有虚拟料架号,判断是否还有任务,没有任务就结束处理。
分盘料/紧急料放上料串或料架时调用
/rest/api/qisda/device/afterPutCut
参数:
cid: 料仓cid,流水线可传入空
barcode : 条码
rfid : RFID
rfidLoc: 料架位置,流水线可传-1
> 返回:
>>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} `
>>
>> - code: 0为正常,其他为异常,
>> - msg:消息,
>> - data:为包装料仓的空闲仓位数(key为与客户端一致的料仓标识,value为空闲仓位)
>> - cutPackageTask: 表示当前包装仓的分盘任务数
>> - urgentPackageTask: 表示当前包装仓的紧急料任务数
>> - cutTask: 表示流水线分盘任务数
>> - urgentTask: 表示流水线紧急料任务数
分盘料/紧急料启动时获取料架的虚拟RFID调用
地址:
/rest/api/qisda/device/findTempRfid
参数:
rfid : RFID
返回:
{"code": 0, "msg":"ok", "data":{"tempRfid":""}}
code: 0为正常,其他为异常,
msg:消息,
data:
tempRfid: 表示当前料架(料串)对应的虚拟RFID
20200410
上料模块,RFID读取改为扫描模式,如果没有读到料架号,直接送出料架。
大盘>30mm的料入库时,托盘先不顶升,等待横移机构到达托盘上方后,升降下降,顶升上升。
七寸盘最高=16mm.
11,13,15,最低=12mm
20200409
紧急出料模块,料架离开时,mark=紧急料或者分配料,rfid=料架号
20200408 盘高计算修改:如果检测出<=15,都按照8计算
agv更新
20200403
紧急出料不放太慢。
rfid不需要格式化。
上料模块批量轴上升时,如果不是第一次上升,最多上升100mm
20200324
1.入库逻辑修改:提升轴先上升后需要下降到料盘不溢出的位置,横移气缸才能动作。
2.出料模块取料条件修改:随意放时需要等皮带线空闲。
3.移栽模块出库过程中或还有出库任务,不能入库,完全出库完成再入库
紧急出料速度优化
出料模块伺服速度变慢问题?
出料四横移顶升增加延迟。
20200323
。出库料盘在料仓门口,入库又拿了一盘料。
皮带线6有时会转两个盘到接驳台
20200317
1.托盘检测的还会报警。
2.伺服问题?测高不准确。
3.条码扫一种类型后,判断有有效条码则不再扫码。
20200315:
皮带线报警后不继续转动皮带线。
http发送去掉ping。
20200314:
出料机构:如果是7寸盘,提前放行托盘
皮带线123:增加NG气缸逻辑
急停判断修改。
T5上料时,T4的托盘没有等待。

20210114
新建项目,SO827环形线
线体转动方向
D7处无检测信号,如何判断出料口是否有料
......@@ -158,9 +158,6 @@
<Content Include="LineConfig\HY\Config_HYEquip.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="LineConfig\HY\Config_HYEquip_05.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="LineConfig\MoveEquip\Config_MoveEquip.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
......@@ -179,6 +176,11 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="LineConfig\MoveEquip\Config_MoveEquip_07.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
......
......@@ -19,10 +19,10 @@ PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeVal
,,,,,,
AXIS,0,轴二移栽上下轴,UpDown_Axis,12,HC,,20000,10000,15000,500,4000,15000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,0,,
PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=29000;8=30400;48=20800;12=26000;16=22000;24=22000;32=22800;44=28000;56=11000,,
PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=11000,,
PRO,0,移栽上下轴P3取料位置,UpDownAxisP3,8800,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,20000,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,20000,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,14000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=30400;7X12=30000;7X16=29800;7X24=29600;15X44=24500;15X32=25800;15X56=23100;15X24=26600;15X16=27100;15X12=20800;11X12=29200;11X16=28700;13X12=27900;13X16=27800;13X24=27100;13X32=26200;13X44=25100;13X56=23700,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=11000,,
,,,,,,
......@@ -5,6 +5,9 @@ PRO,0,IO信号超时时间(秒),IOSingle_TimerOut,15,,
,0,IO模块对应的DI数量,IO_DILength,,,
,0,模块对应的DO数量,IO_DOLength,,,
,,,,,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,3000,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,2000,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,2000,,
,,,,,,
PRO,0,D1移栽1-托盘-RFID-IP,PRO_RFIP_001,192.168.210.138,,
PRO,0,D1移栽2-托盘-RFID-IP,PRO_RFIP_002,192.168.210.139,,
......@@ -23,12 +26,12 @@ PRO,0,上料模块T1-料架-RFID-IP,PRO_RFIP_101,192.168.210.149,,
DI,0,急停,SuddenStop_BTN,0,HC,X00
DI,0,复位,Reset_BTN,1,HC,X01
DI,0,气压检测,Airpressure_Check,2,HC,X02
DI,205,D7阻挡1托盘检测,HY_FrontStopCheck,3,HC,X03
DI,205,D7阻挡2托盘检测,HY_TrayCheck,4,HC,X04
DI,205,D7顶升上升端,HY_TopCylinder_Up,5,HC,X05
DI,205,D7顶升上升端,HY_TopCylinder_Down,6,HC,X06
DI,205,D7横移前进端,HY_MoveCylinder_Take,7,HC,X07
DI,205,D7横移后退端,HY_MoveCylinder_Give,8,HC,X08
DI,7,D7阻挡1托盘检测,StopCheck1,3,HC,X03
DI,7,D7阻挡2托盘检测,StopCheck2,4,HC,X04
DI,7,D7顶升上升端,TopCylinder_Up,5,HC,X05
DI,7,D7顶升上升端,TopCylinder_Down,6,HC,X06
DI,7,D7横移前进端,BeforeAfterCylinder_Before,7,HC,X07
DI,7,D7横移后退端,BeforeAfterCylinder_After,8,HC,X08
DI,201,HY1横移前阻挡托盘检测,HY_FrontStopCheck,9,HC,X09
DI,201,HY1横移托盘检测,HY_TrayCheck,10,HC,X10
DI,201,HY1横移顶升上升端,HY_TopCylinder_Up,11,HC,X11
......@@ -40,30 +43,30 @@ DI,202,HY2横移定位1上升端,HY_LocationCylinder_Up1,16,HC,X16
DI,202,HY2横移定位1下降端,HY_LocationCylinder_Down1,17,HC,X17
DI,202,HY2横移定位2上升端,HY_LocationCylinder_Up2,18,HC,X18
DI,202,HY2横移定位2下降端,HY_LocationCylinder_Down2,19,HC,X19
DI,1,D1阻挡1托盘检测,StopDown1,20,HC,X20
DI,1,D1阻挡2托盘检测,StopDown2,21,HC,X21
DI,1,D1阻挡1托盘检测,StopCheck1,20,HC,X20
DI,1,D1阻挡2托盘检测,StopCheck2,21,HC,X21
DI,1,D1顶升上升端,TopCylinder_Up,22,HC,X22
DI,1,D1顶升下降端,TopCylinder_Down,23,HC,X23
DI,1,D1横移前进端,BeforeAfterCylinder_Before,24,HC,X24
DI,1,D1横移后退端,BeforeAfterCylinder_After,25,HC,X25
DI,1,D1升降上升端,UpDownCylinder_Up,26,HC,X26
DI,1,D1升降下降端,UpDownCylinder_Down,27,HC,X27
DI,2,D2阻挡1托盘检测,StopDown1,28,HC,X28
DI,2,D2阻挡2托盘检测,StopDown2,29,HC,X29
DI,2,D2阻挡1托盘检测,StopCheck1,28,HC,X28
DI,2,D2阻挡2托盘检测,StopCheck2,29,HC,X29
DI,2,D2顶升上升端,TopCylinder_Up,30,HC,X30
DI,2,D2顶升下降端,TopCylinder_Down,31,HC,X31
DI,2,D2横移前进端,BeforeAfterCylinder_Before,32,HC,X32
DI,2,D2横移后退端,BeforeAfterCylinder_After,33,HC,X33
DI,2,D2升降上升端,UpDownCylinder_Up,34,HC,X34
DI,2,D2升降下降端,UpDownCylinder_Down,35,HC,X35
DI,3,D3阻挡1托盘检测,StopDown1,36,HC,X36
DI,3,D3阻挡2托盘检测,StopDown2,37,HC,X37
DI,3,D3阻挡1托盘检测,StopCheck1,36,HC,X36
DI,3,D3阻挡2托盘检测,StopCheck2,37,HC,X37
DI,3,D3顶升上升端,TopCylinder_Up,38,HC,X38
DI,3,D3顶升下降端,TopCylinder_Down,39,HC,X39
DI,3,D3横移前进端,BeforeAfterCylinder_Before,40,HC,X40
DI,3,D3横移后退端,BeforeAfterCylinder_After,41,HC,X41
DI,4,D4阻挡1托盘检测,StopDown1,42,HC,X42
DI,4,D4阻挡2托盘检测,StopDown2,43,HC,X43
DI,4,D4阻挡1托盘检测,StopCheck1,42,HC,X42
DI,4,D4阻挡2托盘检测,StopCheck2,43,HC,X43
DI,4,D4顶升上升端,TopCylinder_Up,44,HC,X44
DI,4,D4顶升下降端,TopCylinder_Down,45,HC,X45
DI,4,D4横移前进端,BeforeAfterCylinder_Before,46,HC,X46
......@@ -75,14 +78,14 @@ DI,203,HY3横移顶升下降端,HY_TopCylinder_Down,51,HC,X51
DI,204,HY4横移托盘检测,HY_TrayCheck,52,HC,X52
DI,204,HY4横移顶升上升端,HY_TopCylinder_Up,53,HC,X53
DI,204,HY4横移顶升下降端,HY_TopCylinder_Down,54,HC,X54
DI,5,D5阻挡1托盘检测,StopDown1,55,HC,X55
DI,5,D5阻挡2托盘检测,StopDown2,56,HC,X56
DI,5,D5阻挡1托盘检测,StopCheck1,55,HC,X55
DI,5,D5阻挡2托盘检测,StopCheck2,56,HC,X56
DI,5,D5顶升上升端,TopCylinder_Up,57,HC,X57
DI,5,D5顶升下降端,TopCylinder_Down,58,HC,X58
DI,5,D5横移前进端,BeforeAfterCylinder_Before,59,HC,X59
DI,5,D5横移后退端,BeforeAfterCylinder_After,60,HC,X60
DI,6,D6阻挡1托盘检测,StopDown1,61,HC,X61
DI,6,D6阻挡2托盘检测,StopDown2,62,HC,X62
DI,6,D6阻挡1托盘检测,StopCheck1,61,HC,X61
DI,6,D6阻挡2托盘检测,StopCheck2,62,HC,X62
DI,6,D6顶升上升端,TopCylinder_Up,63,HC,X63
DI,6,D6顶升下降端,TopCylinder_Down,64,HC,X64
DI,6,D6横移前进端,BeforeAfterCylinder_Before,65,HC,X65
......@@ -142,12 +145,12 @@ DO,202,HY2横移电机正转,HY_LineRun,5,HC,Y05
DO,203,HY3横移电机正转,HY_LineRun,6,HC,Y06
DO,204,HY4横移电机正转,HY_LineRun,7,HC,Y07
DO,0,C1线体运转,MotorRun_C1,8,HC,Y08
DO,205,D7阻挡1下降,HY_FrontStopDown,9,HC,Y09
DO,205,D7阻挡2下降,HY_StopDown,10,HC,Y10
DO,205,D7顶升上升,HY_TopCylinder_Up,11,HC,Y11
DO,205,D7顶升上升,HY_TopCylinder_Down,12,HC,Y12
DO,205,D7横移前进,HY_MoveCylinder_Take,13,HC,Y13
DO,205,D7横移后退,HY_MoveCylinder_Give,14,HC,Y14
DO,7,D7阻挡1下降,StopDown1,9,HC,Y09
DO,7,D7阻挡2下降,StopDown2,10,HC,Y10
DO,7,D7顶升上升,TopCylinder_Up,11,HC,Y11
DO,7,D7顶升上升,TopCylinder_Down,12,HC,Y12
DO,7,D7横移前进,BeforeAfterCylinder_Before,13,HC,Y13
DO,7,D7横移后退,BeforeAfterCylinder_After,14,HC,Y14
DO,201,HY1前阻挡下降,HY_FrontStopDown,15,HC,Y15
DO,201,HY1横移顶升上升,HY_TopCylinder_Up,16,HC,Y16
DO,201,HY1横移顶升下降,HY_TopCylinder_Down,17,HC,Y17
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,1,,
,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,19,HC,,20000,15000,15000,1000,5000,20000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,0,,
PRO,0,移栽上下轴托盘取料点P2,UpDownP2List,0=8000;12=11900;16=11800;24=11100;32=9900;44=8500;48=5000;56=7100;8=14500,,
PRO,0,移栽上下轴接驳台放料点P3,UpDownP3List,0=5000;12=13400;16=13200;24=12600;32=11800;44=10500;48=5000;56=9200;8=13900,,
PRO,0,移栽上下轴托盘取料详细点P2,UpDownP2DetialList,7X8=14500;7X12=13800;7X16=13600;7X24=12900;11X12=13200;11X16=12600;13X12=11900;13X16=11800;13X24=11000;13X32=10100;13X44=9100;13X56=8100;15X16=11100;15X24=10600;15X32=9900;15X44=8500;15X56=7100,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,20000,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,16000,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,16000,,
......@@ -4,9 +4,9 @@ PRO,0,是否存放的大料盘,IsBigTray,0
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,0,,
,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,3000,4000,4000,1000,5000,20000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=80000;12=141200;16=130000;24=110000;32=98000;44=76000;48=73700;56=61000;8=150000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=90000;12=157500;16=150800;24=138200;32=116800;44=92500;48=90000;56=95000;8=160000,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,8000,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=8000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=9000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,400,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,300,,
......
......@@ -5,9 +5,6 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,
,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,7,HC,,3000,4000,4000,1000,5000,20000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=80000;12=9162;16=8943;24=110000;32=98000;44=76000;48=73700;56=61000;8=9856,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=90000;12=9325;16=9175;24=138200;32=116800;44=92500;48=90000;56=95000;8=10110,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=9856;7X16=8943;7X12=9162,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,3000,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,2000,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,2000,,
\ No newline at end of file
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=8000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=9000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=8000,,
......@@ -5,9 +5,6 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,
,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,7,HC,,3000,4000,4000,1000,5000,20000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=80000;12=9162;16=8943;24=110000;32=98000;44=76000;48=73700;56=61000;8=9856,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=90000;12=9325;16=9175;24=138200;32=116800;44=92500;48=90000;56=95000;8=10110,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=9856;7X16=8943;7X12=9162,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,3000,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,2000,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,2000,,
\ No newline at end of file
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=8000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=9000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=8000,,
\ No newline at end of file
......@@ -5,9 +5,6 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,
,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,8,HC,,3000,4000,4000,1000,5000,20000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=80000;12=8883;16=8848;24=110000;32=98000;44=76000;48=73700;56=61000;8=9938,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=90000;12=9513;16=9150;24=138200;32=116800;44=92500;48=90000;56=95000;8=10153,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=9938;7X12=8883;7X16=8848,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,3000,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,2000,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,2000,,
\ No newline at end of file
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=8000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=9000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=8000,,
\ No newline at end of file
......@@ -5,9 +5,6 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,
,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,16,HC,,3000,4000,4000,1000,5000,20000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=80000;12=8321;16=7883;24=7173;32=5868;44=5300;48=73700;56=3222;8=150000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=90000;12=11010;16=10687;24=9575;32=8714;44=7997;48=90000;56=5719;8=160000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,15X56=3222;13X16=7883;13X44=5300;15X32=5868;13X24=7173;13X32=6387;13X12=8321;15X44=4574;11X12=8859,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,3000,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,2000,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,2000,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=8000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=9000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=8000,,
\ No newline at end of file
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否存放的大料盘,IsBigTray,1
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,
,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,16,HC,,3000,4000,4000,1000,5000,20000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=8000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=9000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=8000,,
\ No newline at end of file
......@@ -43,7 +43,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo = new LineMoveInfo(DeviceID, "[" + Name.Trim() + "-Move]");
SecondMoveInfo = new LineMoveInfo(DeviceID, "[" + Name.Trim() + "-SMove]");
RFIDIP = RFIDManager.GetRFIP(DeviceID);
HasOutLine = config.DOList.ContainsKey(IO_Type.SL_OutLine_Run);
//HasOutLine = config.DOList.ContainsKey(IO_Type.SL_OutLine_Run);
addLastDI(IO_Type.SL_Reset_BTN, IO_VALUE.LOW);
mainTimer.Enabled = true;
}
......@@ -130,7 +130,6 @@ namespace OnlineStore.DeviceLibrary
//夹紧气缸放松
CylinderMove(null, IO_Type.SL_ClampCylinder_Work, IO_Type.SL_ClampCylinder_Relax);
IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW));
//MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW));
......@@ -295,10 +294,8 @@ namespace OnlineStore.DeviceLibrary
private void AllLineMove(IO_VALUE value)
{
IOMove(IO_Type.SL_Line_Run, value);
IOMove(IO_Type.SL_OutLine_Run, value);
IOMove(IO_Type.SL_LocationSideWay_Run, value);
IOMove(IO_Type.SL_OutSideWay_Run, value);
IOMove(IO_Type.SL_RollerLine_Run, value);
}
internal override void StopMove()
{
......@@ -806,25 +803,25 @@ namespace OnlineStore.DeviceLibrary
{
if (NoErrorAlarm())
{
bool HasOutLine = Config.DOList.ContainsKey(IO_Type.SL_OutLine_Run);
if (HasOutLine && IOValue(IO_Type.SL_OutLine_Check).Equals(IO_VALUE.HIGH))
{
if (CheckStopWatch(needLeaveWatch, 3000))
{
ClientLevel level = ClientLevel.Low;
if (Config.IsCanOut.Equals(1))
{
level = ClientLevel.High;
}
else if (IOValue(IO_Type.SL_Out_Check).Equals(IO_VALUE.HIGH) || (!MoveInfo.MoveType.Equals(LineMoveType.None)))
{
level = ClientLevel.Middle;
}
//线体出口检测到料架,需要通知AGV小车
AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId, level);
}
}
else if ((!HasOutLine) && IOValue(IO_Type.SL_Out_Check).Equals(IO_VALUE.HIGH))
//bool HasOutLine = Config.DOList.ContainsKey(IO_Type.SL_OutLine_Run);
//if (HasOutLine && IOValue(IO_Type.SL_OutLine_Check).Equals(IO_VALUE.HIGH))
//{
// if (CheckStopWatch(needLeaveWatch, 3000))
// {
// ClientLevel level = ClientLevel.Low;
// if (Config.IsCanOut.Equals(1))
// {
// level = ClientLevel.High;
// }
// else if (IOValue(IO_Type.SL_Out_Check).Equals(IO_VALUE.HIGH) || (!MoveInfo.MoveType.Equals(LineMoveType.None)))
// {
// level = ClientLevel.Middle;
// }
// //线体出口检测到料架,需要通知AGV小车
// AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId, level);
// }
//}
if ((!HasOutLine) && IOValue(IO_Type.SL_Out_Check).Equals(IO_VALUE.HIGH))
{
if (CheckStopWatch(needLeaveWatch, 3000))
{
......@@ -929,11 +926,11 @@ namespace OnlineStore.DeviceLibrary
string checkIo = IO_Type.SL_Out_Check;
string lineDo = IO_Type.SL_OutSideWay_Run;
string stopDo = IO_Type.SL_Out_StopDown;
if (HasOutLine)
{
checkIo = IO_Type.SL_OutLine_Check;
lineDo = IO_Type.SL_OutLine_Run;
}
//if (HasOutLine)
//{
// checkIo = IO_Type.SL_OutLine_Check;
// lineDo = IO_Type.SL_OutLine_Run;
//}
string logName = Name + "[" + Config.AgvOutName + "] 料架送入AGV ";
try
{
......
......@@ -655,7 +655,7 @@ namespace OnlineStore.DeviceLibrary
InLog("上料完成" + MoveInfo.SLog + ", 线体横移电机运转,等待料架离开上料工位");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.HIGH);
//IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Location_Check, IO_VALUE.LOW));
}
else if (MoveInfo.IsStep(LineMoveStep.FI_57_SideWayLineRun))
......@@ -664,7 +664,7 @@ namespace OnlineStore.DeviceLibrary
InLog("上料完成" + MoveInfo.SLog + ", 线体横移电机运转,等待料架到达出口");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.HIGH);
//IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Out_Check, IO_VALUE.HIGH));
}
else if (MoveInfo.IsStep(LineMoveStep.FI_58_WaitShelfGo))
......@@ -673,7 +673,7 @@ namespace OnlineStore.DeviceLibrary
InLog("上料完成" + MoveInfo.SLog + ", 横移电机再转动3秒,等待料架到达出口");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.HIGH);
//IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.HIGH);
int time = 200;
if (HasOutLine)
{
......@@ -689,7 +689,7 @@ namespace OnlineStore.DeviceLibrary
InLog("上料完成" + MoveInfo.SLog + ", 料架到达出口,线体横移电机停止 ");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.LOW);
//IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.LOW);
}
else if (MoveInfo.IsStep(LineMoveStep.FI_60_LineStop))
{
......@@ -708,12 +708,12 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.FI_62_OutLineRun);
InLog("送出料串: " + MoveInfo.SLog + ", 出料线阻挡上升,出料线体转动5秒钟 或等待出料口信号亮");
IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutLine_Run, IO_VALUE.HIGH);
//IOMove(IO_Type.SL_OutLine_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000));
if (IOValue(IO_Type.SL_OutLine_Check).Equals(IO_VALUE.LOW))
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_OutLine_Check, IO_VALUE.HIGH));
}
//if (IOValue(IO_Type.SL_OutLine_Check).Equals(IO_VALUE.LOW))
//{
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_OutLine_Check, IO_VALUE.HIGH));
//}
}
else
{
......@@ -728,7 +728,7 @@ namespace OnlineStore.DeviceLibrary
MoveEndS();
LastOutShelfId = CurrShelfId;
IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutLine_Run, IO_VALUE.LOW);
//IOMove(IO_Type.SL_OutLine_Run, IO_VALUE.LOW);
InLog("上料完成,料架到达出口处, 通知AGV取空料架, 入料流程结束,更新LastOutShelfId=" + LastOutShelfId);
AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId, ClientLevel.Low);
}
......
......@@ -479,7 +479,7 @@ namespace OnlineStore.DeviceLibrary
OutLog("送出料串: " + MoveInfo.SLog + ", 线体横移电机运转,等待料架离开定位工位");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.HIGH);
//IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Location_Check, IO_VALUE.LOW));
}
else if (MoveInfo.IsStep(LineMoveStep.FO_57_SideWayLineRun))
......@@ -488,7 +488,7 @@ namespace OnlineStore.DeviceLibrary
OutLog("送出料串:" + MoveInfo.SLog + ", 线体横移电机运转,等待料架到达出口");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.HIGH);
//IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Out_Check, IO_VALUE.HIGH));
}
else if (MoveInfo.IsStep(LineMoveStep.FO_58_WaitShelfGo))
......@@ -497,7 +497,7 @@ namespace OnlineStore.DeviceLibrary
OutLog("送出料串:" + MoveInfo.SLog + ", 横移电机再转动3秒,等待料架到达出口");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.HIGH);
//IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.HIGH);
int time = 200;
if (HasOutLine)
{
......@@ -512,7 +512,7 @@ namespace OnlineStore.DeviceLibrary
OutLog("送出料串: " + MoveInfo.SLog + ", 料架到达出口,线体横移电机停止 ");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.LOW);
//IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
}
else if (MoveInfo.IsStep(LineMoveStep.FO_60_LineStop))
......@@ -533,12 +533,12 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.FO_62_OutLineRun);
OutLog("送出料串: " + MoveInfo.SLog + ", 出料线阻挡上升,出料线体转动5秒钟 或等待出料口信号亮");
IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutLine_Run, IO_VALUE.HIGH);
//IOMove(IO_Type.SL_OutLine_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000));
if (IOValue(IO_Type.SL_OutLine_Check).Equals(IO_VALUE.LOW))
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_OutLine_Check, IO_VALUE.HIGH));
}
//if (IOValue(IO_Type.SL_OutLine_Check).Equals(IO_VALUE.LOW))
//{
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_OutLine_Check, IO_VALUE.HIGH));
//}
}
else
{
......@@ -552,7 +552,7 @@ namespace OnlineStore.DeviceLibrary
MoveEndS();
OutLog("送出料串: " + MoveInfo.SLog + ", 出料线体停止,料架到达出口处, 通知AGV取空料架, 出料结束");
IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutLine_Run, IO_VALUE.LOW);
//IOMove(IO_Type.SL_OutLine_Run, IO_VALUE.LOW);
AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId, Asa.ClientLevel.High);
}
else if (MoveInfo.MoveStep >= LineMoveStep.FO_21_AxisDownMove && MoveInfo.MoveStep < LineMoveStep.FO_51_BatchAxisToP2)
......
......@@ -95,24 +95,7 @@ namespace OnlineStore.DeviceLibrary
dName = LineManager.Line.AllEquipMap[HyInDeviceId].Name;
buf.Append("横移出口:✔" + ",对应入口" + dName + "\r\n");
}
// if (Config.IsOutLineIn)
// {
// buf.Append(" 出料托盘入口:✔" + "\r\n");
// }
// if (Config.IsOutLineOut)
// {
// buf.Append(" 出料托盘出口:✔" + "\r\n");
// }
//int hynum = (this.Config.Id % 100);
// List<int> jNumList = new List<int>() { 10, 12, 17 };
// if (hynum.Equals(17))
// {
// buf.Append(" NG料工位:✔" + "\r\n");
// }
//else if (jNumList.Contains(hynum))
// {
// buf.Append(" 接驳台工位:✔" + "\r\n");
// }
if (Config.Id.Equals(205))
{
buf.Append(" 出料工位:✔" + "\r\n");
......@@ -163,6 +146,8 @@ namespace OnlineStore.DeviceLibrary
#region 定位气缸升降 ,链条转动
public void LocationCylinderUp(LineMoveInfo moveinfo = null)
{
if (DeviceID.Equals(202))
{
IOMove(IO_Type.HY_LocationCylinder_Down, IO_VALUE.LOW);
IOMove(IO_Type.HY_LocationCylinder_Up, IO_VALUE.HIGH);
if (moveinfo != null)
......@@ -173,9 +158,12 @@ namespace OnlineStore.DeviceLibrary
moveinfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_LocationCylinder_Up2, IO_VALUE.HIGH));
}
}
}
public void LocationCylinderDown(LineMoveInfo moveinfo = null)
{
if (DeviceID.Equals(202))
{
IOMove(IO_Type.HY_LocationCylinder_Up, IO_VALUE.LOW);
IOMove(IO_Type.HY_LocationCylinder_Down, IO_VALUE.HIGH);
if (moveinfo != null)
......@@ -186,46 +174,18 @@ namespace OnlineStore.DeviceLibrary
moveinfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_LocationCylinder_Down2, IO_VALUE.HIGH));
}
}
}
public void LineRun(LineMoveInfo moveInfo = null)
{
if (Config.DOList.ContainsKey(IO_Type.HY_LineBackRun))
{
IOMove(IO_Type.HY_LineBackRun, IO_VALUE.LOW);
if (moveInfo != null)
{
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_LineBackRun, IO_VALUE.LOW));
}
}
IOMove(IO_Type.HY_LineRun, IO_VALUE.HIGH);
if (moveInfo != null)
{
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_LineRun, IO_VALUE.HIGH));
}
}
public void LineBackRun(LineMoveInfo moveInfo = null)
{
//暂时只有HY04(204)有倒转功能。
if (Config.DOList.ContainsKey(IO_Type.HY_LineBackRun))
{
IOMove(IO_Type.HY_LineBackRun, IO_VALUE.HIGH);
IOMove(IO_Type.HY_LineRun, IO_VALUE.LOW);
if (moveInfo != null)
{
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_LineBackRun, IO_VALUE.HIGH));
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_LineRun, IO_VALUE.LOW));
}
}
}
public void LineStop(LineMoveInfo moveInfo = null)
{
if (Config.DOList.ContainsKey(IO_Type.HY_LineBackRun))
{
IOMove(IO_Type.HY_LineBackRun, IO_VALUE.LOW);
if (moveInfo != null)
{
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_LineBackRun, IO_VALUE.LOW));
}
}
IOMove(IO_Type.HY_LineRun, IO_VALUE.LOW);
if (moveInfo != null)
{
......
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
namespace OnlineStore.DeviceLibrary
{
/// <summary>
/// 此类对应分流横移:HY3,HY4,HY6,HY8,HY9,HY11,HY13,HY15,HY16,HY18,HY19,
/// 对应功能:横移入口,横移出口,出库线入口,出库线出口
/// 无定位气缸
/// 复位时,默认所有阻挡上升,顶升气缸下降,阻挡气缸上升,链条停止
/// </summary>
public class HY_C1Line : HYEquipBase
{
public HY_C1Line(string cid, HYEquip_Config config) : base(cid, config)
{
Name = (" C1HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + " ").ToUpper();
MoveInfo.Name = Name;
SecondMoveInfo.Name = Name;
}
public override bool StartRun(bool isDebug = false)
{
if (CanStartRun().Equals(false))
{
return false;
}
mainTimer.Enabled = false;
MoveInfo.EndMove();
runStatus = LineRunStatus.HomeMoving;
MoveInfo.NewMove(LineMoveType.RHome);
StartReset();
if (isDebug)
{
mainTimer.Enabled = true;
}
return true;
}
public override bool Reset()
{
StopMove();
runStatus = LineRunStatus.Reset;
MoveInfo.NewMove(LineMoveType.Reset);
StartReset();
return true;
}
private void StartReset()
{
ResetClearData();
SecondMoveInfo.EndMove();
MoveInfo.NextMoveStep(LineMoveStep.HY_R_01StopMove);
LogInfo("开始" + MoveInfo.MoveType + ": 横移线体停止,阻挡上升,侧挡气缸上升 ");
IOMove(IO_Type.HY_OL_StopDown, IO_VALUE.LOW);
if (IsDebug)
{
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.HIGH);
IOMove(IO_Type.HY_StopDown, IO_VALUE.HIGH);
}
else
{
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW);
}
LineStop();
CylinderMove(null, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
isInPro = false;
}
protected override void ResetProcess()
{
if (MoveInfo.IsInWait)
{
CheckWait(MoveInfo);
}
if (!MoveInfo.IsInWait)
{
if (MoveInfo.IsStep(LineMoveStep.HY_R_01StopMove))
{
MoveInfo.NextMoveStep(LineMoveStep.HY_R_02StopMove);
DebugInfo(MoveInfo.MoveType + " : 顶升气缸下降,阻挡气缸上升");
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
HY_StopCylinderUp(MoveInfo);
OL_StopCylinderUp(MoveInfo);
isInPro = false;
}
else if (MoveInfo.IsStep(LineMoveStep.HY_R_02StopMove))
{
LogInfo(MoveInfo.MoveType + " 完成!");
MoveEndS();
}
}
}
internal override void StopMove()
{
MoveInfo.EndMove();
SecondMoveInfo.EndMove();
runStatus = LineRunStatus.Runing;
LogInfo("停止运动:关闭所有DO ");
//LineStop();
CloseAllDO();
if (IsDebug)
{
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.HIGH);
IOMove(IO_Type.HY_StopDown, IO_VALUE.HIGH);
}
else
{
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW);
}
//CylinderMove(null, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
//HY_StopCylinderDown(null);
//LocationCylinderDown(null);
}
public override void StopRun()
{
if (mainTimer != null)
{
mainTimer.Enabled = false;
}
StopMove();
runStatus = LineRunStatus.Wait;
}
protected override void BaseTimerProcess()
{
if (isInSuddenDown || isNoAirCheck)
{
return;
}
IOTimeOutProcess();
//判断流水线打开了才可以运行
if (!MoveStop)
{
stopWatchCheck();
if (MoveInfo.MoveType.Equals(LineMoveType.None))
{
if (LineManager.Line.CanProcessLine())
{
CheckFixture();
}
}
else
{
if (IOValue(IO_Type.HY_TrayCheck).Equals(IO_VALUE.HIGH))
{
trayCheckLowWait.Stop();
}
else
{
CheckStopWatch(trayCheckLowWait, 30000, false);
}
if (MoveInfo.MoveType.Equals(LineMoveType.RHome) || MoveInfo.MoveType.Equals(LineMoveType.Reset))
{
ResetProcess();
}
else
{
FixtureProcess();
}
}
}
}
private Stopwatch trayCheckWait = new Stopwatch();//检测到托盘的时间
private Stopwatch frontTrayCheckWait = new Stopwatch();
private Stopwatch trayCheckLowWait = new Stopwatch();//上一个托盘离开的时间
private Stopwatch olcheckWatch = new Stopwatch();
private object lockObj = "";
private bool preTrayIsC1Line = false;
private void stopWatchCheck()
{
if (IOValue(IO_Type.HY_TrayCheck).Equals(IO_VALUE.HIGH))
{
trayCheckLowWait.Stop();
CheckStopWatch(trayCheckWait, 30000, false);
}
else
{
trayCheckWait.Stop();
CheckStopWatch(trayCheckLowWait, 30000, false);
}
if (Config.DIList.ContainsKey(IO_Type.HY_FrontStopCheck) && IOValue(IO_Type.HY_FrontStopCheck).Equals(IO_VALUE.HIGH))
{
CheckStopWatch(frontTrayCheckWait, 30000, false);
}
else
{
frontTrayCheckWait.Stop();
}
if (Config.DIList.ContainsKey(IO_Type.HY_OL_Tray_Check) && IOValue(IO_Type.HY_OL_Tray_Check).Equals(IO_VALUE.HIGH))
{
CheckStopWatch(olcheckWatch, 30000, false);
}
else
{
olcheckWatch.Stop();
}
}
private void CheckFixture()
{
if (Monitor.TryEnter(lockObj, 100))
{
try
{
if (MoveInfo.MoveType.Equals(LineMoveType.None).Equals(false))
{
LogUtil.error(Name + " CheckFixture " + " 不在空闲中,直接返回 ");
return;
}
if (MoveInfo.MoveType.Equals(LineMoveType.None))
{
if (IOValue(IO_Type.HY_TrayCheck).Equals(IO_VALUE.HIGH))
{
if (CheckStopWatch(trayCheckWait, TrayWaitTime, true))
{
//托盘在工位阻挡处
MoveInfo.NewMove(LineMoveType.Fixture);
runStatus = LineRunStatus.Busy;
MoveInfo.NextMoveStep(LineMoveStep.HY03_FrontStopUp);
if (DeviceID.Equals(219))
{
LogInfo("托盘检测," + MoveInfo.SLog + " 检测到托盘 ,阻挡上升");
}
else
{
CheckLog("托盘检测," + MoveInfo.SLog + " 检测到托盘 ,阻挡上升");
}
if (Config.DOList.ContainsKey(IO_Type.HY_FrontStopDown))
{
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
//MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_FrontStopDown, IO_VALUE.LOW));
}
IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_OL_StopDown, IO_VALUE.LOW);
MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(20000));
}
}
else
{
bool check2IsOk = CheckStopWatch(trayCheckLowWait, TrayWaitTime, false)||String.IsNullOrEmpty(RFIDIP);
if (preTrayIsC1Line && Config.IsOutLineOut && IOValue(IO_Type.HY_OL_Tray_Check).Equals(IO_VALUE.HIGH))
{
//C1线和出料线交替处理
HY71_OL_Wait();
}
else if (Config.DIList.ContainsKey(IO_Type.HY_FrontStopCheck) && IOValue(IO_Type.HY_FrontStopCheck).Equals(IO_VALUE.HIGH))
{
if (CheckStopWatch(frontTrayCheckWait, TrayWaitTime, false) && check2IsOk)
{
preTrayIsC1Line = true;
//托盘在前阻挡处
frontTrayCheckWait.Stop();
trayCheckLowWait.Stop();
MoveInfo.NewMove(LineMoveType.Fixture);
runStatus = LineRunStatus.Busy;
MoveInfo.NextMoveStep(LineMoveStep.HY02_FrontStopDown);
if (DeviceID.Equals(219))
{
LogInfo(" 托盘检测:" + MoveInfo.SLog + ",检测到前阻挡托盘,前阻挡下降");
}
else
{
CheckLog(" 托盘检测:" + MoveInfo.SLog + ",检测到前阻挡托盘,前阻挡下降");
}
ClearTrayRFID();
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.HIGH, 1200);
MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_FrontStopCheck, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
CylinderMove(null, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(20000));
IOMove(IO_Type.HY_OL_StopDown, IO_VALUE.LOW);
}
}
else if (Config.IsOutLineOut && IOValue(IO_Type.HY_OL_Tray_Check).Equals(IO_VALUE.HIGH))
{
HY71_OL_Wait();
}
}
}
}
catch (Exception ex)
{
LogUtil.error(Name + " CheckFixture " + " 出错:" + ex.ToString());
}
finally
{
Monitor.Exit(lockObj);
}
}
else
{
LogUtil.error(Name + " CheckFixture " + "失败,未得到锁");
}
}
private void HY71_OL_Wait()
{
bool check2IsOk = CheckStopWatch(trayCheckLowWait, TrayWaitTime, false) || String.IsNullOrEmpty(RFIDIP);
if (CheckStopWatch(olcheckWatch, TrayWaitTime, false) && check2IsOk)
{
preTrayIsC1Line = false;
//托盘在前阻挡处
olcheckWatch.Stop();
trayCheckLowWait.Stop();
MoveInfo.NewMove(LineMoveType.Fixture);
runStatus = LineRunStatus.Busy;
MoveInfo.NextMoveStep(LineMoveStep.HY71_OL_Wait);
CheckLog(" 托盘检测:" + MoveInfo.SLog + ",检测到出料线托盘 ");
ClearTrayRFID();
IOMove(IO_Type.HY_OL_StopDown, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_OL_Tray_Check, IO_VALUE.HIGH));
}
}
internal void HY03_FrontStopUp()
{
frontTrayCheckWait.Stop();
trayCheckLowWait.Stop();
MoveInfo.NewMove(LineMoveType.Fixture);
runStatus = LineRunStatus.Busy;
MoveInfo.NextMoveStep(LineMoveStep.HY03_FrontStopUp);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 托盘检测到信号,前阻挡上升");
CheckAndMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000));
}
protected override void FixtureProcess()
{
if (MoveInfo.IsInWait)
{
CheckWait(MoveInfo);
}
if (MoveInfo.IsInWait)
{
return;
}
#region 托盘检测处理
if (MoveInfo.IsStep(LineMoveStep.HY02_FrontStopDown))
{
if (IOValue(IO_Type.HY_FrontStopCheck).Equals(IO_VALUE.LOW) || IOValue(IO_Type.HY_TrayCheck).Equals(IO_VALUE.HIGH))
{
HY03_FrontStopUp();
}
else
{
//未检测到信号或阻挡下降失败,结束处理
LogInfo(MoveInfo.SLog + "未等到信号 HY_FrontStopCheck=LOW 或 HY_TrayCheck=LOW 结束处理 ");
MoveEndS();
}
}
else if (MoveInfo.IsStep(LineMoveStep.HY03_FrontStopUp))
{
if (IOValue(IO_Type.HY_TrayCheck).Equals(IO_VALUE.HIGH))
{
MoveInfo.NextMoveStep(LineMoveStep.HY04_WaitTime);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 再次等待托盘信号");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(10000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
MoveInfo.OneWaitCanEndStep = true;
}
else
{
//未检测到信号或阻挡下降失败,结束处理
LogInfo(MoveInfo.SLog + "未等到信号 HY_TrayCheck=LOW 结束处理 ");
MoveEndS();
}
}
else if (MoveInfo.IsStep(LineMoveStep.HY04_WaitTime))
{
if (IOValue(IO_Type.HY_TrayCheck).Equals(IO_VALUE.HIGH))
{
MoveInfo.NextMoveStep(LineMoveStep.HY05_TrayCheck);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 再次等待托盘信号");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(10000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
MoveInfo.OneWaitCanEndStep = true;
}
else
{
//未检测到信号或阻挡下降失败,结束处理
LogInfo(MoveInfo.SLog + "未等到信号 HY_TrayCheck=HIGH 结束处理 ");
MoveEndS();
}
}
else if (MoveInfo.IsStep(LineMoveStep.HY05_TrayCheck))
{
if (IOValue(IO_Type.HY_TrayCheck).Equals(IO_VALUE.HIGH))
{
//判断是否需要横移托盘,或者取放料
UpdateTrayNum();
MoveInfo.NextMoveStep(LineMoveStep.HY05_TrayCheck);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
//先判断是否需要到出料线,在判断是否需要横移
if (TrayNeedToOutLine(currTrayNum))
{
HY31_IOL_TopUp();
}
else if (TrayNeedHY(currTrayNum))
{
HY11_TopUpToHY();
}
else
{
//直接放盘通过
MoveInfo.NextMoveStep(LineMoveStep.HY91_TrayCanGo);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 无需处理,放托盘离开");
}
}
else
{
//未检测到信号或阻挡下降失败,结束处理
LogInfo(MoveInfo.SLog + "未等到信号 HY_TrayCheck=LOW 结束处理 ");
MoveEndS();
}
}
#endregion
#region C1线->出料线横移处理 31
else if (MoveInfo.IsStep(LineMoveStep.HY31_IOL_TopUp))
{
MoveInfo.NextMoveStep(LineMoveStep.HY32_IOL_HYLineRun);
if (DeviceID.Equals(204))
{
CheckLog("C1线->出料线" + MoveInfo.SLog + " ,横移电机反转 ");
LineBackRun(MoveInfo);
}
else
{
CheckLog("C1线->出料线" + MoveInfo.SLog + " ,横移电机正转 ");
LineRun(MoveInfo);
}
}
else if (MoveInfo.IsStep(LineMoveStep.HY32_IOL_HYLineRun))
{
MoveInfo.NextMoveStep(LineMoveStep.HY33_IOL_WaitOutCheck);
CheckLog("C1线->出料线" + MoveInfo.SLog + " ,等待托盘检测无信号 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.LOW));
}
else if (MoveInfo.IsStep(LineMoveStep.HY33_IOL_WaitOutCheck))
{
MoveInfo.NextMoveStep(LineMoveStep.HY34_IOL_WatOutFixture2);
CheckLog("C1线->出料线" + MoveInfo.SLog + " ,等待托盘检测无信号500 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.LOW));
}
else if (MoveInfo.IsStep(LineMoveStep.HY34_IOL_WatOutFixture2))
{
MoveInfo.NextMoveStep(LineMoveStep.HY35_IOL_TopDown);
CheckLog("C1线->出料线" + MoveInfo.SLog + " ,电机停止,顶升下降 ,横移阻挡气缸上升,出料线阻挡气缸上升");
LineStop(MoveInfo);
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
HY_StopCylinderUp(MoveInfo);
OL_StopCylinderUp(MoveInfo);
//如果是出库料,才需要更新位置
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
if (tray.IsFull && tray.InOrOutStore.Equals(2))
{
int lineId = DeviceID % 100;
LogInfo("C1线->出料线 【" + MoveInfo.MoveParam.ToShortStr() + "】" + MoveInfo.SLog + " 更新料盘位置【" + MoveInfo.MoveParam.WareCode + "】【INBELT】【" + lineId + "】");
//更新料盘位置
string lineName = "C8";
if (DeviceID.Equals(213) || DeviceID.Equals(216))
{
lineName = "C9";
}
if (DeviceID.Equals(204))
{
lineName = "C2";
}
else if (DeviceID.Equals(206))
{
lineName = "C3";
}
else if (DeviceID.Equals(213))
{
lineName = "C6";
}
else if (DeviceID.Equals(216))
{
lineName = "C7";
}
SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.INBELT, lineName);
}
}
else if (MoveInfo.IsStep(LineMoveStep.HY35_IOL_TopDown))
{
CheckLog("C1线->出料线" + MoveInfo.SLog + " ,结束处理 ");
MoveEndS();
ClearTrayRFID();
}
#endregion
#region C1线分流横移入口处理 11
else if (MoveInfo.IsStep(LineMoveStep.HY11_TopUpToHY))
{
// MoveInfo.NextMoveStep(LineMoveStep.HY12_WaitHY2Free);
// CheckLog("托盘横移" + MoveInfo.SLog + " ,等待HY" + HyOutDeviceId + " 空闲,可以开始横移 ");
//}
//else if (MoveInfo.IsStep(LineMoveStep.HY12_WaitHY2Free))
//{
HYEquipBase hyout = GetHyOutEquip();
if (hyout.CanStartMove())
{
MoveInfo.NextMoveStep(LineMoveStep.HY13_WaitHY2Ready);
CheckLog("托盘横移" + MoveInfo.SLog + " ,等待" + hyout.Name + " 准备完成(顶升上升,定位下降) ");
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Down, IO_Type.HY_TopCylinder_Up);
HY_StopCylinderDown(MoveInfo);
OL_StopCylinderUp(MoveInfo);
hyout.MoveInfo.NewMove(LineMoveType.Fixture);
hyout.runStatus = LineRunStatus.Busy;
hyout.MoveInfo.NextMoveStep(LineMoveStep.HY51_WaitFree);
ClearTimeoutAlarm("等待" + hyout.Name + "可以横移超时");
}
else if (MoveInfo.IsTimeOut())
{
MoveTimeOut(MoveInfo, "等待" + hyout.Name + "可以横移超时");
}
}
else if (MoveInfo.IsStep(LineMoveStep.HY13_WaitHY2Ready))
{
HYEquipBase hyout = GetHyOutEquip();
bool result = hyout.MoveInfo.MoveStep >= LineMoveStep.HY54_HY2Ready;
if (result)
{
MoveInfo.NextMoveStep(LineMoveStep.HY14_HYLineRun);
CheckLog("托盘横移" + MoveInfo.SLog + " ,横移电机转动 ");
LineRun(MoveInfo);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.LOW));
ClearTimeoutAlarm("等待" + hyout.Name + "顶升上升完成超时");
}
else if (MoveInfo.IsTimeOut())
{
MoveTimeOut(MoveInfo, "等待" + hyout.Name + "顶升上升完成超时");
}
}
else if (MoveInfo.IsStep(LineMoveStep.HY14_HYLineRun))
{
MoveInfo.NextMoveStep(LineMoveStep.HY15_WaitOutCheck);
CheckLog("托盘横移" + MoveInfo.SLog + " ,等待托盘到达HY" + HyOutDeviceId + " ");
}
else if (MoveInfo.IsStep(LineMoveStep.HY15_WaitOutCheck))
{
HYEquipBase hyout = GetHyOutEquip();
bool result = hyout.MoveInfo.MoveStep >= LineMoveStep.HY55_WaitTrayCheck;
if (result)
{
MoveInfo.NextMoveStep(LineMoveStep.HY16_WatOutFixture2);
CheckLog("托盘横移" + MoveInfo.SLog + " ,等待托盘到达" + hyout.Name + "持续一段时间 ");
ClearTimeoutAlarm("等待托盘到达" + hyout.Name + "超时");
}
else if (MoveInfo.IsTimeOut())
{
MoveTimeOut(MoveInfo, "等待托盘到达" + hyout.Name + "超时");
}
}
else if (MoveInfo.IsStep(LineMoveStep.HY16_WatOutFixture2))
{
HYEquipBase hyout = GetHyOutEquip();
bool result = hyout.MoveInfo.MoveStep >= LineMoveStep.HY56_CheckWait;
if (result)
{
MoveInfo.NextMoveStep(LineMoveStep.HY17_TopDown);
CheckLog("托盘横移" + MoveInfo.SLog + " ,横移电机停止,顶升下降,定位下降 ,阻挡气缸上升 ");
LineStop(MoveInfo);
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
HY_StopCylinderUp(MoveInfo);
OL_StopCylinderUp(MoveInfo);
ClearTimeoutAlarm("等待托盘到达" + hyout.Name + "");
}
else if (MoveInfo.IsTimeOut())
{
MoveTimeOut(MoveInfo, "等待托盘到达" + hyout.Name + "");
}
}
else if (MoveInfo.IsStep(LineMoveStep.HY17_TopDown))
{
CheckLog("托盘横移" + MoveInfo.SLog + " ,结束横移处理 ");
ClearTrayRFID();
MoveEndS();
}
#endregion
#region C1线分流横移出口处理 51
else if (MoveInfo.IsStep(LineMoveStep.HY51_WaitFree))
{
MoveInfo.NextMoveStep(LineMoveStep.HY52_TopUp);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 顶升上升,定位下降,横移阻挡气缸下降,出料线阻挡气缸上升");
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Down, IO_Type.HY_TopCylinder_Up);
HY_StopCylinderDown(MoveInfo);
OL_StopCylinderUp(MoveInfo);
}
else if (MoveInfo.IsStep(LineMoveStep.HY52_TopUp))
{
MoveInfo.NextMoveStep(LineMoveStep.HY53_LineRun);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 横移电机开始转动");
LineRun(MoveInfo);
}
else if (MoveInfo.IsStep(LineMoveStep.HY53_LineRun))
{
MoveInfo.NextMoveStep(LineMoveStep.HY54_HY2Ready);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 准备接收横移托盘完成");
}
else if (MoveInfo.IsStep(LineMoveStep.HY54_HY2Ready))
{
MoveInfo.NextMoveStep(LineMoveStep.HY55_WaitTrayCheck);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 等待检测到托盘信号");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
}
else if (MoveInfo.IsStep(LineMoveStep.HY55_WaitTrayCheck))
{
MoveInfo.NextMoveStep(LineMoveStep.HY56_CheckWait);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 再次等待托盘信号");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
}
else if (MoveInfo.IsStep(LineMoveStep.HY56_CheckWait))
{
//托盘已到位,更新托盘号,判断是否需要取放料
LineStop();
UpdateTrayNum();
//判断是否需要进出料线的料
if (TrayNeedToOutLine(currTrayNum))
{
HY31_IOL_TopUp();
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.HY61_TopDown);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 横移电机停止,顶升下降,横移阻挡气缸上升,出料线阻挡气缸上升 ");
LineStop(MoveInfo);
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
HY_StopCylinderUp(MoveInfo);
OL_StopCylinderUp(MoveInfo);
}
}
else if (MoveInfo.IsStep(LineMoveStep.HY61_TopDown))
{
MoveInfo.NextMoveStep(LineMoveStep.HY92_StopDown);
CheckLog("放盘离开" + MoveInfo.SLog + " 横移电机停止,阻挡下降 ");
LineStop(MoveInfo);
IOMove(IO_Type.HY_StopDown, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.LOW));
}
#endregion
#region 出料线->C1线,托盘检测及横移处理, 71
else if (MoveInfo.IsStep(LineMoveStep.HY71_OL_Wait))
{
MoveInfo.NextMoveStep(LineMoveStep.HY72_OL_AllStopUp);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 检测到出料线托盘,所有阻挡上升");
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_OL_StopDown, IO_VALUE.LOW);
}
else if (MoveInfo.IsStep(LineMoveStep.HY72_OL_AllStopUp))
{
MoveInfo.NextMoveStep(LineMoveStep.HY73_OL_TopUp);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 开始横移,顶升上升,出料线阻挡气缸下降,横移阻挡气缸上升");
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Down, IO_Type.HY_TopCylinder_Up);
OL_StopCylinderDown(MoveInfo);
HY_StopCylinderUp(MoveInfo);
}
else if (MoveInfo.IsStep(LineMoveStep.HY73_OL_TopUp))
{
MoveInfo.NextMoveStep(LineMoveStep.HY74_OL_HYLineRun);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 出料线阻挡下降,横移电机正转");
LineRun(MoveInfo);
}
else if (MoveInfo.IsStep(LineMoveStep.HY74_OL_HYLineRun))
{
MoveInfo.NextMoveStep(LineMoveStep.HY75_OL_StopDown);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 等待出料线托盘检测无信号");
IOMove(IO_Type.HY_OL_StopDown, IO_VALUE.HIGH, 1200);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_OL_Tray_Check, IO_VALUE.LOW));
}
else if (MoveInfo.IsStep(LineMoveStep.HY75_OL_StopDown))
{
MoveInfo.NextMoveStep(LineMoveStep.HY76_OL_WaitTray);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 等待托盘到达信号");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_OL_Tray_Check, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
}
else if (MoveInfo.IsStep(LineMoveStep.HY76_OL_WaitTray))
{
MoveInfo.NextMoveStep(LineMoveStep.HY77_OL_WaitTime);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 再次等待500ms,等待托盘到达信号 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
}
else if (MoveInfo.IsStep(LineMoveStep.HY77_OL_WaitTime))
{
MoveInfo.NextMoveStep(LineMoveStep.HY78_OL_TopDown);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 电机停止,顶升下降 ,出料线阻挡上升,出料线阻挡气缸上升,横移阻挡气缸上升");
LineStop(MoveInfo);
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
IOMove(IO_Type.HY_OL_StopDown, IO_VALUE.LOW);
OL_StopCylinderUp(MoveInfo);
HY_StopCylinderUp(MoveInfo);
}
else if (MoveInfo.IsStep(LineMoveStep.HY78_OL_TopDown))
{
UpdateTrayNum();
//判断托盘是直接离开开始需要横移
if (TrayNeedHY(currTrayNum))
{
HY11_TopUpToHY();
}
else
{
//直接放盘通过
MoveInfo.NextMoveStep(LineMoveStep.HY91_TrayCanGo);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 无需处理,放托盘离开");
}
}
#endregion
#region 分流横移放盘离开 91
else if (MoveInfo.IsStep(LineMoveStep.HY91_TrayCanGo))
{
MoveInfo.NextMoveStep(LineMoveStep.HY92_StopDown);
CheckLog("放盘离开" + MoveInfo.SLog + " ,阻挡下降 ");
IOMove(IO_Type.HY_StopDown, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.LOW));
}
else if (MoveInfo.IsStep(LineMoveStep.HY92_StopDown))
{
trayCheckWait.Stop();
trayCheckLowWait.Stop();
MoveInfo.NextMoveStep(LineMoveStep.HY93_Stop2Check);
CheckLog("放盘离开" + MoveInfo.SLog + " ,等待托盘检测无信号 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.LOW));
}
else if (MoveInfo.IsStep(LineMoveStep.HY93_Stop2Check))
{
MoveInfo.NextMoveStep(LineMoveStep.HY94_WaitTime);
CheckLog("放盘离开" + MoveInfo.SLog + " ,延迟500ms后上升阻挡2 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
}
else if (MoveInfo.IsStep(LineMoveStep.HY94_WaitTime))
{
MoveInfo.NextMoveStep(LineMoveStep.HY95_StopDownUp);
CheckLog("放盘离开" + MoveInfo.SLog + " ,阻挡上升 ");
IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_StopDown, IO_VALUE.LOW));
}
else if (MoveInfo.IsStep(LineMoveStep.HY95_StopDownUp))
{
CheckLog(" 结束托盘处理 ");
ClearTrayRFID();
MoveEndS();
if (frontTrayCheckWait.ElapsedMilliseconds > 2000)
{
CheckFixture();
}
}
#endregion
else
{
LogUtil.error(Name + "FixtureProcess 未找到[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "]的处理");
}
}
private void HY31_IOL_TopUp()
{
MoveInfo.NextMoveStep(LineMoveStep.HY31_IOL_TopUp);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 开始C1->出料线横移,横移电机停止,顶升上升,横移阻挡气缸上升,出料线阻挡气缸下降");
LineStop(MoveInfo);
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Down, IO_Type.HY_TopCylinder_Up);
HY_StopCylinderUp(MoveInfo);
OL_StopCylinderDown(MoveInfo);
}
private void HY11_TopUpToHY()
{
HYEquipBase hyout = GetHyOutEquip();
if (hyout.CanStartMove())
{
MoveInfo.NextMoveStep(LineMoveStep.HY13_WaitHY2Ready);
CheckLog("托盘横移" + MoveInfo.SLog + " 开始C1->C1分流横移,顶升上升,横移阻挡气缸下降,出料线阻挡气缸上升,等待" + hyout.Name + " 准备完成(顶升上升,定位下降) ");
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Down, IO_Type.HY_TopCylinder_Up);
HY_StopCylinderDown(MoveInfo);
OL_StopCylinderUp(MoveInfo);
hyout.MoveInfo.NewMove(LineMoveType.Fixture);
hyout.runStatus = LineRunStatus.Busy;
hyout.MoveInfo.NextMoveStep(LineMoveStep.HY51_WaitFree);
ClearTimeoutAlarm("等待" + hyout.Name + "可以横移超时");
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.HY11_TopUpToHY);
CheckLog("托盘横移" + MoveInfo.SLog + " ,开始C1->C1分流横移,顶升上升,横移阻挡气缸下降,出料线阻挡气缸上升");
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Down, IO_Type.HY_TopCylinder_Up);
HY_StopCylinderDown(MoveInfo);
OL_StopCylinderUp(MoveInfo);
}
}
private bool TrayNeedHY(int trayNum)
{
try
{
if (Config.IsSideWayIn && trayNum > 0)
{
//出口启动才能横移
HYEquipBase hyE= GetHyOutEquip();
if (hyE == null || hyE.runStatus <= LineRunStatus.Wait)
{
return false;
}
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
//TODO
if (DeviceID.Equals(204))
{
//HY4,满料托盘需要横移
//空托盘且T1,T2都不在上料时需要 横移
if (tray.IsFull)
{
return true;
}
else
{
//如果横移1和横移2都有托盘,需要横移
if (IOManager.IOValue(IO_Type.HY_TrayCheck, 202).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.HY_TopCylinder_Up, 202).Equals(IO_VALUE.HIGH)
&& IOManager.IOValue(IO_Type.HY_TrayCheck, 201).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.HY_TopCylinder_Up, 201).Equals(IO_VALUE.HIGH))
{
return true;
}
FeedingEquip feed1 = LineManager.Line.FeedingEquipMap[101];
FeedingEquip feed2 = LineManager.Line.FeedingEquipMap[102];
if ((!feed1.NeedEmptyTray()) && (!feed2.NeedEmptyTray()))
{
return true;
}
}
}
else if (DeviceID.Equals(209))
{
//非 1,2,3,4,5,13,14,15,16的入库料需要横移
if (tray.IsFull)
{
if (tray.InOrOutStore.Equals(1))
{
//NG料需要横移
if (tray.InoutPar.InStoreNg)
{
return true;
}
int storeId = tray.InoutPar.GetStoreId();
List<int> instoreId = new List<int> { 1, 2, 3, 4, 5, 13, 14, 15, 16 };
if (!instoreId.Contains(storeId))
{
return true;
}
}
else if (tray.InOrOutStore.Equals(2))
{
//紧急料,分盘料直接横移
if (tray.InoutPar.cutReel || tray.InoutPar.urgentReel)
{
return true;
}
else
{
if (tray.InoutPar.smallReel)
{
if (tray.InoutPar.rfidLoc >= 70 && tray.InoutPar.rfidLoc <= 72)
{
// 70,71,72时只能分配到3 / 4号皮带线;
return true;
}
}
}
}
}
}
else if (DeviceID.Equals(215))
{
//非分盘料,紧急料 的出库需要横移
//非11,12,23,24的入库料需要横移
//NG料直接横移
if (tray.IsFull)
{
if (tray.InOrOutStore.Equals(2) && (!tray.InoutPar.cutReel) && (!tray.InoutPar.urgentReel))
{
return true;
}
else if (tray.InOrOutStore.Equals(1))
{
if (tray.InoutPar.InStoreNg)
{
return true;
}
int storeId = tray.InoutPar.GetStoreId();
List<int> instoreId = new List<int> { 11, 12, 23, 24 };
if (!instoreId.Contains(storeId))
{
return true;
}
}
}
}
else if (DeviceID.Equals(218))
{
//HY4,满料托盘,如果不是分盘出料,紧急料,的需要横移,
//空托盘,T5都不在上料时需要横移
if (tray.IsFull)
{
//如果是分盘料盘,不需要横移
if (tray.InOrOutStore.Equals(2) && (tray.InoutPar.cutReel || tray.InoutPar.urgentReel))
{
return false;
}
return true;
}
else
{
//如果横移20和横移21都有托盘,需要横移
if (IOManager.IOValue(IO_Type.HY_TrayCheck, 220).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.HY_TopCylinder_Up, 220).Equals(IO_VALUE.HIGH)
&& IOManager.IOValue(IO_Type.HY_TrayCheck, 221).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.HY_TopCylinder_Up, 221).Equals(IO_VALUE.HIGH))
{
return true;
}
FeedingEquip feed5 = LineManager.Line.FeedingEquipMap[105];
if (!feed5.NeedEmptyTray())
{
return true;
}
}
}
}
}
catch (Exception ex)
{
LogUtil.error(Name+"TrayNeed 出错:" + ex.ToString());
}
return false;
}
private int PreIsToOutCount = 0;
private bool TrayNeedToOutLine(int trayNum)
{
try
{
if (Config.IsOutLineIn && trayNum > 0)
{
//判断是否禁用
if (LineManager.DisLeftOutLine && (DeviceID.Equals(204) || DeviceID.Equals(206)))
{
return false;
}
if (LineManager.DisRightOutLine && (DeviceID.Equals(213) || DeviceID.Equals(216)))
{
return false;
}
//测线满时不需要横移
if (IOValue(IO_Type.HY_OL_Full_Check).Equals(IO_VALUE.LOW))
{
if (LineManager.TrayToOutLineTest)
{
if (PreIsToOutCount.Equals(3))
{
PreIsToOutCount = 0;
//横移一个放一个
MoveInfo.MoveParam = new InOutParam(trayNum);
LogInfo(" C1->出料线:托盘横移到出料线测试功能打开");
return true;
}
else
{
PreIsToOutCount++;
}
}
//TODO
TrayInfo trayInfo = TrayManager.GetTrayInfo(currTrayNum);
if (!trayInfo.IsFull)
{
return false;
}
InOutParam param = trayInfo.InoutPar;
if (trayInfo.IsFull && trayInfo.InoutPar.InStoreNg && this.DeviceID.Equals(216))
{
LogInfo(" C1->出料线:NG料" + "" + param.ToStr());
//如果分配了库位,需要调用取消
if (trayInfo.InoutPar.WareCode != "" && trayInfo.InoutPar.PosId != "")
{
SServerManager.cancelPutInTask(Name, trayInfo.InoutPar.WareCode);
}
MoveInfo.MoveParam = param;
return true ;
}
//else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && param.urgentReel && this.DeviceID.Equals(216))
//{
// //紧急料到NG箱
// LogInfo(" C1->出料线:紧急料" + "" + param.ToStr());
// MoveInfo.MoveParam = param;
// return true;
//}
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && param.urgentReel.Equals(false) && param.cutReel.Equals(false))
{
//LogInfo(" C1->出料线:工单料" + "" + param.ToStr());
List<int> leftLineList= new List<int> { 204, 206 };
List<int> rightLineList = new List<int> { 213, 216 };
List<int> mustLine = new List<int>();
List<int> firstLine = new List<int>();
//urgentReel: true 表示紧急料,需要出到料串上
//cutReel: true 表示分盘料,需要出到料串上
//smallReel: true 小料(7x8),放置到小料架上
//rfid: 分配的料架RFID
//rfidLoc:
//是否是小盘
if (param.rfidLoc <= 0)
{
//-1时随意放
}
else if (param.smallReel)
{
if (param.rfidLoc >= 70 && param.rfidLoc <= 72)
{
// 70,71,72时只能分配到3 / 4号皮带线;
mustLine = new List<int>(rightLineList);
}
else if (param.rfidLoc <= 46)
{
// 小料时,架位为1 - 46优先走1 / 2号皮带线
firstLine = new List<int> (leftLineList);
}
else if (param.rfidLoc >= 47)
{
// ,47 - 92优先走3 / 4号皮带线,
firstLine = new List<int>(rightLineList);
}
}
else
{
//大料12号只能走1号2后皮带线
// 料架的架位大料时,架位1 - 6,12号优先走1 / 2号皮带线,
//7 - 11优先走3 / 4号皮带线
if (param.rfidLoc.Equals(12))
{
// 大料12号只能走1号2后皮带线
mustLine = new List<int>(leftLineList);
}
else if (param.rfidLoc <= 6)
{
firstLine = new List<int>(leftLineList);
}
else if (param.rfidLoc >= 7)
{
firstLine = new List<int>(rightLineList);
}
}
if (mustLine.Count > 0)
{
if (mustLine.Contains(DeviceID))
{
LogInfo(" C1->出料线:工单料,必须线" + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
}
else if (firstLine.Count > 0)
{
if (firstLine.Contains(DeviceID) )
{
LogInfo(" C1->出料线:工单料,优先线" + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
else
{
TimeSpan span = DateTime.Now - trayInfo.LastUpdateTime;
if (span.TotalSeconds > 300)
{
LogInfo(" C1->出料线:工单料,超时五分钟" + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
}
}
else
{
if (DeviceID.Equals(216))
{
if (LeftLinePriority())
{
return false;
}
if (LastValue.Equals(2))
{
LogInfo(" C1->出料线:工单料,随意放" + LastValue + "," + "" + param.ToStr());
LastValue = 0;
MoveInfo.MoveParam = param;
return true;
}
else
{
LastValue++;
}
}
else if (DeviceID.Equals(213))
{
if (LeftLinePriority())
{
return false;
}
if (LastValue.Equals(0))
{
LogInfo(" C1->出料线:工单料,随意放" + LastValue + "," + "" + param.ToStr());
LastValue++;
MoveInfo.MoveParam = param;
return true;
}
else
{
LastValue = 0;
}
}
else
{
if (RightLinePriority())
{
return false;
}
LogInfo(" C1->出料线:工单料,随意放" + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
}
}
}
}
}
catch (Exception ex)
{
LogUtil.error(Name+"TrayNeedToOutLine 出错:" + ex.ToString());
}
return false;
}
private bool LeftLinePriority()
{
if (!LineManager.DisLeftOutLine)
{
HYEquipBase hy14 = LineManager.Line.HYEquipMap[214];
HYEquipBase hy7 = LineManager.Line.HYEquipMap[207];
//如果右侧接驳台满,左侧未满,横移到左侧
if (hy14.IOValue(IO_Type.HY_OL_Full_Check).Equals(IO_VALUE.HIGH) && hy7.IOValue(IO_Type.HY_OL_Full_Check).Equals(IO_VALUE.LOW))
{
return true;
}
}
return false;
}
private bool RightLinePriority()
{
if (!LineManager.DisRightOutLine)
{
HYEquipBase hy14 = LineManager.Line.HYEquipMap[214];
HYEquipBase hy7 = LineManager.Line.HYEquipMap[207];
if (hy7.IOValue(IO_Type.HY_OL_Full_Check).Equals(IO_VALUE.HIGH) && hy14.IOValue(IO_Type.HY_OL_Full_Check).Equals(IO_VALUE.LOW))
{
return true;
}
}
return false;
}
private int LastValue = 0;
#region 阻挡气缸处理
private void HY_StopCylinderUp(LineMoveInfo moveinfo = null)
{
if (!DeviceID.Equals(209))
{
return;
}
if (Config.DOList.ContainsKey(IO_Type.HY_StopCylinder_Up) && Config.DOList.ContainsKey(IO_Type.HY_TopCylinder_Down))
{
IOMove(IO_Type.HY_StopCylinder_Down, IO_VALUE.LOW);
IOMove(IO_Type.HY_StopCylinder_Up, IO_VALUE.HIGH);
if (moveinfo != null)
{
moveinfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_StopCylinder_Down, IO_VALUE.LOW));
moveinfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_StopCylinder_Up, IO_VALUE.HIGH));
}
}
}
private void HY_StopCylinderDown(LineMoveInfo moveinfo = null)
{
if (!DeviceID.Equals(209))
{
return;
}
if (Config.DOList.ContainsKey(IO_Type.HY_StopCylinder_Up) && Config.DOList.ContainsKey(IO_Type.HY_TopCylinder_Down))
{
IOMove(IO_Type.HY_StopCylinder_Up, IO_VALUE.LOW);
IOMove(IO_Type.HY_StopCylinder_Down, IO_VALUE.HIGH);
if (moveinfo != null)
{
moveinfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_StopCylinder_Up, IO_VALUE.LOW));
moveinfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_StopCylinder_Down, IO_VALUE.HIGH));
}
}
}
private void OL_StopCylinderUp(LineMoveInfo moveinfo = null)
{
if (!(DeviceID.Equals(209) || DeviceID.Equals(216)))
{
return;
}
if (Config.DOList.ContainsKey(IO_Type.HY_OL_StopCylinder_Up) && Config.DOList.ContainsKey(IO_Type.HY_TopCylinder_Down))
{
IOMove(IO_Type.HY_OL_StopCylinder_Down, IO_VALUE.LOW);
IOMove(IO_Type.HY_OL_StopCylinder_Up, IO_VALUE.HIGH);
if (moveinfo != null)
{
moveinfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_OL_StopCylinder_Down, IO_VALUE.LOW));
moveinfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_OL_StopCylinder_Up, IO_VALUE.HIGH));
}
}
}
private void OL_StopCylinderDown(LineMoveInfo moveinfo = null)
{
if (!(DeviceID.Equals(209) || DeviceID.Equals(216)))
{
return;
}
if (Config.DOList.ContainsKey(IO_Type.HY_OL_StopCylinder_Up) && Config.DOList.ContainsKey(IO_Type.HY_TopCylinder_Down))
{
IOMove(IO_Type.HY_OL_StopCylinder_Up, IO_VALUE.LOW);
IOMove(IO_Type.HY_OL_StopCylinder_Down, IO_VALUE.HIGH);
if (moveinfo != null)
{
moveinfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_OL_StopCylinder_Up, IO_VALUE.LOW));
moveinfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_OL_StopCylinder_Down, IO_VALUE.HIGH));
}
}
}
#endregion
#region 阻挡块升降处理
internal override void OpenStopBlock()
{
preRWTime = DateTime.Now;
LogInfo("OpenStopCylinder: 下降阻挡气缸,上下气缸上升,顶升气缸下降");
IOMove(IO_Type.HY_OL_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.HIGH);
IOMove(IO_Type.HY_StopDown, IO_VALUE.HIGH);
CylinderMove(null, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
HY_StopCylinderUp();
OL_StopCylinderUp();
}
internal override bool OpenStopBlockOk(TimeSpan span)
{
TimeSpan rwSpan = DateTime.Now - preRWTime;
bool frontIsOk = !Config.DOList.ContainsKey(IO_Type.HY_FrontStopDown) || IOValue(IO_Type.HY_FrontStopDown).Equals(IO_VALUE.HIGH);
if (frontIsOk &&
IOValue(IO_Type.HY_StopDown).Equals(IO_VALUE.HIGH)
&& CylinderIsOk(IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down)
&& CylinderIsOk(IO_Type.HY_OL_StopCylinder_Down, IO_Type.HY_OL_StopCylinder_Up))
{
return true;
}
else if (rwSpan.TotalSeconds > 5 && span.TotalSeconds > 6 && span.TotalSeconds < LineManager.Config.IOSingle_TimerOut * 2)
{
preRWTime = DateTime.Now;
OpenStopBlock();
}
return false;
}
internal override void CloseStopBlock()
{
LogInfo("CloseCylinderStop: 上升阻挡气缸,上下气缸上升,顶升气缸下降");
IOMove(IO_Type.HY_OL_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW);
CylinderMove(null, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
HY_StopCylinderUp();
OL_StopCylinderUp();
}
#endregion
}
}
......@@ -10,14 +10,11 @@ using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
/// <summary>
/// 此类对应上料工位横移:HY1,HY2,HY20,HY21
/// </summary>
public class HY_C1_SLStation : HYEquipBase
{
public HY_C1_SLStation(string cid, HYEquip_Config config) : base(cid, config)
{
Name = (" HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + " ").ToUpper();
Name = (" HY" + (DeviceID % 100).ToString().PadLeft(1, '0') + " ").ToUpper();
MoveInfo.Name = Name;
SecondMoveInfo.Name = Name;
}
......@@ -118,9 +115,6 @@ namespace OnlineStore.DeviceLibrary
{
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
}
//LineStop();
//CylinderMove( null , IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
//LocationCylinderDown(null);
}
......@@ -395,11 +389,6 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.IsStep(LineMoveStep.HY11_TopUpToHY))
{
// MoveInfo.NextMoveStep(LineMoveStep.HY12_WaitHY2Free);
// CheckLog("托盘横移" + MoveInfo.SLog + " ,等待HY" + HyOutDeviceId + "空闲,可以开始横移 ");
//}
//else if (MoveInfo.IsStep(LineMoveStep.HY12_WaitHY2Free))
//{
HYEquipBase hyOut = GetHyOutEquip();
if (hyOut.CanStartMove())
{
......
......@@ -17,18 +17,6 @@ namespace OnlineStore.DeviceLibrary
{
public HY_Coveryor(string cid, HYEquip_Config config) : base(cid, config)
{
if (DeviceID.Equals(210))
{
Name = (" J1HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + " ").ToUpper();
}
else if (DeviceID.Equals(212))
{
Name = (" J2HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + " ").ToUpper();
}
else
{
Name = (" J3HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + " ").ToUpper();
}
Name = (" D7-出料口").ToUpper();
MoveInfo.Name = Name;
SecondMoveInfo.Name = Name;
......@@ -139,10 +127,6 @@ namespace OnlineStore.DeviceLibrary
CloseAxis(UpdownAxis);
}
CloseAllDO();
//LineStop();
//IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
//CylinderMove(null, IO_Type.HY_LocationCylinder_Up, IO_Type.HY_LocationCylinder_Down);
//CylinderMove(null, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
}
public override void StopRun()
{
......@@ -151,8 +135,6 @@ namespace OnlineStore.DeviceLibrary
mainTimer.Enabled = false;
}
StopMove();
//CheckAndMove(IO_Type.HY_ClampCylinder_Work, IO_VALUE.LOW);
//CheckAndMove(IO_Type.HY_ClampCylinder_Relax, IO_VALUE.LOW);
runStatus = LineRunStatus.Wait;
}
......
......@@ -13,8 +13,6 @@ namespace OnlineStore.DeviceLibrary
partial class HY_Coveryor
{
#region 托盘检测处理
private Stopwatch trayCheckWait = new Stopwatch();
private Stopwatch trayCheckLowWait = new Stopwatch();
private object lockObj = "";
......@@ -37,7 +35,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + " CheckFixture " + " 不在空闲中,直接返回 ");
return;
}
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None)&&IOValue(IO_Type.HY_OL_Full_Check).Equals(IO_VALUE.LOW))
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None))
{
bool canpro = true;
if (IOValue(IO_Type.HY_TrayCheck).Equals(IO_VALUE.HIGH))
......@@ -189,7 +187,7 @@ namespace OnlineStore.DeviceLibrary
{
SecondMoveInfo.NextMoveStep(LineMoveStep.JHY_08_LocationUp);
CheckLog(" 接驳台托盘" + SecondMoveInfo.SLog + ":料盘需要横移,定位上升");
LocationCylinderUp(SecondMoveInfo);
//LocationCylinderUp(SecondMoveInfo);
}
else if (SecondMoveInfo.IsStep(LineMoveStep.JHY_08_LocationUp))
{
......
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public class HY_OutLine : HYEquipBase
{
public HY_OutLine(string cid, HYEquip_Config config) : base(cid, config)
{
Name = (" "+config.LineName+"HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + " ").ToUpper();
MoveInfo.Name = Name;
SecondMoveInfo.Name = Name;
}
public override bool StartRun(bool isDebug = false)
{
if (CanStartRun().Equals(false))
{
return false;
}
mainTimer.Enabled = false;
MoveInfo.EndMove();
runStatus = LineRunStatus.HomeMoving;
MoveInfo.NewMove(LineMoveType.RHome);
StartReset();
if (isDebug)
{
mainTimer.Enabled = true;
}
return true;
}
public override bool Reset()
{
StopMove();
runStatus = LineRunStatus.Reset;
MoveInfo.NewMove(LineMoveType.Reset);
StartReset();
return true;
}
private void StartReset()
{
ResetClearData();
SecondMoveInfo.EndMove();
MoveInfo.NextMoveStep(LineMoveStep.HY_R_01StopMove);
LogInfo("开始" + MoveInfo.MoveType + ": 线体停止,顶升下降,阻挡上升 ");
LineStop(MoveInfo);
IOMove(IO_Type.HY_ShortL_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_LongL_StopDown, IO_VALUE.LOW);
CylinderMove(null, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
isInPro = false;
}
protected override void ResetProcess()
{
if (MoveInfo.IsInWait)
{
CheckWait(MoveInfo);
}
if (!MoveInfo.IsInWait)
{
if (MoveInfo.IsStep(LineMoveStep.HY_R_01StopMove))
{
LogInfo(MoveInfo.MoveType + " 完成!");
runStatus = LineRunStatus.Runing;
MoveInfo.EndMove();
}
}
}
internal override void StopMove()
{
MoveInfo.EndMove();
SecondMoveInfo.EndMove();
LogInfo("停止运动:关闭所有DO ");
CloseAllDO();
//LineStop();
//IOMove(IO_Type.HY_ShortL_StopDown, IO_VALUE.LOW);
//IOMove(IO_Type.HY_LongL_StopDown, IO_VALUE.LOW);
//CylinderMove(null, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
}
public override void StopRun()
{
if (mainTimer != null)
{
mainTimer.Enabled = false;
}
StopMove();
runStatus = LineRunStatus.Wait;
}
protected override void BaseTimerProcess()
{
if (isInSuddenDown || isNoAirCheck)
{
return;
}
IOTimeOutProcess();
//判断流水线打开了才可以运行
if ((!MoveStop))
{
if (MoveInfo.MoveType.Equals(LineMoveType.None))
{
if (LineManager.Line.OutHyCanProLine())
{
CheckFixture();
}
}
else
{
if (IOValue(IO_Type.HY_TrayCheck).Equals(IO_VALUE.HIGH))
{
trayCheck2LowWait.Stop();
}
else
{
CheckStopWatch(trayCheck2LowWait, 30000, false);
}
if (MoveInfo.MoveType.Equals(LineMoveType.RHome) || MoveInfo.MoveType.Equals(LineMoveType.Reset))
{
ResetProcess();
}
else
{
FixtureProcess();
}
}
}
}
private Stopwatch trayCheckWait = new Stopwatch();//检测到托盘的时间
private Stopwatch trayCheck2LowWait = new Stopwatch();//上一个托盘离开的时间
private object lockObj = "";
private void CheckFixture()
{
if (Monitor.TryEnter(lockObj, 100))
{
try
{
if (MoveInfo.MoveType.Equals(LineMoveType.None).Equals(false))
{
LogUtil.error(Name + " CheckFixture " + " 不在空闲中,直接返回 ");
return;
}
if (MoveInfo.MoveType.Equals(LineMoveType.None) && IOValue(IO_Type.HY_OL_Full_Check).Equals(IO_VALUE.LOW))
{
if (IOValue(IO_Type.HY_TrayCheck).Equals(IO_VALUE.HIGH))
{
if (!CylinderIsOk(IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down))
{
CylinderMove(null, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
}
}
else
{
if (Config.DIList.ContainsKey(IO_Type.HY_LongL_StopCheck) && IOValue(IO_Type.HY_LongL_StopCheck).Equals(IO_VALUE.HIGH))
{
bool check2IsOk = CheckStopWatch(trayCheck2LowWait, TrayWaitTime, false);
if (CheckStopWatch(trayCheckWait, TrayWaitTime, false) && check2IsOk)
{
//托盘在前阻挡处
trayCheckWait.Stop();
trayCheck2LowWait.Stop();
MoveInfo.NewMove(LineMoveType.Fixture);
MoveInfo.NextMoveStep(LineMoveStep.OHY01_LongLCheck);
LogInfo(" 出料线横移(长线):" + MoveInfo.SLog + ",长线阻挡检测到托盘");
ClearTrayRFID();
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_LongL_StopCheck, IO_VALUE.HIGH));
}
}
else if (Config.DIList.ContainsKey(IO_Type.HY_ShortL_StopCheck) && IOValue(IO_Type.HY_ShortL_StopCheck).Equals(IO_VALUE.HIGH))
{
bool check2IsOk = CheckStopWatch(trayCheck2LowWait, TrayWaitTime, false);
if (CheckStopWatch(trayCheckWait, TrayWaitTime, false) && check2IsOk)
{
//托盘在前阻挡处
trayCheckWait.Stop();
trayCheck2LowWait.Stop();
MoveInfo.NewMove(LineMoveType.Fixture);
MoveInfo.NextMoveStep(LineMoveStep.OHY11_ShortLCheck);
LogInfo(" 出料线横移(长线):" + MoveInfo.SLog + ",短线阻挡检测到托盘");
ClearTrayRFID();
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_ShortL_StopCheck, IO_VALUE.HIGH));
}
}
else
{
bool check2IsOk = CheckStopWatch(trayCheck2LowWait, TrayWaitTime, false);
trayCheckWait.Stop();
}
}
}
}
catch (Exception ex)
{
LogUtil.error(Name + " CheckFixture " + " 出错:" + ex.ToString());
}
finally
{
Monitor.Exit(lockObj);
}
}
else
{
LogUtil.error(Name + " CheckFixture " + "失败,未得到锁");
}
}
protected override void FixtureProcess()
{
if (MoveInfo.IsInWait)
{
CheckWait(MoveInfo);
}
if (MoveInfo.IsInWait)
{
return;
}
#region 托盘检测处理
#region 长线阻挡放行
if (MoveInfo.IsStep(LineMoveStep.OHY01_LongLCheck))
{
MoveInfo.NextMoveStep(LineMoveStep.OHY02_TopDown);
IOMove(IO_Type.HY_ShortL_StopDown, IO_VALUE.LOW);
CheckLog("出料线横移(长线)" + MoveInfo.SLog + " 顶升气缸下降");
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
}
else if (MoveInfo.IsStep(LineMoveStep.OHY02_TopDown))
{
MoveInfo.NextMoveStep(LineMoveStep.OHY03_LongLStopDown);
CheckLog("出料线横移(长线)" + MoveInfo.SLog + " 长线体阻挡下降1200");
IOMove(IO_Type.HY_LongL_StopDown, IO_VALUE.HIGH, 1200);
}
else if (MoveInfo.IsStep(LineMoveStep.OHY03_LongLStopDown))
{
MoveInfo.NextMoveStep(LineMoveStep.OHY04_WaitTray);
CheckLog("出料线横移(长线)" + MoveInfo.SLog + " 等待托盘检测信号");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_LongL_StopCheck, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
}
else if (MoveInfo.IsStep(LineMoveStep.OHY04_WaitTray))
{
MoveInfo.NextMoveStep(LineMoveStep.OHY05_TrayCheck);
CheckLog("出料线横移(长线)" + MoveInfo.SLog + " 再次等待托盘检测信号500ms");
IOMove(IO_Type.HY_LongL_StopDown, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
}
else if (MoveInfo.IsStep(LineMoveStep.OHY05_TrayCheck))
{
MoveInfo.NextMoveStep(LineMoveStep.OHY21_WaitTrayLeave);
CheckLog("出料线横移(长线)" + MoveInfo.SLog + " 等待托盘离开");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.LOW));
}
#endregion
#region 短线阻挡放行
else if (MoveInfo.IsStep(LineMoveStep.OHY11_ShortLCheck))
{
MoveInfo.NextMoveStep(LineMoveStep.OHY12_TopUp);
IOMove(IO_Type.HY_LongL_StopDown, IO_VALUE.LOW);
CheckLog("出料线横移(短线)" + MoveInfo.SLog + " 顶升气缸上升");
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Down, IO_Type.HY_TopCylinder_Up);
}
else if (MoveInfo.IsStep(LineMoveStep.OHY12_TopUp))
{
MoveInfo.NextMoveStep(LineMoveStep.OHY13_ShortLStopDown);
CheckLog("出料线横移(短线)" + MoveInfo.SLog + " 短线阻挡下降1200,线体转动");
IOMove(IO_Type.HY_ShortL_StopDown, IO_VALUE.HIGH, 1200);
LineRun(MoveInfo);
}
else if (MoveInfo.IsStep(LineMoveStep.OHY13_ShortLStopDown))
{
MoveInfo.NextMoveStep(LineMoveStep.OHY14_WaitTray);
CheckLog("出料线横移(短线)" + MoveInfo.SLog + " 等待托盘检测信号");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_ShortL_StopCheck, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
}
else if (MoveInfo.IsStep(LineMoveStep.OHY14_WaitTray))
{
MoveInfo.NextMoveStep(LineMoveStep.OHY15_TrayCheck);
CheckLog("出料线横移(短线)" + MoveInfo.SLog + " 再次等待托盘检测信号500ms");
IOMove(IO_Type.HY_ShortL_StopDown, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
}
else if (MoveInfo.IsStep(LineMoveStep.OHY15_TrayCheck))
{
MoveInfo.NextMoveStep(LineMoveStep.OHY16_TopDown);
CheckLog("出料线横移(短线)" + MoveInfo.SLog + " 顶升气缸下降,线体停止");
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
LineStop(MoveInfo);
}
else if (MoveInfo.IsStep(LineMoveStep.OHY16_TopDown))
{
MoveInfo.NextMoveStep(LineMoveStep.OHY21_WaitTrayLeave);
CheckLog("出料线横移(短线)" + MoveInfo.SLog + " 等待托盘离开");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.LOW));
}
#endregion
else if (MoveInfo.IsStep(LineMoveStep.OHY21_WaitTrayLeave))
{
MoveInfo.NextMoveStep(LineMoveStep.OHY22_TrayLeave);
CheckLog("出料线横移" + MoveInfo.SLog + " 再次等待托盘检测信号500ms");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.LOW));
}
else if (MoveInfo.IsStep(LineMoveStep.OHY22_TrayLeave))
{
CheckLog("出料线横移" + MoveInfo.SLog + " 横移结束");
MoveEndS();
}
else
{
LogUtil.error(Name + "FixtureProcess 未找到[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "]的处理");
}
#endregion
}
}
}
......@@ -449,10 +449,7 @@ namespace OnlineStore.DeviceLibrary
public void WriteDrivetMotorRun(IO_VALUE value)
{
IOMove(IO_Type.MotorRun_C1_123, value);
IOMove(IO_Type.MotorRun_C1_4, value);
IOMove(IO_Type.MotorRun_23458, value);
IOMove(IO_Type.MotorRun_679, value);
IOMove(IO_Type.MotorRun_C1, value);
}
......
......@@ -17,10 +17,7 @@ namespace OnlineStore.DeviceLibrary
public bool CanProcessLine(bool isCheckSleep = true)
{
if (IOManager.IOValue(IO_Type.MotorRun_C1_123, 0).Equals(IO_VALUE.HIGH) &&
IOManager.IOValue(IO_Type.MotorRun_C1_4, 0).Equals(IO_VALUE.HIGH) &&
IOManager.IOValue(IO_Type.MotorRun_679, 0).Equals(IO_VALUE.HIGH) &&
IOManager.IOValue(IO_Type.MotorRun_23458, 0).Equals(IO_VALUE.HIGH))
if (IOManager.IOValue(IO_Type.MotorRun_C1, 0).Equals(IO_VALUE.HIGH))
{
return true;
}
......@@ -28,12 +25,7 @@ namespace OnlineStore.DeviceLibrary
}
public bool OutHyCanProLine()
{
if (IOManager.IOValue(IO_Type.MotorRun_679, 0).Equals(IO_VALUE.HIGH) &&
IOManager.IOValue(IO_Type.MotorRun_23458, 0).Equals(IO_VALUE.HIGH))
{
return true;
}
return false;
return CanProcessLine();
}
private DateTime preIoTimerOutTime = DateTime.Now;
......@@ -236,13 +228,16 @@ namespace OnlineStore.DeviceLibrary
#region 料仓出入库逻辑处理
/// <summary>--
/// BOX出入库完成事件
/// </summary>
public void boxBean_OutStoreEnd(int storeId, InOutParam param)
{
MoveEquip moveEquip = MoveEquipMap[storeId];
string posId = param != null ? param.PosId : "";
if (moveEquip.OnlyProOutTray)
{
LogUtil.error(param.ToStr() + " 已经完成出库," + moveEquip.Name + " 无法执行出库 ");
return;
}
if (moveEquip.IsDebug)
{
LogUtil.error(param.ToStr() + " 已经完成出库," + moveEquip.Name + "当前正在调试中,不继续操作!");
......@@ -270,11 +265,7 @@ namespace OnlineStore.DeviceLibrary
moveEquip.AddWaitOutInfo(param);
}
}
/// <summary>
/// 判断移栽当前是否处于可出库状态
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public bool CanOutStore(int id)
{
if (!NoErrorAlarm())
......@@ -290,6 +281,10 @@ namespace OnlineStore.DeviceLibrary
return false;
}
MoveEquip move = MoveEquipMap[id];
if (move.OnlyProOutTray)
{
return false;
}
if (!move.NoAlarm() || move.waitInStoreList.Count > 0 || move.IsDebug || move.waitOutStoreList.Count > 0)
{
return false;
......@@ -355,34 +350,13 @@ namespace OnlineStore.DeviceLibrary
#region 上料机构托盘到位验证及放行
/// <summary>
/// 上料机构,判断对应的空托盘是否准备完成
/// </summary>
/// <param name="deviceID">上料机构ID</param>
/// <param name="trayNum">空托盘号</param>
/// <returns></returns>
internal bool TrayIsReady(int deviceID, out int trayNum)
{
trayNum = -1;
bool isDebug = AllEquipMap[deviceID].IsDebug;
//if (deviceID.Equals(103))
//{
// if (T3C1TrayIsReady())
// {
// trayNum = T3C1_TrayNum;
// return true;
// }
// //TODO 调试模式直接返回true
// if (IsDebug && runStatus <= LineRunStatus.Wait)
// {
// return true;
// }
//}
//else
{
foreach (HYEquipBase hy in HYEquipMap.Values)
{
if (hy.Config.WorkDeviceId.Equals(deviceID))
......@@ -400,21 +374,11 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
return false;
}
/// <summary>
/// 上料机构,料盘已放入托盘,托盘可以离开
/// </summary>
/// <param name="deviceID"></param>
internal void TrayCanLeave(int deviceID)
{
//if (deviceID.Equals(103))
//{
// T3C1TrayCanLeave();
//}
//else
{
foreach (HYEquipBase hy in HYEquipMap.Values)
{
......@@ -425,7 +389,6 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
#endregion
......
......@@ -10,21 +10,23 @@ using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
/// <summary>
/// 流水线自动料仓-进仓装置类
/// </summary>
public partial class MoveEquip : EquipBase
{
public MoveEquip_Config Config;
public bool OnlyProOutTray = false;
public MoveEquip(string cid, MoveEquip_Config config)
{
this.DeviceID = config.Id;
this.Config = config;
baseConfig = config;
IsDebug = config.IsDebug.Equals(1);
Name = (" " + "D"+ DeviceID + "-进仓" + DeviceID.ToString().PadLeft(2, '0') + " " ).ToUpper();
Name = (" " + "D" + DeviceID + "-进仓" + DeviceID.ToString().PadLeft(1, '0') + " ").ToUpper();
if (DeviceID.Equals(7))
{
OnlyProOutTray = true;
Name = " " + "D" + DeviceID + "-出料口";
}
Init();
MoveInfo = new LineMoveInfo(DeviceID, "[" + Name.Trim() + "-Move]");
......@@ -34,30 +36,7 @@ namespace OnlineStore.DeviceLibrary
UpdownAxis = new AxisBean(config.UpDown_Axis, Name);
RFIDIP = RFIDManager.GetRFIP(DeviceID);
}
//private string GetNByID()
//{
// string name = "";
// int index = DeviceID;
// if (index >= 0)
// {
// int num =( index+1) / 2;
// int subNum = index % 2;
// if (subNum.Equals(0))
// {
// subNum = 2;
// }
// if (num <= 6)
// {
// }
// else
// {
// subNum = 3 - subNum;
// }
// name = "D" + num + "-" + subNum;
// }
// return name;
//}
public override bool StartRun(bool isDebug = false)
{
if (CanStartRun().Equals(false))
......@@ -182,10 +161,6 @@ namespace OnlineStore.DeviceLibrary
LogInfo("停止运动:关闭所有DO ");
//UpdownUpMove();
//CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
//IOMove(IO_Type.StopDown1, IO_VALUE.LOW);
//IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
if (UseAxis)
{
UpdownAxis.SuddenStop();
......@@ -202,20 +177,6 @@ namespace OnlineStore.DeviceLibrary
mainTimer.Enabled = false;
}
StopMove();
//停止运行时,把所有IO 置零
//CheckAndMove(IO_Type.StopDown1, IO_VALUE.LOW);
//CheckAndMove(IO_Type.StopDown2, IO_VALUE.LOW);
//CheckAndMove(IO_Type.TopCylinder_Up, IO_VALUE.LOW);
//CheckAndMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW);
//CheckAndMove(IO_Type.BeforeAfterCylinder_Before, IO_VALUE.LOW);
//CheckAndMove(IO_Type.BeforeAfterCylinder_After, IO_VALUE.LOW);
//if (UseAxis.Equals(false))
//{
// CheckAndMove(IO_Type.UpDownCylinder_Up, IO_VALUE.LOW);
// CheckAndMove(IO_Type.UpDownCylinder_Down, IO_VALUE.LOW);
//}
//CheckAndMove(IO_Type.ClampCylinder_Work, IO_VALUE.LOW);
//CheckAndMove(IO_Type.ClampCylinder_Relax, IO_VALUE.LOW);
runStatus = LineRunStatus.Wait;
}
......@@ -244,6 +205,7 @@ namespace OnlineStore.DeviceLibrary
private void OutStoreListPro()
{
//料仓出库完成,进仓装置开始出库检测
if (IsDebug.Equals(false) && MoveInfo.MoveType.Equals(LineMoveType.None) && runStatus.Equals(LineRunStatus.Runing))
{
......
......@@ -390,8 +390,6 @@ namespace OnlineStore.DeviceLibrary
InLog("入库 " + MoveInfo.SLog + ",前后气缸后退,等待300 ");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
//此时box就可以入库操作了 //触发事件,BOX入库
// LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
}
else
{
......@@ -412,9 +410,6 @@ namespace OnlineStore.DeviceLibrary
{
if (!LineServer.IsInStorePro(DeviceID, MoveInfo.MoveParam.PosId))
{
//InLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓还未开始入库,再次发送starIn命令");
//LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore);
InLog("入库 " + MoveInfo.SLog + ",再次通知BOX开始入库,等待3000");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
......@@ -483,17 +478,17 @@ namespace OnlineStore.DeviceLibrary
return false;
}
/// <summary>
/// 是否需要出库的托盘
/// </summary>
/// <param name="currMoveTrayNum"></param>
/// <returns></returns>
private bool CheckIsNeedOutStore()
{
if (currTrayNum <= 0)
{
return false;
}
if (OnlyProOutTray)
{
return false;
}
bool isFull = TrayManager.TrayIsFull(currTrayNum);
if (isFull)
{
......@@ -518,6 +513,10 @@ namespace OnlineStore.DeviceLibrary
{
return false;
}
if (OnlyProOutTray)
{
return false;
}
bool moveOk = (IsBigStore() && MoveInfo.MoveStep >= LineMoveStep.MO_56_ClampCheck && MoveInfo.IsInWait.Equals(false)) || MoveInfo.MoveStep >= LineMoveStep.MO_57_CylinderAfter;
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && moveOk
&& (!MoveInfo.IsStep(LineMoveStep.MO_60_CylinderUp)))
......@@ -526,10 +525,27 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
/// <summary>
/// 判断盘号是否需要入库
/// </summary>
/// <returns></returns>
private bool ChekcIsNeedMoveReel()
{
if (currTrayNum <= 0)
{
return false;
}
if (OnlyProOutTray)
{
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
if (tray.InOrOutStore.Equals(2))
{
return true;
}else if (tray.InoutPar.InStoreNg)
{
return true;
}
}return false;
}
private bool CheckIsNeedInStore()
{
if (currTrayNum <= 0)
......@@ -702,6 +718,7 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_Stop1Down);
CheckLog(" 托盘检测:料盘检测StopCylinder_Check1 " + SecondMoveInfo.SLog + "阻挡气缸1-1下降 , 等待 StopCylinder_Check1=0,清理托盘RFID");
ClearTrayRFID();
IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
IOMove(IO_Type.StopDown1, IO_VALUE.HIGH, 1200);
SecondMoveInfo.OneWaitCanEndStep = true;
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCheck1, IO_VALUE.LOW));
......@@ -753,6 +770,7 @@ namespace OnlineStore.DeviceLibrary
{
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_01_TrayCheck);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 阻挡气缸1-1上升,等待 阻挡2托盘检测=1)");
IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
SecondMoveInfo.OneWaitCanEndStep = true;
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCheck2, IO_VALUE.HIGH));
//最多等待30秒
......@@ -881,6 +899,12 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_08_WaitInStore);
isNeedMove = true;
}
else if (ChekcIsNeedMoveReel())
{
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘【" + currTrayNum + "】,料盘要去出料口,等待移栽");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_08_WaitInStore);
isNeedMove = true;
}
else
{
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘【" + currTrayNum + "】不需要出入库, 放盘通过");
......@@ -966,21 +990,7 @@ namespace OnlineStore.DeviceLibrary
#endregion
#region 如果是进仓5,托盘横移后直接结束处理
internal void EndProcessTray()
{
if (DeviceID.Equals(5))
{
if (SecondMoveInfo.MoveType.Equals(LineMoveType.Fixture) && SecondMoveInfo.MoveStep <= LineMoveStep.MIO_04_Wait)
{
UpdateTrayNum();
LogUtil.info(Name + " EndProcessTray ,结束当前托盘[" + currTrayNum + "]处理【" + SecondMoveInfo.MoveType + "】【" + SecondMoveInfo.MoveStep + "】 ");
SecondMoveInfo.EndMove();
}
}
}
#endregion
}
}
......@@ -14,12 +14,6 @@ namespace OnlineStore.DeviceLibrary
{
public class LineManager
{
//public static bool DisLeftOutLine = false ;
//public static bool DisRightOutLine = false ;
//public static bool DisSLEquip = false;
//public static bool DisAllHy = false;
//public static bool DisAllMove = false;
public static bool TrayToOutLineTest = false;
public static bool DisGetWare = false;
......@@ -117,6 +111,7 @@ namespace OnlineStore.DeviceLibrary
config = appPath + moveEquipConfig;
}
MoveEquip_Config moveConfig = CSVConfigReader.LoadMoveConfig(i, DeviceType.MoveEquip, config);
moveConfig.ConfigSpeed(Config);
int subType = i;
moveECMap.Add(i, moveConfig);
}
......@@ -133,6 +128,7 @@ namespace OnlineStore.DeviceLibrary
int subType = 100 + i;
string config = appPath + feedingEquipConfig.Replace(".csv", "_" + i + ".csv");
FeedingEquip_Config moveConfig = CSVConfigReader.LoadFeedingConfig(subType, DeviceType.FeedingEquip, config);
moveConfig.ConfigSpeed(Config);
moveConfig.SetIO(subType);
feedingECMap.Add(subType, moveConfig);
allConfigMap.Add(subType, moveConfig);
......@@ -151,6 +147,7 @@ namespace OnlineStore.DeviceLibrary
config = appPath + hyEquipConfig;
}
HYEquip_Config moveConfig = CSVConfigReader.LoadHYConfig(subType, DeviceType.HYEquip, config);
moveConfig.ConfigSpeed(Config);
moveConfig.LoadParam();
moveConfig.SetIO(subType);
HYECMap.Add(subType, moveConfig);
......
......@@ -31,18 +31,11 @@ namespace OnlineStore.DeviceLibrary
private static void IOErrorLog(string ioType, int subType, string IOType = "IO")
{
if (ioType.Equals(IO_Type.HY_FrontStopDown) || ioType.Equals(IO_Type.HY_OL_StopDown))
{
}
else if (ioType.Equals(IO_Type.HY_FrontStopCheck) || ioType.Equals(IO_Type.HY_OL_Tray_Check))
{
}
else if ( ioType.Equals(IO_Type.SL_RollerLine_Run)|| ioType.Equals(IO_Type.SL_OutLine_Run) || ioType.Equals(IO_Type.SL_OutLine_Check))
{
}else if (ioType.Equals(IO_Type.HY_LongL_StopDown))
if (ioType.Equals(IO_Type.HY_FrontStopCheck))
{
}else if (IOType.Equals(IO_Type.SL_Buffer_StopDown))
}
if (IOType.Equals(IO_Type.SL_Buffer_StopDown))
{
}
......
using System;
using System.Collections;
using System.Text;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Diagnostics;
using log4net;
using System.Reflection;
using OnlineStore.Common;
namespace OnlineStore.DeviceLibrary
{
public class AITcpClient
{
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// ------------------------------------------------------------------------
// Constants for access
private const byte fctReadCoil = 1;
private const byte fctReadDiscreteInputs = 2;
private const byte fctReadHoldingRegister = 3;
private const byte fctReadInputRegister = 4;
private const byte fctWriteSingleCoil = 5;
private const byte fctWriteSingleRegister = 6;
private const byte fctWriteMultipleCoils = 15;
private const byte fctWriteMultipleRegister = 16;
private const byte fctReadWriteMultipleRegister = 23;
/// <summary>Constant for exception illegal function.</summary>
public const byte excIllegalFunction = 1;
/// <summary>Constant for exception illegal data address.</summary>
public const byte excIllegalDataAdr = 2;
/// <summary>Constant for exception illegal data value.</summary>
public const byte excIllegalDataVal = 3;
/// <summary>Constant for exception slave device failure.</summary>
public const byte excSlaveDeviceFailure = 4;
/// <summary>Constant for exception acknowledge.</summary>
public const byte excAck = 5;
/// <summary>Constant for exception slave is busy/booting up.</summary>
public const byte excSlaveIsBusy = 6;
/// <summary>Constant for exception gate path unavailable.</summary>
public const byte excGatePathUnavailable = 10;
/// <summary>Constant for exception not connected.</summary>
public const byte excExceptionNotConnected = 253;
/// <summary>Constant for exception connection lost.</summary>
public const byte excExceptionConnectionLost = 254;
/// <summary>Constant for exception response timeout.</summary>
public const byte excExceptionTimeout = 255;
/// <summary>Constant for exception wrong offset.</summary>
private const byte excExceptionOffset = 128;
/// <summary>Constant for exception send failt.</summary>
private const byte excSendFailt = 100;
// ------------------------------------------------------------------------
// Private declarations
private static ushort _timeout = 500;
private static ushort _refresh = 10;
private static bool _connected = false;
private static bool _autoConnectOfBreak = false;
private Socket socketClient;
private int M281_A_Len = 0;
private byte[] tcpSocketReviceBuffer = new byte[2048];
//private Socket tcpSynCl;
//private byte[] tcpSynClBuffer = new byte[2048];
// ------------------------------------------------------------------------
/// <summary>Response data event. This event is called when new data arrives</summary>
public delegate void ResponseData(string ip, ushort id, byte function, byte[] data, byte[] reviceData);
/// <summary>Response data event. This event is called when new data arrives</summary>
public event ResponseData OnResponseData;
/// <summary>Exception data event. This event is called when the data is incorrect</summary>
public delegate void ExceptionData(string ip, ushort id, byte function, byte exception, byte[] reviceData);
/// <summary>Exception data event. This event is called when the data is incorrect</summary>
public event ExceptionData OnException;
/// <summary>
/// autoConnectOfBreak
/// </summary>
public bool autoConnectOfBreak
{
get { return _autoConnectOfBreak; }
set { _autoConnectOfBreak = value; }
}
public static ushort timeout
{
get { return _timeout; }
set { _timeout = value; }
}
public ushort refresh
{
get { return _refresh; }
set { _refresh = value; }
}
public bool connected
{
get { return _connected; }
}
public AITcpClient()
{
}
public string IP = "";
public int Port = 0;
public int TimeOutTime = 0;
public AITcpClient(string ip, ushort port)
{
TimeOutTime = 2000;
connect(ip, port);
}
private System.Timers.Timer reviceTimer = new System.Timers.Timer();
public void connect(string ip, ushort port)
{
try
{
this.IP = ip;
this.Port = port;
OnResponseData = null;
// Connect asynchronous client
socketClient = new Socket(IPAddress.Parse(ip).AddressFamily, SocketType.Stream, ProtocolType.Tcp);
if (TimeOutTime <= 0)
{
socketClient.Connect(new IPEndPoint(IPAddress.Parse(ip), port));
socketClient.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendTimeout, _timeout);
socketClient.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, _timeout);
socketClient.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, 1);
}
else
{
socketClient.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendTimeout, _timeout);
socketClient.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, _timeout);
socketClient.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, 1);
IAsyncResult connResult = socketClient.BeginConnect(ip, port, null, null);
connResult.AsyncWaitHandle.WaitOne(this.TimeOutTime, true); //等待2秒
if (!connResult.IsCompleted)
{
LogUtil.info(LOGGER, "Connect to " + ip + ":" + port + " fail!");
return;
}
else
{
_connected = true;
LogUtil.info(LOGGER, "Connect to " + ip + ":" + port + " success!");
}
}
//Thread threadReceive = new Thread(new ThreadStart(ReceiveHandle));
//threadReceive.Start();
reviceTimer.AutoReset = true;
reviceTimer.Elapsed += reviceTimer_Elapsed;
reviceTimer.Interval = 130;
reviceTimer.Enabled = true;
_connected = true;
}
catch (Exception error)
{
LogUtil.info(LOGGER, "Connect to " + ip + ":" + port + " fail!");
_connected = false;
}
}
public void WriteAIScope(ushort id, byte slaveId, string address, int value)
{
//0x000100000006FF0603EA0001
byte function = 0x06;
byte[] data = new byte[12];
byte[] _id = BitConverter.GetBytes((short)id);
data[0] = _id[0]; // Slave id high byte
data[1] = _id[1]; // Slave id low byte
data[2] = 0x00;
data[3] = 0x00;
data[4] = 0x00;
data[5] = 6; // Message size
data[6] = slaveId; // Slave address //必须设置为"1": 2012.04-24 覃发光;
data[7] = function; ; // Function code
byte[] _adr = AcSerialBean.StringToByte(address);
data[8] = _adr[0]; // Start address
data[9] = _adr[1]; // Start address
byte[] _length = BitConverter.GetBytes((short)1);
data[10] = _length[0]; // Number of data to read
data[11] = _length[1]; // Number of data to read
WriteAsyncData(data, id);
}
public void ReadAllAI(ushort id, string startAddress, int length, byte slaveId)
{
//0x 000100000006FF0302580010
byte function = 0x03;
byte[] data = CreateData(id, startAddress, (ushort)length, function, slaveId);
WriteAsyncData(data, id);
}
private byte[] CreateData(ushort id, string startAddress, ushort length, byte function, byte SlaveID)
{
byte[] data = new byte[12];
byte[] _id = BitConverter.GetBytes((short)id);
data[0] = _id[0]; // Slave id high byte
data[1] = _id[1]; // Slave id low byte
data[5] = 6; // Message size
data[6] = SlaveID; // Slave address //必须设置为"1": 2012.04-24 覃发光;
data[7] = function; // Function code
byte[] _adr = AcSerialBean.StringToByte(startAddress);
if (_adr.Length.Equals(2))
{
data[8] = _adr[0]; // Start address
data[9] = _adr[1]; // Start address
}
else if (_adr.Length.Equals(1))
{
data[8] = 0x00;
data[9] = _adr[0]; // Start address
}
else
{
data[8] = 0x00;
data[9] = 0x00;
}
byte[] _length = BitConverter.GetBytes((short)IPAddress.HostToNetworkOrder((short)length));
data[10] = _length[0]; // Number of data to read
data[11] = _length[1]; // Number of data to read
return data;
}
void reviceTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
try
{
ReviceDataProcess();
Thread.Sleep(10);
}
catch (Exception ex)
{
LOGGER.Error("出错:" + ex.ToString());
}
}
private void ReviceDataProcess()
{
byte[] rdata = Receive();
if (rdata == null)
{
return;
}
string str = "";
foreach (byte by in rdata)
{
str = str + " " + by;
}
int lengthIndex = 5;
//这里rdata就是接收到的数据,
IPEndPoint clientipe = (IPEndPoint)socketClient.RemoteEndPoint;
byte dataLength = rdata[lengthIndex];
int allLength = lengthIndex + 1 + dataLength;
if (rdata.Length <= allLength)
{
LogUtil.debug(LOGGER, clientipe.ToString() + "收到数据(无需分包):" + str);
ushort id = BitConverter.ToUInt16(rdata, 0);
byte function = rdata[7];
DataProcess(clientipe.ToString(), id, function, rdata);
return;
}
int currStartIndex = 0;
try
{
for (int i = 0; i < 100; i++)
{
if (rdata.Length < currStartIndex + lengthIndex)
{
LogUtil.error(clientipe.ToString() + "收到数据:" + str + "分包出错 [" + currStartIndex + "]");
break;
}
else
{
dataLength = rdata[currStartIndex + lengthIndex];
allLength = lengthIndex + 1 + dataLength;
byte[] thisData = new byte[allLength];
Array.Copy(rdata, currStartIndex, thisData, 0, allLength);
ushort id = BitConverter.ToUInt16(thisData, 0);
byte function = thisData[7];
DataProcess(clientipe.ToString(), id, function, thisData);
//剩余的数据处理
if (rdata.Length <= currStartIndex + allLength)
{
break;
}
currStartIndex = currStartIndex + allLength;
}
}
}
catch (Exception ex)
{
LogUtil.error(clientipe.ToString() + "收到数据:" + str + "分包出错 [" + currStartIndex + "]:" + ex.ToString());
}
}
private void DataProcess(string clientIp, ushort id, byte function, byte[] rdata)
{
byte[] data;
if (rdata.Length <= 9)
{
return;
}
if ((function >= fctWriteSingleCoil) && (function != fctReadWriteMultipleRegister))
{
data = new byte[2];
Array.Copy(rdata, 10, data, 0, 2);
}
// ------------------------------------------------------------
// Read response data
else
{
data = new byte[rdata[8]];
Array.Copy(rdata, 9, data, 0, rdata[8]);
}
// ------------------------------------------------------------
// Response data is slave exception
if (function > excExceptionOffset)
{
function -= excExceptionOffset;
CallException(id, function, rdata[8], rdata);
}
// ------------------------------------------------------------
// Response data is regular data
else if (OnResponseData != null)
{ //收到的数据打印出来
OnResponseData(clientIp, id, function, data, rdata);
}
}
private byte[] Receive()
{
try
{
if (socketClient == null || !socketClient.Connected || socketClient.Available < 1)
{
return null;
}
int size = socketClient.Available;
byte[] rData = new byte[size];
socketClient.Receive(rData, size, SocketFlags.None);
return rData;
}
catch (SocketException e)
{
if (socketClient != null)
{
socketClient.Close();
socketClient = null;
}
return null;
}
}
public void disconnect()
{
Dispose();
}
~AITcpClient()
{
Dispose();
}
public void Dispose()
{
reviceTimer.Enabled = false;
if (socketClient != null)
{
if (socketClient.Connected)
{
try { socketClient.Shutdown(SocketShutdown.Both); }
catch { }
socketClient.Close();
}
socketClient = null;
}
}
internal void CallException(ushort id, byte function, byte exception, byte[] rdata)
{
reviceTimer.Enabled = false;
if ((socketClient == null))
{
return;
}
if (exception == excExceptionConnectionLost)
{
//tcpSynCl = null;
socketClient = null;
return;
}
if (OnException != null)
{
OnException(socketClient.RemoteEndPoint.AddressFamily.ToString(), id, function, exception, rdata);
}
}
public void WriteAsyncData(byte[] write_data, ushort id)
{
try
{
if (socketClient == null)
{
LOGGER.Error("AITcpClient发送数据时发现socketClient=null");
return;
}
IPEndPoint clientipe = (IPEndPoint)socketClient.RemoteEndPoint;
if ((socketClient != null) && (socketClient.Connected))
{
try
{
//LogUtil.info( clientipe.ToString()+"发送数据:" + AcSerialBean.byteToHexStr(write_data));
socketClient.BeginSend(write_data, 0, write_data.Length, SocketFlags.None, new AsyncCallback(OnSend), null);
//socketClient.BeginReceive(tcpSocketReviceBuffer, 0, tcpSocketReviceBuffer.Length, SocketFlags.None, new AsyncCallback(OnReceive), socketClient);
ReviceDataProcess();
}
catch (SystemException error)
{
CallException(id, write_data[7], excExceptionConnectionLost, tcpSocketReviceBuffer);
}
}
else CallException(id, write_data[7], excExceptionConnectionLost, tcpSocketReviceBuffer);
}
catch (Exception ex)
{
LOGGER.Error("出错:" + ex.ToString());
}
}
// ------------------------------------------------------------------------
// Write asynchronous data acknowledge
private void OnSend(System.IAsyncResult result)
{
if (result.IsCompleted == false) CallException(0xFFFF, 0xFF, excSendFailt, tcpSocketReviceBuffer);
}
internal bool ISConnection()
{
if (socketClient == null)
{
return false;
}
if (socketClient.Connected == false)
{
return false;
}
return true;
}
}
}
using log4net;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
//using FuBaRobot.LoadCSVLibrary;
namespace OnlineStore.DeviceLibrary
{
/// <summary>
/// 康奈德IO控制模块
/// </summary>
public class KNDAIManager
{
public static ushort DefaultAILength = 8;
public static byte DefualtSlaveID = 255;
private static string AIStartAddress = "0258";
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public static Dictionary<string, AITcpClient> mastMap = new Dictionary<string, AITcpClient>();
public static Dictionary<string, List<KNDAI>> AIValueMap = new Dictionary<string, List<KNDAI>>();
private static object AIMapLock = "";
public static System.Timers.Timer timer = null;
private static ushort port = 502;
//public static bool IsNeedReadAI = true;
public static void ConnectionIP(string ioIp)
{
if (timer == null)
{
timer = new System.Timers.Timer();
timer.Interval = 300;
timer.AutoReset = true;
timer.Elapsed += timer_Elapsed;
timer.Enabled = true;
}
AITcpClient MBmaster = null;
if (mastMap.ContainsKey(ioIp))
{
MBmaster = mastMap[ioIp];
if (null != MBmaster)
{
MBmaster.disconnect();
MBmaster.Dispose();
MBmaster = null;
lock (AIMapLock)
{
if (AIValueMap.ContainsKey(ioIp))
{
AIValueMap.Remove(ioIp);
}
}
}
mastMap.Remove(ioIp);
}
try
{
// Create new modbus master and add event functions
MBmaster = new AITcpClient(ioIp, port);
MBmaster.OnResponseData += new AITcpClient.ResponseData(MBmaster_OnResponseData);
MBmaster.OnException += new AITcpClient.ExceptionData(MBmaster_OnException);
MBmaster.autoConnectOfBreak = false;
mastMap.Add(ioIp, MBmaster);
LogUtil.info(LOGGER, "连接AI模块[" + ioIp + "]成功");
Thread.Sleep(10);
WriteAIScope(ioIp, 1);
Thread.Sleep(10);
ReadAll(ioIp);
}
catch (Exception error)
{
LogUtil.error(LOGGER, "连接AI模块[" + ioIp + "]出错:" + error.ToString());
}
}
private static void ReadAll(string ioIp)
{
//读取所有的DO
ReadMultipleAI(ioIp, DefualtSlaveID, AIStartAddress, DefaultAILength);
}
/// <summary>
/// 判断Io模块是否连接
/// </summary>
public static bool IsConnection(string ip)
{
try
{
List<string> list = new List<string>(mastMap.Keys);
foreach (string io in list)
{
if (io.Equals(ip))
{
//判断是否连接,如果没有连接自动重连
AITcpClient clinet = mastMap[io];
if (clinet.ISConnection())
{
return true;
}
}
}
}
catch (Exception ex)
{
LogUtil.error(LOGGER, "出错啦:" + ex.ToString());
}
return false;
}
private static DateTime PreCheckTime = DateTime.Now;
private static bool isProcess = false;
public static bool NeedShow = false;
private static void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
if (isProcess)
{
return;
}
try
{
isProcess = true;
bool IsNeedReadAI = IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.HIGH) || NeedShow;
TimeSpan span = DateTime.Now - PreCheckTime;
List<string> list = new List<string>(mastMap.Keys);
foreach (string IP in list)
{
//判断是否连接,如果没有连接自动重连
AITcpClient clinet = mastMap[IP];
if (!IsNeedReadAI)
{
ClearAIData(IP);
continue;
}
if (clinet.ISConnection())
{
ReadAll(clinet.IP);
}
else if (span.TotalSeconds > 3)
{
LogUtil.error(LOGGER, "AI模块" + IP + "当前没有连上,重连" + IP);
ConnectionIP(IP);
PreCheckTime = DateTime.Now;
}
}
}
catch (Exception ex)
{
LogUtil.error(LOGGER, "出错啦:" + ex.ToString());
}
Thread.Sleep(2);
isProcess = false;
}
private static void WriteAIScope(string ioIp, int value)
{
// 0 表示 0 - 10V, 1 表示 0 - 5V
WriteAIScope(ioIp, DefualtSlaveID, "03EA", value);
}
private static void WriteAIScope(string ioIp, byte slaveId, string Adress, int value)
{
// 写 AI 模块采样范围,可以往寄存器里面写入 0 或 1。 0 表示 0 - 10V, 1 表示 0 - 5V。默
//认 0,写 AI 模块采样范围为 0 - 5V
ushort ID = 1;
AITcpClient MBmaster = null;
if (mastMap.ContainsKey(ioIp))
{
MBmaster = mastMap[ioIp];
MBmaster.WriteAIScope(ID, slaveId, Adress, value);
}
else
{
LogUtil.error(LOGGER, "WriteAIScope出错没有连接AI模块:" + ioIp);
}
}
private static void ReadMultipleAI(string ioIp, byte slaveId, string StartAddress, int length)
{
ushort ID = 1;
AITcpClient MBmaster = null;
if (mastMap.ContainsKey(ioIp))
{
MBmaster = mastMap[ioIp];
MBmaster.ReadAllAI(ID, StartAddress, length * 2, slaveId);
}
else
{
LogUtil.error(LOGGER, "ReadMultipleAI出错没有连接AI模块:" + ioIp);
}
}
public static void CloseAllConnection()
{
List<AITcpClient> list = new List<AITcpClient>();
foreach (AITcpClient tcp in list)
{
tcp.disconnect();
}
mastMap.Clear();
}
public static double ConvertAI(double aiValue, double defaultValue)
{
double xishu = (double)ConfigAppSettings.GetNumValue(Setting_Init.AI_ConvertPosition);
double result = Math.Round((aiValue - defaultValue) / xishu, 2);
return result;
}
public static double GetAIValue(string ioiP, int index)
{
double aiValue = GetAIValue(ioiP, DefualtSlaveID, index - 1);
return Math.Round(aiValue, 2);
}
public static double GetAIValue(string ioIP, byte slaveId, int index)
{
double value = 0;
try
{
lock (AIMapLock)
{
if (AIValueMap.ContainsKey(ioIP))
{
List<KNDAI> allIo = new List<KNDAI>(AIValueMap[ioIP]);
List<KNDAI> list = (from m in allIo where m.SlaveId.Equals(slaveId) && m.AIIndex.Equals(index) select m).ToList<KNDAI>();
if (list.Count > 0)
{
value = list[0].AIValue;
}
}
}
}
catch (Exception ex)
{
LogUtil.error("GetAIValue 出错了 :ioIP[" + ioIP + "]index[" + index + "]:" + ex);
}
return value;
}
private static void ClearAIData(string ioIp)
{
byte[] datas = new byte[32];
for (int i = 0; i < datas.Length; i++)
{
datas[i] = 0;
}
SaveAIData(ioIp, 3, datas);
}
private static void SaveAIData(string ioIp, ushort ID, byte[] values)
{
try
{
if (values.Length.Equals(DefaultAILength * 4))
{
List<KNDAI> kndList = new List<KNDAI>();
string strFromat = "{0:X2}";
string msg = "";
for (int index = 0; index < DefaultAILength; index++)
{
string str1 = String.Format(strFromat, values[index * 4 + 2]) + String.Format(strFromat, values[index * 4 + 3])
+ String.Format(strFromat, values[index * 4 + 1]) + String.Format(strFromat, values[index * 4]);
double value = BitToFloat(str1);
KNDAI io = new KNDAI(ioIp, (byte)DefualtSlaveID, index, value);
if (value > 0)
{
Console.WriteLine(str1 + " float convert = {0}", value);
}
msg += "【" + index + "=" + value + "】";
kndList.Add(io);
}
//LogUtil.info(msg);
lock (AIMapLock)
{
if (AIValueMap.ContainsKey(ioIp))
{
AIValueMap.Remove(ioIp);
}
AIValueMap.Add(ioIp, kndList);
}
try
{
if (StoreManager.Store != null && IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.HIGH))
{
if (StoreManager.Config.AIDI1_Addr > 0 && StoreManager.Config.AIDI2_Addr > 0)
{ //每次上传后验证下
int v1 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI1_Addr);
int v2 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI2_Addr);
if (v1.Equals(0) && v2.Equals(0))
{
LogUtil.info(msg);
string value = AcSerialBean.ByteToString(values);
LogUtil.error("收到【" + ioIp + "】的数据【" + value + "】,2个高度都为0");
// ConnectionIP(ioIp);
}
}
else if (StoreManager.Config.AIDI3_Addr > 0 && StoreManager.Config.AIDI4_Addr > 0)
{ //每次上传后验证下
int v1 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI3_Addr);
int v2 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI4_Addr);
if (v1.Equals(0) && v2.Equals(0))
{
LogUtil.info(msg);
string value = AcSerialBean.ByteToString(values);
LogUtil.error("收到【" + ioIp + "】的数据【" + value + "】,2个高度都为0");
// ConnectionIP(ioIp);
}
}
}
}
catch (Exception ex)
{
LogUtil.error("验证数据出错:" + ex.StackTrace);
}
}
}
catch (Exception ex)
{
LogUtil.error(LOGGER, "SaveAIData出错:" + ex.ToString());
}
}
private static float BitToFloat(string hexString)
{
uint num = uint.Parse(hexString, System.Globalization.NumberStyles.AllowHexSpecifier);
byte[] floatVals = BitConverter.GetBytes(num);
float f = BitConverter.ToSingle(floatVals, 0);
return f;
}
private static void MBmaster_OnResponseData(string ioIp, ushort ID, byte function, byte[] values, byte[] reviceData)
{
try
{
if (ioIp.IndexOf(":") > 0)
{
ioIp = ioIp.Substring(0, ioIp.IndexOf(":"));
}
string strFromat = "{0:X2}";
string reviceMsg = "";
foreach (byte data in reviceData)
{
reviceMsg = reviceMsg + " " + String.Format(strFromat, data);
if (reviceMsg.Length > 200)
{
break;
}
}
// LOGGER.Info ("Read data:【" + reviceMsg + "】 ");
if (ID == 0xFF)
{
return;
}
// ------------------------------------------------------------------------
// Identify requested data
ushort Func = ID;
if (Func == 0 && reviceData.Length > 8)
{
Func = reviceData[7];
}
byte SlaveId = 0xFF;
if (reviceData.Length >= 7)
{
SlaveId = reviceData[6];
}
switch (function)
{
case 1:
//LOGGER.Info("Read coils end:【" + reviceMsg + "】 ");
break;
case 2:
//LOGGER.Info("Read discrete inputs end:【" + reviceMsg + "】 ");
//SaveAIData(ioIp, SlaveId, values);
break;
case 3:
SaveAIData(ioIp, ID, values);
break;
case 4:
//LOGGER.Info("读入(多个)寄存器完成 end:【" + reviceMsg + "】 ");
break;
case 5:
//LOGGER.Info("Write single coil:【" + reviceMsg + "】 ");
break;
}
}
catch (Exception ex)
{
LogUtil.error(LOGGER, "处理接受数据出错:" + ex.ToString());
}
}
private static void MBmaster_OnException(string ioIp, ushort id, byte function, byte exception, byte[] reviceData)
{
string exc = "Modbus says error: ";
switch (exception)
{
case AITcpClient.excIllegalFunction: exc += "Illegal function!"; break;
case AITcpClient.excIllegalDataAdr: exc += "Illegal data adress!"; break;
case AITcpClient.excIllegalDataVal: exc += "Illegal data value!"; break;
case AITcpClient.excSlaveDeviceFailure: exc += "Slave device failure!"; break;
case AITcpClient.excAck: exc += "Acknoledge!"; break;
case AITcpClient.excSlaveIsBusy: exc += "Slave is busy!"; break;
case AITcpClient.excGatePathUnavailable: exc += "Gateway path unavailbale!"; break;
case AITcpClient.excExceptionTimeout: exc += "Slave timed out!"; break;
case AITcpClient.excExceptionConnectionLost: exc += "Connection is lost!"; break;
case AITcpClient.excExceptionNotConnected: exc += "Not connected!"; break;
default:
break;
}
LOGGER.Error("接收数据出错:" + exc);
}
}
public class KNDAI
{
public KNDAI(string ioIp, byte ID, int index, double value)
{
this.IoIP = ioIp;
this.SlaveId = ID;
this.AIIndex = index;
this.AIValue = value;
UpdateTime = DateTime.Now;
}
/// <summary>
/// AI模块IP
/// </summary>
public string IoIP { get; set; }
/// <summary>
/// 地址
/// </summary>
public byte SlaveId { get; set; }
/// <summary>
/// 第几个AI
/// </summary>
public int AIIndex { get; set; }
/// <summary>
/// 值
/// </summary>
public double AIValue { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime UpdateTime { get; set; }
}
}
using CodeLibrary;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.ExceptionServices;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary
{
public class CodeManager
{
public static List<string> codeTypeList = new List<string>();
public static List<string> balserNameList = new List<string>();
public static List<string> hikNameList = new List<string>();
private static char spiltChar = '#';
/// <summary>
/// 初始化摄像机名称和二维码类型
/// </summary>
public static void LoadConfig()
{
string codeStr = ConfigAppSettings.GetValue(Setting_Init.CodeType);
codeTypeList = new List<string>();
HDLogUtil.LogName = "RollingLogFileAppender";
try
{
string[] codeArray = codeStr.Split(spiltChar);
foreach (string str in codeArray)
{
if (str.Trim().Equals(""))
{
continue;
}
LogUtil.info("加载到配置二维码类型:" + str.Trim());
codeTypeList.Add(str.Trim());
}
LoadCamera(false);
CodeLibrary.HDCodeLearnHelper.LoadConfig("", codeStr);
}
catch (Exception ex)
{
LogUtil.error("解析摄像机配置出错:" + ex.StackTrace);
}
}
private static void LoadCamera(bool isReLoad)
{
if (isReLoad)
{
try
{
CodeLibrary.HIKCManager.Load();
}
catch (Exception ex)
{
LogUtil.error("加载HIK相机出错:" + ex.ToString());
}
try
{
CodeLibrary.BaslerCManager.Load();
}
catch (Exception ex)
{
LogUtil.error("加载Basler相机出错:" + ex.ToString());
}
}
string[] names = CodeLibrary.HIKCManager.CameraName;
if (names != null)
{
hikNameList.AddRange(names);
foreach (string name in hikNameList)
{
LogUtil.info("加载到HIK相机:" + name);
}
}
names = CodeLibrary.BaslerCManager.CameraName;
if (names != null)
{
balserNameList.AddRange(names);
foreach (string name in balserNameList)
{
LogUtil.info("加载到Balser相机:" + name);
}
}
}
public static void CloseCamera(string name)
{
//BaslerCamera.Instance.Close();
//HIKCamera.Instance.Close();
if (HIKCManager.CameraName.Contains(name))
{
HIKCManager.Close(name);
}
else
{
BaslerCManager.Close(name);
}
}
public static void CloseAllCamera()
{
HIKCManager.CloseAll();
BaslerCManager.CloseAll();
}
public static Bitmap GetCamerImage(string cameraName)
{
Bitmap bitm = null;
try
{
if (balserNameList.Contains(cameraName))
{
bool result = true;
if (!BaslerCManager.IsOpen(cameraName))
{
result = BaslerCManager.Open(cameraName);
}
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
if (result)
{
bitm= BaslerCManager.GrabOne(cameraName);
}
else
{
LogUtil.error("相机【" + cameraName + "】打开失败:" + BaslerCamera.Instance.ErrInfo);
}
}
else if (hikNameList.Contains(cameraName))
{
bool result = true;
if (!HIKCManager.IsOpen(cameraName))
{
result = HIKCManager.Open(cameraName);
}
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
if (result)
{
bitm = HIKCManager.GrabOne(cameraName);
}
else
{
LogUtil.error("相机【" + cameraName + "】打开失败:" + HIKCamera.Instance.ErrInfo);
}
}
else
{
LogUtil.info("未找到相机【" + cameraName + "】无法获取图片");
//若未加载到相机,需要重新加载相机
if (balserNameList.Count <= 0 && hikNameList.Count <= 0)
{
LogUtil.error("获取图片时发现未加载到相机,重新加载相机");
LoadCamera(true);
}
}
}
catch (Exception ex)
{
LogUtil.error("从相机【" + cameraName + "】获取图片出错:" + ex.ToString());
}
return bitm;
}
[HandleProcessCorruptedStateExceptions]
public static List<string> CameraScan(List<string> cameraNameList )
{
List<string> codeList = new List<string>();
try
{
List<Task<List<CodeInfo>>> taskList = new List<Task<List<CodeInfo>>>();
foreach (string cameraName in cameraNameList)
{
Task.Factory.StartNew(delegate ()
{
using (Bitmap bitmap = GetCamerImage(cameraName))
{
if (bitmap == null)
{
LogUtil.error(" 摄像机【" + cameraName + "】获取图片失败,关闭相机");
CloseCamera(cameraName);
return;
}
LogUtil.debug(" 摄像机【" + cameraName + "】获取图片完成");
System.Threading.Thread.Sleep(1);
HalconDotNet.HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap);
LogUtil.debug(" 摄像机【" + cameraName + "】转换图片完成,开始扫码");
List<CodeInfo> cc = new List<CodeInfo>();
foreach (string codeType in codeTypeList)
{
Task<List<CodeInfo>> typeDeCode = new Task<List<CodeInfo>>(delegate ()
{
return DeCode(ho_Image, codeType);
});
taskList.Add(typeDeCode);
typeDeCode.Start();
}
}
});
}
Task.WaitAll(taskList.ToArray());
foreach (Task<List<CodeInfo>> t in taskList)
{
List<CodeInfo> cc = t.Result;
if (cc.Count > 0)
{
string r = "";
foreach (CodeInfo c in cc)
{
codeList.Add(c.CodeStr);
r = r + "##" + c.CodeStr;
}
}
}
}
catch (AccessViolationException e)
{
LogUtil.error("扫码出现AccessViolationException异常:" + e.ToString());
GC.Collect();
}
catch (Exception ex)
{
LogUtil.error("扫码出错:" + ex.ToString());
}
return codeList;
}
private static List<CodeInfo> DeCode(HalconDotNet.HObject ho_Image,string codeType)
{
List<CodeInfo> cc = new List<CodeInfo>();
//判断是否是一维码
if (codeType.ToLower().Equals("barcode"))
{
cc = HDCodeHelper.DecodeBarCode(ho_Image);
}
else
{
cc = HDCodeHelper.DecodeCode(ho_Image, 1, GetCodeParamFilePath(codeType), codeType);
}
//if (cc.Count > 0)
//{
// string r = "";
// foreach (CodeInfo c in cc)
// {
// codeList.Add(c.CodeStr);
// r = r + "##" + c.CodeStr;
// }
// LogUtil.debug(" 【" + cameraName + "】【" + codeType + "】扫码完成:" + r);
//}
return cc;
}
public static string GetCodeParamFilePath(string codePath)
{
string appPath = Application.StartupPath;
string path = appPath + ConfigAppSettings.GetValue(Setting_Init.CodeParamPath);
string filePath = path + codePath + ".dcm";
if (File.Exists(filePath))
{
return filePath;
}
else
{
return "";
}
}
/// <summary>
/// 处理接收后的二维码
/// </summary>
/// <param name="message"></param>
/// <returns></returns>
private static string ReplaceCode(string message)
{
message = message.Trim();
message = message.Replace("\r", "");
message = message.Replace("\n", "");
char a = (char)02;
message = message.Replace(a.ToString(), "");
message = message.Trim();
System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
byte[] bytes = asciiEncoding.GetBytes(message);
List<byte> newBytes = new List<byte>();
foreach (byte by in bytes)
{
if (!by.Equals(24))
{
newBytes.Add(by);
}
}
message = asciiEncoding.GetString(newBytes.ToArray());
return message;
}
public static string ProcessCode(List<string> codeList)
{
string code = "";
foreach (string cc in codeList)
{
if (string.IsNullOrEmpty(cc))
{
continue;
}
code += cc + "##";
}
return ReplaceCode(code);
}
}
}
using CodeLibrary;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.ExceptionServices;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary
{
public class CodeManager
{
public static List<string> codeTypeList = new List<string>();
public static List<string> balserNameList = new List<string>();
public static List<string> hikNameList = new List<string>();
private static char spiltChar = '#';
/// <summary>
/// 初始化摄像机名称和二维码类型
/// </summary>
public static void LoadConfig()
{
string codeStr = ConfigAppSettings.GetValue(Setting_Init.CodeType);
codeTypeList = new List<string>();
HDLogUtil.LogName = "RollingLogFileAppender";
try
{
string[] codeArray = codeStr.Split(spiltChar);
foreach (string str in codeArray)
{
if (str.Trim().Equals(""))
{
continue;
}
LogUtil.info("加载到配置二维码类型:" + str.Trim());
codeTypeList.Add(str.Trim());
}
LoadCamera(false);
CodeLibrary.HDCodeLearnHelper.LoadConfig("", codeStr);
}
catch (Exception ex)
{
LogUtil.error("解析摄像机配置出错:", ex);
}
}
private static void LoadCamera(bool isReLoad)
{
if (isReLoad)
{
try
{
CodeLibrary.HIKCamera.Instance.Load();
}
catch (Exception ex)
{
LogUtil.error("加载HIK相机出错:", ex);
}
try
{
CodeLibrary.BaslerCamera.Instance.Load();
}
catch (Exception ex)
{
LogUtil.error("加载Basler相机出错:", ex);
}
}
string[] names = CodeLibrary.HIKCamera.Instance.CameraName;
if (names != null)
{
foreach (string n in names)
{
if (!hikNameList.Contains(n))
{
hikNameList.Add(n);
}
}
// hikNameList.AddRange(names);
foreach (string name in hikNameList)
{
LogUtil.info("加载到HIK相机:" + name);
}
}
names = CodeLibrary.BaslerCamera.Instance.CameraName;
if (names != null)
{
foreach (string n in names)
{
if (!balserNameList.Contains(n))
{
balserNameList.Add(n);
}
}
// balserNameList.AddRange(names);
foreach (string name in balserNameList)
{
LogUtil.info("加载到Balser相机:" + name);
}
}
}
public static void CloseCamera()
{
BaslerCamera.Instance.Close();
HIKCamera.Instance.Close();
}
public static Bitmap GetCamerImage(string cameraName)
{
Bitmap bitm = null;
try
{
if (balserNameList.Contains(cameraName))
{
bool result = BaslerCamera.Instance.Open(cameraName);
LogUtil.info("相机【" + cameraName + "】打开:" + result + "");
if (result)
{
BaslerCamera.Instance.GrabOne();
bitm = BaslerCamera.Instance.Image;
BaslerCamera.Instance.Close();
}
else
{
LogUtil.error("相机【" + cameraName + "】打开失败:" + BaslerCamera.Instance.ErrInfo);
}
}
else if (hikNameList.Contains(cameraName))
{
bool result = HIKCamera.Instance.Open(cameraName);
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
if (result)
{
HIKCamera.Instance.GrabOne();
bitm = HIKCamera.Instance.Image;
HIKCamera.Instance.Close();
}
else
{
LogUtil.error("相机【" + cameraName + "】打开失败:" + HIKCamera.Instance.ErrInfo);
}
}
else
{
LogUtil.info("未找到相机【" + cameraName + "】无法获取图片");
//若未加载到相机,需要重新加载相机
if (balserNameList.Count <= 0 && hikNameList.Count <= 0)
{
LogUtil.error("获取图片时发现未加载到相机,重新加载相机");
LoadCamera(true);
}
}
}
catch (Exception ex)
{
LogUtil.error("从相机【" + cameraName + "】获取图片出错:", ex);
}
return bitm;
}
private static int codeCount = ConfigAppSettings.GetIntValue(Setting_Init.CodeCount);
[HandleProcessCorruptedStateExceptions]
public static List<string> CameraScan(List<string> cameraList, string deviceName,bool isSaveImg=false)
{
if (codeCount < 1)
{
codeCount = 1;
}
List<string> codeList = new List<string>();
if (cameraList == null || cameraList.Count <= 0)
{
return codeList;
}
try
{
foreach (string cameraName in cameraList)
{
if (cameraName.Trim().Equals(""))
{
continue;
}
LogUtil.info(deviceName + " 【" + cameraName + "】开始打开相机获取图片");
using (Bitmap bitmap = GetCamerImage(cameraName))
{
if (bitmap == null)
{
LogUtil.error(deviceName + " 【" + cameraName + "】获取图片失败,关闭相机");
CloseCamera();
continue;
}
if (isSaveImg)
{
SaveImageToFile(deviceName, cameraName, bitmap);
}
LogUtil.info(deviceName + " 【" + cameraName + "】获取图片完成,开始转换图片,并扫码");
System.Threading.Thread.Sleep(1);
//转换托盘大概100-150ms,不打印日志
HalconDotNet.HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap);
// LogUtil.info(" 相机【" + cameraName + "】转换图片完成,开始扫码");
List<CodeInfo> cc = new List<CodeInfo>();
string r = "";
foreach (string codeType in codeTypeList)
{
//判断是否是一维码
if (codeType.ToLower().Equals("barcode"))
{
cc = HDCodeHelper.DecodeBarCode(ho_Image);
}
else
{
cc = HDCodeHelper.DecodeCode(ho_Image, codeCount, GetCodeParamFilePath(codeType), codeType);
}
foreach (CodeInfo c in cc)
{
string str = CodeManager.ReplaceCode(c.CodeStr);
codeList.Add(str);
r = r + "##" + str;
}
// LogUtil.debug(" 相机【" + cameraName + "】【" + codeType + "】扫码完成:" + r);
}
LogUtil.info(deviceName + " 【" + cameraName + "】扫码完成:" + r);
ho_Image.Dispose();
bitmap.Dispose();
}
}
}
catch (AccessViolationException e)
{
LogUtil.error(deviceName + " 扫码出现AccessViolationException异常:" + e.ToString());
GC.Collect();
}
catch (Exception ex)
{
LogUtil.error(deviceName + " 扫码出错:", ex);
}
return codeList;
}
private static void SaveImageToFile(string deviceName, string cameraName, Bitmap bitmap)
{
string date = DateTime.Now.ToString("HH-mm-ss-") + DateTime.Now.Millisecond;
string dire = @"D:\image\" + deviceName.Trim().Replace('_','-') + @"\" + cameraName.Trim().Replace('_','-').Replace(':','-') + @"\";
string iamgeName = date + ".bng";
try
{
if (Directory.Exists(dire).Equals(false))
{
Directory.CreateDirectory(dire);
}
bitmap.Save(dire + iamgeName);
}
catch (Exception ex)
{
LogUtil.error("保存" + deviceName + " 【" + cameraName + "】的图片到【" + dire + iamgeName + "】出错", ex);
}
}
public static string GetCodeParamFilePath(string codePath)
{
string appPath = Application.StartupPath;
string path = appPath + ConfigAppSettings.GetValue(Setting_Init.CodeParamPath);
string filePath = path + codePath + ".dcm";
if (File.Exists(filePath))
{
return filePath;
}
else
{
return "";
}
}
/// <summary>
/// 处理接收后的二维码
/// </summary>
/// <param name="message"></param>
/// <returns></returns>
public static string ReplaceCode(string message)
{
message = message.Trim();
message = message.Replace("\r", "");
message = message.Replace("\n", "");
char a = (char)02;
message = message.Replace(a.ToString(), "");
message = message.Trim();
System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
byte[] bytes = asciiEncoding.GetBytes(message);
List<byte> newBytes = new List<byte>();
foreach (byte by in bytes)
{
int value = (int)by;
if (value.Equals(24) || value.Equals(30) || value.Equals(29) || value.Equals(4))
{
continue;
}
if (!value.Equals(24))
{
newBytes.Add(by);
}
}
message = asciiEncoding.GetString(newBytes.ToArray());
return message;
}
public static string ProcessCode(List<string> codeList)
{
string code = "";
foreach (string cc in codeList)
{
if (string.IsNullOrEmpty(cc))
{
continue;
}
code += cc + "##";
}
return ReplaceCode(code);
}
}
}
......@@ -39,11 +39,7 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
/// <summary>
/// 移栽装置拦截托盘时, 判断是否可以入库,入库执行可以入库,出库过程中不能入库
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public static bool BoxCanInStore(int id)
{
BoxInfo box = GetBoxInfo(id);
......@@ -147,43 +143,10 @@ namespace OnlineStore.DeviceLibrary
int num = equipId % 100;
string result = "";
List<int> IdList = new List<int>();
if (num.Equals(3))
{
for (int i = 7; i <= 12; i++)
{
IdList.Add(i);
}
for (int i = 24; i >= 13; i--)
{
IdList.Add(i);
}
for (int i = 1; i <= 6; i++)
{
IdList.Add(i);
}
}
else if (num.Equals(5))
{
for (int i = 24; i >= 13; i--)
{
IdList.Add(i);
}
for (int i = 1; i <= 12; i++)
{
IdList.Add(i);
}
}
else
{
for (int i = 1; i <= 12; i++)
{
IdList.Add(i);
}
for (int i = 24; i >= 13; i--)
for(int i = 1; i <= 6; i++)
{
IdList.Add(i);
}
}
foreach (int id in IdList)
{
BoxInfo box = GetBoxInfo(id);
......@@ -192,6 +155,9 @@ namespace OnlineStore.DeviceLibrary
TimeSpan span = DateTime.Now - box.LastMsgTime;
if (span.TotalSeconds < ClientKeepSecond)
{
LineStatus status = (LineStatus)box.SStatus;
if ((!status.Equals(LineStatus.Debugging)) && (!status.Equals(LineStatus.SuddenStop)))
{
if (LineManager.Line.CanIntore(box.ID))
{
result += box.CId + ",";
......@@ -199,6 +165,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
if (result.EndsWith(","))
{
result = result.Substring(0, result.Length - 1);
......@@ -274,6 +241,7 @@ namespace OnlineStore.DeviceLibrary
paramList.Add(S_PlateW, param.PlateW);
paramList.Add(S_WareCode, param.WareCode);
paramList.Add(S_RFID, param.rfid);
paramList.Add(S_NG, param.InStoreNg);
string msg = ToParamStr(paramList);
TcpClientBean client = ClientMap[id];
......@@ -293,22 +261,7 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
///// <summary>
///// 获取整个料仓的状态
///// </summary>
//public static Operation GetInStoreOperation(string message)
//{
// //构建发送给服务器的对象
// Operation lineOperation = new Operation();
// lineOperation.status = 1;
// lineOperation.seq = ConfigAppSettings.nextSeq();
// lineOperation.boxStatus = new Dictionary<int, BoxStatus>();
// lineOperation.alarmList = new List<AlarmInfo>();
// lineOperation.cid = LineServer.GetAllCID();
// lineOperation.op = 1;
// lineOperation.data = new Dictionary<string, string>() { { "code", message } };
// return lineOperation;
//}
public static bool CheckInStorePos(int id, InOutParam param)
{
......@@ -479,6 +432,7 @@ namespace OnlineStore.DeviceLibrary
public static string S_WareCode = "WareCode";
public static string S_IsDebug = "IsDebug";
public static string S_RFID = "rfid";
public static string S_NG = "rfid";
}
public class StoreReviceBean
......
......@@ -83,7 +83,7 @@ namespace OnlineStore.LoadCSVLibrary
public virtual void LoadConfig(List<ConfigBase> configList)
{
List<string> ioTypeList = IO_Type.GetTypeList();
ioTypeList = new List<string>();
// ioTypeList = new List<string>();
StringBuilder builder = new StringBuilder("\r\n");
StringBuilder proBuilder = new StringBuilder("\r\n");
DIList = new Dictionary<string, ConfigIO>();
......
......@@ -165,7 +165,21 @@ namespace OnlineStore.LoadCSVLibrary
public string UpDownP2DetialList { get; set; }
private Dictionary<string, int> UpdownP2DetialMap = null;
public void ConfigSpeed(Line_Config config)
{
if (this.UpdownAxis_P1Speed <= 0)
{
this.UpdownAxis_P1Speed = config.UpdownAxis_P1Speed;
}
if (this.UpdownAxis_P2Speed <= 0)
{
this.UpdownAxis_P2Speed = config.UpdownAxis_P2Speed;
}
if (this.UpdownAxis_P3Speed <= 0)
{
this.UpdownAxis_P3Speed = config.UpdownAxis_P3Speed;
}
}
public Dictionary<string, int> LoadP2DetialMap()
{
try
......
......@@ -189,7 +189,21 @@ namespace OnlineStore.LoadCSVLibrary
public string UpDownP2DetialList { get; set; }
private Dictionary<string, int> UpdownP2DetialMap = null;
public void ConfigSpeed(Line_Config config)
{
if (this.UpdownAxis_P1Speed <= 0)
{
this.UpdownAxis_P1Speed = config.UpdownAxis_P1Speed;
}
if (this.UpdownAxis_P2Speed <= 0)
{
this.UpdownAxis_P2Speed = config.UpdownAxis_P2Speed;
}
if (this.UpdownAxis_P3Speed <= 0)
{
this.UpdownAxis_P3Speed = config.UpdownAxis_P3Speed;
}
}
public Dictionary<string, int> LoadP2DetialMap()
{
try
......
......@@ -35,976 +35,309 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
public static string Reset_BTN = "Reset_BTN";
/// <summary>
/// DI,0,气压检测1,Airpressure_Check,2,HC,X02
/// DI,0,气压检测,Airpressure_Check,2,HC,X02
/// </summary>
public static string Airpressure_Check = "Airpressure_Check";
/// <summary>
/// DI,217,C7-HY17前阻挡托盘检测,HY_FrontStopCheck,3,HC,X03
/// DI,205,D7阻挡1托盘检测,HY_FrontStopCheck,3,HC,X03
/// </summary>
public static string HY_FrontStopCheck = "HY_FrontStopCheck";
/// <summary>
/// DI,217,HY17横移托盘检测,HY_TrayCheck,4,HC,X04
/// DI,205,D7阻挡2托盘检测,HY_TrayCheck,4,HC,X04
/// </summary>
public static string HY_TrayCheck = "HY_TrayCheck";
/// <summary>
/// DI,217,HY17横移顶升上升端,HY_TopCylinder_Up,5,HC,X05
/// DI,205,D7顶升上升端,HY_TopCylinder_Up,5,HC,X05
/// </summary>
public static string HY_TopCylinder_Up = "HY_TopCylinder_Up";
/// <summary>
/// DI,217,HY17横移顶升下降端,HY_TopCylinder_Down,6,HC,X06
/// DI,205,D7顶升上升端,HY_TopCylinder_Down,6,HC,X06
/// </summary>
public static string HY_TopCylinder_Down = "HY_TopCylinder_Down";
/// <summary>
/// DI,217,HY17横移定位1上升端,HY_LocationCylinder_Up1,7,HC,X07
/// </summary>
public static string HY_LocationCylinder_Up1 = "HY_LocationCylinder_Up1";
/// <summary>
/// DI,217,HY17横移定位1下降端,HY_LocationCylinder_Down1,8,HC,X08
/// </summary>
public static string HY_LocationCylinder_Down1 = "HY_LocationCylinder_Down1";
/// <summary>
/// DI,217,HY17横移定位2上升端,HY_LocationCylinder_Up2,9,HC,X09
/// </summary>
public static string HY_LocationCylinder_Up2 = "HY_LocationCylinder_Up2";
/// <summary>
/// DI,217,HY17横移定位2下降端,HY_LocationCylinder_Down2,10,HC,X10
/// </summary>
public static string HY_LocationCylinder_Down2 = "HY_LocationCylinder_Down2";
/// <summary>
/// DI,217,HY17接驳台气缸取料端,HY_MoveCylinder_Take,11,HC,X11
/// DI,205,D7横移前进端,HY_MoveCylinder_Take,7,HC,X07
/// </summary>
public static string HY_MoveCylinder_Take = "HY_MoveCylinder_Take";
/// <summary>
/// DI,217,HY17接驳台气缸放料端,HY_MoveCylinder_Give,12,HC,X12
/// DI,205,D7横移后退端,HY_MoveCylinder_Give,8,HC,X08
/// </summary>
public static string HY_MoveCylinder_Give = "HY_MoveCylinder_Give";
/// <summary>
/// DI,217,HY17夹料气缸料盘检测,HY_ClampCylinder_Check,13,HC,X13
/// </summary>
public static string HY_ClampCylinder_Check = "HY_ClampCylinder_Check";
/// <summary>
/// DI,217,HY17夹料气缸放松端,HY_ClampCylinder_Relax,14,HC,X14
/// </summary>
public static string HY_ClampCylinder_Relax = "HY_ClampCylinder_Relax";
/// <summary>
/// DO,0,待机状态(指示灯),AutoRun_HddLed,0,HC,Y00
/// </summary>
public static string AutoRun_HddLed = "AutoRun_HddLed";
/// <summary>
/// DO,0,运行状态(指示灯),RunSign_HddLed,1,HC,Y01
/// </summary>
public static string RunSign_HddLed = "RunSign_HddLed";
/// <summary>
/// DO,0,故障状态(指示灯),Alarm_HddLed,2,HC,Y02
/// </summary>
public static string Alarm_HddLed = "Alarm_HddLed";
/// <summary>
/// DO,0,故障状态(蜂鸣器),Alarm_Buzzer,3,HC,Y03
/// </summary>
public static string Alarm_Buzzer = "Alarm_Buzzer";
/// <summary>
/// DO,0,C6/C7/C9线体运转,MotorRun_679,4,HC,Y04
/// DI,202,HY2横移定位1上升端,HY_LocationCylinder_Up1,16,HC,X16
/// </summary>
public static string MotorRun_679 = "MotorRun_679";
/// <summary>
/// DO,217,HY17横移电机正转,HY_LineRun,5,HC,Y05
/// </summary>
public static string HY_LineRun = "HY_LineRun";
/// <summary>
/// DO,217,HY17前阻挡下降,HY_FrontStopDown,6,HC,Y06
/// </summary>
public static string HY_FrontStopDown = "HY_FrontStopDown";
public static string HY_LocationCylinder_Up1 = "HY_LocationCylinder_Up1";
/// <summary>
/// DO,217,HY17横移定位上升,HY_LocationCylinder_Up,9,HC,Y09
/// DI,202,HY2横移定位1下降端,HY_LocationCylinder_Down1,17,HC,X17
/// </summary>
public static string HY_LocationCylinder_Up = "HY_LocationCylinder_Up";
public static string HY_LocationCylinder_Down1 = "HY_LocationCylinder_Down1";
/// <summary>
/// DO,217,HY17横移定位下降,HY_LocationCylinder_Down,10,HC,Y10
/// DI,202,HY2横移定位2上升端,HY_LocationCylinder_Up2,18,HC,X18
/// </summary>
public static string HY_LocationCylinder_Down = "HY_LocationCylinder_Down";
public static string HY_LocationCylinder_Up2 = "HY_LocationCylinder_Up2";
/// <summary>
/// DO,217,HY17夹料气缸夹紧,HY_ClampCylinder_Work,13,HC,Y13
/// DI,202,HY2横移定位2下降端,HY_LocationCylinder_Down2,19,HC,X19
/// </summary>
public static string HY_ClampCylinder_Work = "HY_ClampCylinder_Work";
public static string HY_LocationCylinder_Down2 = "HY_LocationCylinder_Down2";
/// <summary>
/// DI,22,D11-1阻挡1托盘检测,StopCheck1,16,HC,X16
/// DI,1,D1阻挡1托盘检测,StopCheck1,20,HC,X20
/// </summary>
public static string StopCheck1 = "StopCheck1";
/// <summary>
/// DI,22,D11-1阻挡2托盘检测,StopCheck2,17,HC,X17
/// DI,1,D1阻挡2托盘检测,StopCheck2,21,HC,X21
/// </summary>
public static string StopCheck2 = "StopCheck2";
/// <summary>
/// DI,22,D11-1顶升上升端,TopCylinder_Up,18,HC,X18
/// DI,1,D1顶升上升端,TopCylinder_Up,22,HC,X22
/// </summary>
public static string TopCylinder_Up = "TopCylinder_Up";
/// <summary>
/// DI,22,D11-1顶升下降端,TopCylinder_Down,19,HC,X19
/// DI,1,D1顶升下降端,TopCylinder_Down,23,HC,X23
/// </summary>
public static string TopCylinder_Down = "TopCylinder_Down";
/// <summary>
/// DI,22,D11-1横移前进端,BeforeAfterCylinder_Before,20,HC,X20
/// DI,1,D1横移前进端,BeforeAfterCylinder_Before,24,HC,X24
/// </summary>
public static string BeforeAfterCylinder_Before = "BeforeAfterCylinder_Before";
/// <summary>
/// DI,22,D11-1横移后退端,BeforeAfterCylinder_After,21,HC,X21
/// DI,1,D1横移后退端,BeforeAfterCylinder_After,25,HC,X25
/// </summary>
public static string BeforeAfterCylinder_After = "BeforeAfterCylinder_After";
/// <summary>
/// DI,22,D11-1夹料气缸料盘检测,ClampCylinder_Check,22,HC,X22
/// </summary>
public static string ClampCylinder_Check = "ClampCylinder_Check";
/// <summary>
/// DI,22,D11-1夹料放松端,ClampCylinder_Relax,23,HC,X23
/// </summary>
public static string ClampCylinder_Relax = "ClampCylinder_Relax";
/// <summary>
/// DI,22,D11-1升降上升端,UpDownCylinder_Up,24,HC,X24
/// DI,1,D1升降上升端,UpDownCylinder_Up,26,HC,X26
/// </summary>
public static string UpDownCylinder_Up = "UpDownCylinder_Up";
/// <summary>
/// DI,22,D11-1升降下降端,UpDownCylinder_Down,25,HC,X25
/// DI,1,D1升降下降端,UpDownCylinder_Down,27,HC,X27
/// </summary>
public static string UpDownCylinder_Down = "UpDownCylinder_Down";
/// <summary>
/// DI,216,HY16-C7阻挡上升端,HY_OL_StopCylinder_Up,56,HC,X56
/// </summary>
public static string HY_OL_StopCylinder_Up = "HY_OL_StopCylinder_Up";
/// <summary>
/// DI,216,HY16-C7阻挡下降端,HY_OL_StopCylinder_Down,57,HC,X57
/// </summary>
public static string HY_OL_StopCylinder_Down = "HY_OL_StopCylinder_Down";
/// <summary>
/// DI,217,C7-HY17满料检测,HY_OL_Full_Check,58,HC,X58
/// </summary>
public static string HY_OL_Full_Check = "HY_OL_Full_Check";
/// <summary>
/// DO,22,D11-1阻挡1下降,StopDown1,16,HC,Y16
/// </summary>
public static string StopDown1 = "StopDown1";
/// <summary>
/// DO,22,D11-1阻挡2下降,StopDown2,17,HC,Y17
/// </summary>
public static string StopDown2 = "StopDown2";
/// <summary>
/// DO,22,D11-1夹料夹紧,ClampCylinder_Work,22,HC,Y22
/// </summary>
public static string ClampCylinder_Work = "ClampCylinder_Work";
/// <summary>
/// DO,216,HY16阻挡下降,HY_StopDown,56,HC,Y56
/// </summary>
public static string HY_StopDown = "HY_StopDown";
/// <summary>
/// DO,0,C1线体电机1/2/3启动,MotorRun_C1_123,59,HC,Y59
/// </summary>
public static string MotorRun_C1_123 = "MotorRun_C1_123";
/// <summary>
/// DI,105,T5急停,SL_SuddenStop_BTN,64,HC,X64
/// DI,101,T1急停,SL_SuddenStop_BTN,80,HC,X80
/// </summary>
public static string SL_SuddenStop_BTN = "SL_SuddenStop_BTN";
/// <summary>
/// DI,105,T5复位,SL_Reset_BTN,65,HC,X65
/// DI,101,T1复位,SL_Reset_BTN,81,HC,X81
/// </summary>
public static string SL_Reset_BTN = "SL_Reset_BTN";
/// <summary>
/// DI,105,T5入口检测,SL_Entry_Check,66,HC,X66
/// DI,101,T1入口检测,SL_Entry_Check,82,HC,X82
/// </summary>
public static string SL_Entry_Check = "SL_Entry_Check";
/// <summary>
/// DI,105,T5阻挡检测,SL_Stop_Check,67,HC,X67
/// DI,101,T1阻挡检测,SL_Stop_Check,83,HC,X83
/// </summary>
public static string SL_Stop_Check = "SL_Stop_Check";
/// <summary>
/// DI,105,T5定位工位检测,SL_Location_Check,68,HC,X68
/// DI,101,T1定位工位检测,SL_Location_Check,84,HC,X84
/// </summary>
public static string SL_Location_Check = "SL_Location_Check";
/// <summary>
/// DI,105,T5定位气缸1上升端,SL_LocationCylinder_Up1,69,HC,X69
/// DI,101,T1定位气缸1上升端,SL_LocationCylinder_Up1,85,HC,X85
/// </summary>
public static string SL_LocationCylinder_Up1 = "SL_LocationCylinder_Up1";
/// <summary>
/// DI,105,T5定位气缸1下降端,SL_LocationCylinder_Down1,70,HC,X70
/// DI,101,T1定位气缸1下降端,SL_LocationCylinder_Down1,86,HC,X86
/// </summary>
public static string SL_LocationCylinder_Down1 = "SL_LocationCylinder_Down1";
/// <summary>
/// DI,105,T5定位气缸2上升端,SL_LocationCylinder_Up2,71,HC,X71
/// DI,101,T1定位气缸2上升端,SL_LocationCylinder_Up2,87,HC,X87
/// </summary>
public static string SL_LocationCylinder_Up2 = "SL_LocationCylinder_Up2";
/// <summary>
/// DI,105,T5定位气缸2下降端,SL_LocationCylinder_Down2,72,HC,X72
/// DI,101,T1定位气缸2下降端,SL_LocationCylinder_Down2,88,HC,X88
/// </summary>
public static string SL_LocationCylinder_Down2 = "SL_LocationCylinder_Down2";
/// <summary>
/// DI,105,T5固定气缸1上升端,SL_FixedCylinder_Up1,73,HC,X73
/// DI,101,T1固定气缸1上升端,SL_FixedCylinder_Up1,89,HC,X89
/// </summary>
public static string SL_FixedCylinder_Up1 = "SL_FixedCylinder_Up1";
/// <summary>
/// DI,105,T5固定气缸2上升端,SL_FixedCylinder_Up2,74,HC,X74
/// DI,101,T1固定气缸2上升端,SL_FixedCylinder_Up2,90,HC,X90
/// </summary>
public static string SL_FixedCylinder_Up2 = "SL_FixedCylinder_Up2";
/// <summary>
/// DI,105,T5定位工位顶升上升端,SL_TopCylinder_Up,75,HC,X75
/// DI,101,T1定位工位顶升上升端,SL_TopCylinder_Up,91,HC,X91
/// </summary>
public static string SL_TopCylinder_Up = "SL_TopCylinder_Up";
/// <summary>
/// DI,105,T5定位工位顶升下降端,SL_TopCylinder_Down,76,HC,X76
/// DI,101,T1定位工位顶升下降端,SL_TopCylinder_Down,92,HC,X92
/// </summary>
public static string SL_TopCylinder_Down = "SL_TopCylinder_Down";
/// <summary>
/// DI,105,T5出口顶升上升端,SL_OutTopCylinder_Up,77,HC,X77
/// DI,101,T1出口顶升上升端,SL_OutTopCylinder_Up,93,HC,X93
/// </summary>
public static string SL_OutTopCylinder_Up = "SL_OutTopCylinder_Up";
/// <summary>
/// DI,105,T5出口顶升下降端,SL_OutTopCylinder_Down,78,HC,X78
/// DI,101,T1出口顶升下降端,SL_OutTopCylinder_Down,94,HC,X94
/// </summary>
public static string SL_OutTopCylinder_Down = "SL_OutTopCylinder_Down";
/// <summary>
/// DI,105,T5出口横移检测,SL_Out_Check,79,HC,X79
/// DI,101,T1出口检测,SL_Out_Check,95,HC,X95
/// </summary>
public static string SL_Out_Check = "SL_Out_Check";
/// <summary>
/// DI,105,T5托盘定位气缸1前进端,SL_TrayLocation1_Before,80,HC,X80
/// DI,101,T1托盘定位气缸1前进端,SL_TrayLocation1_Before,96,HC,X96
/// </summary>
public static string SL_TrayLocation1_Before = "SL_TrayLocation1_Before";
/// <summary>
/// DI,105,T5托盘定位气缸1后退端,SL_TrayLocation1_After,81,HC,X81
/// DI,101,T1托盘定位气缸1后退端,SL_TrayLocation1_After,97,HC,X97
/// </summary>
public static string SL_TrayLocation1_After = "SL_TrayLocation1_After";
/// <summary>
/// DI,105,T5托盘定位气缸2前进端,SL_TrayLocation2_Before,82,HC,X82
/// DI,101,T1托盘定位气缸2前进端,SL_TrayLocation2_Before,98,HC,X98
/// </summary>
public static string SL_TrayLocation2_Before = "SL_TrayLocation2_Before";
/// <summary>
/// DI,105,T5托盘定位气缸2后退端,SL_TrayLocation2_After,83,HC,X83
/// DI,101,T1托盘定位气缸2后退端,SL_TrayLocation2_After,99,HC,X99
/// </summary>
public static string SL_TrayLocation2_After = "SL_TrayLocation2_After";
/// <summary>
/// DI,105,T5料盘检测7寸,SL_TrayCheck1,84,HC,X84
/// DI,101,T1料盘检测7寸,SL_TrayCheck1,100,HC,X100
/// </summary>
public static string SL_TrayCheck1 = "SL_TrayCheck1";
/// <summary>
/// DI,105,T5料盘检测11寸,SL_TrayCheck2,85,HC,X85
/// DI,101,T1料盘检测11寸,SL_TrayCheck2,101,HC,X101
/// </summary>
public static string SL_TrayCheck2 = "SL_TrayCheck2";
/// <summary>
/// DI,105,T5料盘检测13寸,SL_TrayCheck3,86,HC,X86
/// DI,101,T1料盘检测13寸,SL_TrayCheck3,102,HC,X102
/// </summary>
public static string SL_TrayCheck3 = "SL_TrayCheck3";
/// <summary>
/// DI,105,T5料盘检测15寸,SL_TrayCheck4,87,HC,X87
/// DI,101,T1料盘检测15寸,SL_TrayCheck4,103,HC,X103
/// </summary>
public static string SL_TrayCheck4 = "SL_TrayCheck4";
/// <summary>
/// DI,105,T5伺服定位料盘检测,SL_AxisLocationCheck,88,HC,X88
/// DI,101,T1伺服定位料盘检测,SL_AxisLocationCheck,104,HC,X104
/// </summary>
public static string SL_AxisLocationCheck = "SL_AxisLocationCheck";
/// <summary>
/// DI,105,T5上料横移气缸取料端,SL_MoveCylinder_Take,89,HC,X89
/// DI,101,T1上料横移气缸取料端,SL_MoveCylinder_Take,105,HC,X105
/// </summary>
public static string SL_MoveCylinder_Take = "SL_MoveCylinder_Take";
/// <summary>
/// DI,105,T5上料横移气缸放料端,SL_MoveCylinder_Give,90,HC,X90
/// DI,101,T1上料横移气缸放料端,SL_MoveCylinder_Give,106,HC,X106
/// </summary>
public static string SL_MoveCylinder_Give = "SL_MoveCylinder_Give";
/// <summary>
/// DI,105,T5上料气缸放松端,SL_ClampCylinder_Relax,91,HC,X91
/// </summary>
public static string SL_ClampCylinder_Relax = "SL_ClampCylinder_Relax";
/// <summary>
/// DI,105,T5上料气缸料盘检测,SL_ClampCylinder_Check,92,HC,X92
/// DO,0,待机状态(指示灯),AutoRun_HddLed,0,HC,Y00
/// </summary>
public static string SL_ClampCylinder_Check = "SL_ClampCylinder_Check";
public static string AutoRun_HddLed = "AutoRun_HddLed";
/// <summary>
/// DO,105,T5运行指示灯,SL_HddLed,64,HC,Y64
/// DO,0,运行状态(指示灯),RunSign_HddLed,1,HC,Y01
/// </summary>
public static string SL_HddLed = "SL_HddLed";
public static string RunSign_HddLed = "RunSign_HddLed";
/// <summary>
/// DO,105,T5故障指示灯,SL_AlarmLed,65,HC,Y65
/// DO,0,故障状态(指示灯),Alarm_HddLed,2,HC,Y02
/// </summary>
public static string SL_AlarmLed = "SL_AlarmLed";
public static string Alarm_HddLed = "Alarm_HddLed";
/// <summary>
/// DO,105,T5进料线体运转,SL_Line_Run,66,HC,Y66
/// DO,0,故障状态(蜂鸣器),Alarm_Buzzer,3,HC,Y03
/// </summary>
public static string SL_Line_Run = "SL_Line_Run";
public static string Alarm_Buzzer = "Alarm_Buzzer";
/// <summary>
/// DO,105,T5线体定位横移电机运转,SL_LocationSideWay_Run,67,HC,Y67
/// DO,201,HY1横移电机正转,HY_LineRun,4,HC,Y04
/// </summary>
public static string SL_LocationSideWay_Run = "SL_LocationSideWay_Run";
public static string HY_LineRun = "HY_LineRun";
/// <summary>
/// DO,105,T5线体出口横移电机运转,SL_OutSideWay_Run,68,HC,Y68
/// DO,0,C1线体运转,MotorRun_C1,8,HC,Y08
/// </summary>
public static string SL_OutSideWay_Run = "SL_OutSideWay_Run";
public static string MotorRun_C1 = "MotorRun_C1";
/// <summary>
/// DO,105,T5进料阻挡下降,SL_Entry_StopDown,71,HC,Y71
/// DO,205,D7阻挡1下降,HY_FrontStopDown,9,HC,Y09
/// </summary>
public static string SL_Entry_StopDown = "SL_Entry_StopDown";
public static string HY_FrontStopDown = "HY_FrontStopDown";
/// <summary>
/// DO,105,T5定位工位缓冲阻挡,SL_Buffer_StopDown,72,HC,Y72
/// DO,205,D7阻挡2下降,HY_StopDown,10,HC,Y10
/// </summary>
public static string SL_Buffer_StopDown = "SL_Buffer_StopDown";
public static string HY_StopDown = "HY_StopDown";
/// <summary>
/// DO,105,T5出料阻挡下降,SL_Out_StopDown,73,HC,Y73
/// DO,202,HY2横移定位上升,HY_LocationCylinder_Up,20,HC,Y20
/// </summary>
public static string SL_Out_StopDown = "SL_Out_StopDown";
public static string HY_LocationCylinder_Up = "HY_LocationCylinder_Up";
/// <summary>
/// DO,105,T5定位气缸上升,SL_LocationCylinder_Up,74,HC,Y74
/// DO,202,HY2横移定位下降,HY_LocationCylinder_Down,21,HC,Y21
/// </summary>
public static string SL_LocationCylinder_Up = "SL_LocationCylinder_Up";
public static string HY_LocationCylinder_Down = "HY_LocationCylinder_Down";
/// <summary>
/// DO,105,T5定位气缸下降 ,SL_LocationCylinder_Down,75,HC,Y75
/// DO,1,D1阻挡1下降,StopDown1,22,HC,Y22
/// </summary>
public static string SL_LocationCylinder_Down = "SL_LocationCylinder_Down";
public static string StopDown1 = "StopDown1";
/// <summary>
/// DO,105,T5固定气缸上升,SL_FixedCylinder_Up,76,HC,Y76
/// DO,1,D1阻挡2下降,StopDown2,23,HC,Y23
/// </summary>
public static string SL_FixedCylinder_Up = "SL_FixedCylinder_Up";
public static string StopDown2 = "StopDown2";
/// <summary>
/// DO,105,T5固定气缸下降,SL_FixedCylinder_Down,77,HC,Y77
/// DO,101,T1运行指示灯,SL_HddLed,80,HC,Y80
/// </summary>
public static string SL_FixedCylinder_Down = "SL_FixedCylinder_Down";
public static string SL_HddLed = "SL_HddLed";
/// <summary>
/// DO,105,T5上料气缸夹紧,SL_ClampCylinder_Work,83,HC,Y83
/// DO,101,T1故障指示灯,SL_AlarmLed,81,HC,Y81
/// </summary>
public static string SL_ClampCylinder_Work = "SL_ClampCylinder_Work";
public static string SL_AlarmLed = "SL_AlarmLed";
/// <summary>
/// DO,105,T5托盘定位气缸前进,SL_TrayLocation_Before,84,HC,Y84
/// DO,101,T1线体定位横移电机运转,SL_LocationSideWay_Run,82,HC,Y82
/// </summary>
public static string SL_TrayLocation_Before = "SL_TrayLocation_Before";
public static string SL_LocationSideWay_Run = "SL_LocationSideWay_Run";
/// <summary>
/// DO,105,T5托盘定位气缸后退,SL_TrayLocation_After,85,HC,Y85
/// DO,101,T1线体出口横移电机运转,SL_OutSideWay_Run,83,HC,Y83
/// </summary>
public static string SL_TrayLocation_After = "SL_TrayLocation_After";
public static string SL_OutSideWay_Run = "SL_OutSideWay_Run";
/// <summary>
/// DI,104,T4出口检测,SL_OutLine_Check,141,HC,X141
/// DO,101,T1进料线体运转,SL_Line_Run,84,HC,Y84
/// </summary>
public static string SL_OutLine_Check = "SL_OutLine_Check";
public static string SL_Line_Run = "SL_Line_Run";
/// <summary>
/// DO,104,T4出料线体运转,SL_OutLine_Run,99,HC,Y99
/// DO,101,T1进料阻挡下降,SL_Entry_StopDown,85,HC,Y85
/// </summary>
public static string SL_OutLine_Run = "SL_OutLine_Run";
public static string SL_Entry_StopDown = "SL_Entry_StopDown";
/// <summary>
/// DO,104,T4线体过渡滚筒运转,SL_RollerLine_Run,104,HC,Y104
/// DO,101,T1定位工位缓冲阻挡,SL_Buffer_StopDown,86,HC,Y86
/// </summary>
public static string SL_RollerLine_Run = "SL_RollerLine_Run";
public static string SL_Buffer_StopDown = "SL_Buffer_StopDown";
/// <summary>
/// DI,209,HY8-HY9阻挡上升端,HY_StopCylinder_Up,295,HC,X295
/// DO,101,T1出口阻挡下降,SL_Out_StopDown,87,HC,Y87
/// </summary>
public static string HY_StopCylinder_Up = "HY_StopCylinder_Up";
public static string SL_Out_StopDown = "SL_Out_StopDown";
/// <summary>
/// DI,209,HY8-HY9阻挡下降端,HY_StopCylinder_Down,296,HC,X296
/// DO,101,T1定位气缸上升,SL_LocationCylinder_Up,88,HC,Y88
/// </summary>
public static string HY_StopCylinder_Down = "HY_StopCylinder_Down";
public static string SL_LocationCylinder_Up = "SL_LocationCylinder_Up";
/// <summary>
/// DI,209,C4-HY9阻挡托盘检测,HY_OL_Tray_Check,303,HC,X303
/// DO,101,T1定位气缸下降 ,SL_LocationCylinder_Down,89,HC,Y89
/// </summary>
public static string HY_OL_Tray_Check = "HY_OL_Tray_Check";
public static string SL_LocationCylinder_Down = "SL_LocationCylinder_Down";
/// <summary>
/// DO,208,HY8横移电机反转,HY_LineBackRun,261,HC,Y261
/// DO,101,T1固定气缸上升,SL_FixedCylinder_Up,90,HC,Y90
/// </summary>
public static string HY_LineBackRun = "HY_LineBackRun";
public static string SL_FixedCylinder_Up = "SL_FixedCylinder_Up";
/// <summary>
/// DI,205,C2-HY5短线前阻挡托盘检测,HY_ShortL_StopCheck,480,HC,X480
/// DO,101,T1固定气缸下降,SL_FixedCylinder_Down,91,HC,Y91
/// </summary>
public static string HY_ShortL_StopCheck = "HY_ShortL_StopCheck";
public static string SL_FixedCylinder_Down = "SL_FixedCylinder_Down";
/// <summary>
/// DI,207,C8-HY7长线前阻挡托盘检测,HY_LongL_StopCheck,489,HC,X489
/// DO,101,T1托盘定位气缸前进,SL_TrayLocation_Before,96,HC,Y96
/// </summary>
public static string HY_LongL_StopCheck = "HY_LongL_StopCheck";
public static string SL_TrayLocation_Before = "SL_TrayLocation_Before";
/// <summary>
/// DI,210,HY10接驳台料盘检测7寸,HY_TrayCheck1,504,HC,X504
/// DO,101,T1托盘定位气缸后退,SL_TrayLocation_After,97,HC,Y97
/// </summary>
public static string SL_TrayLocation_After = "SL_TrayLocation_After";
public static string ClampCylinder_Work = "ClampCylinder_Work";
public static string ClampCylinder_Check = "ClampCylinder_Check";
public static string ClampCylinder_Relax = "ClampCylinder_Relax";
public static string HY_ClampCylinder_Relax = "HY_ClampCylinder_Relax";
public static string HY_ClampCylinder_Work = "HY_ClampCylinder_Work";
public static string HY_ClampCylinder_Check = "HY_ClampCylinder_Check";
public static string SL_ClampCylinder_Relax = "SL_ClampCylinder_Relax";
public static string SL_ClampCylinder_Work = "SL_ClampCylinder_Work";
public static string SL_ClampCylinder_Check = "SL_ClampCylinder_Check";
public static string HY_TrayCheck1 = "HY_TrayCheck1";
/// <summary>
/// DI,210,HY10接驳台料盘检测11寸,HY_TrayCheck2,505,HC,X505
/// </summary>
public static string HY_TrayCheck2 = "HY_TrayCheck2";
/// <summary>
/// DI,210,HY10接驳台料盘检测13寸,HY_TrayCheck3,506,HC,X506
/// </summary>
public static string HY_TrayCheck3 = "HY_TrayCheck3";
/// <summary>
/// DI,210,HY10接驳台料盘检测15寸,HY_TrayCheck4,507,HC,X507
/// </summary>
public static string HY_TrayCheck4 = "HY_TrayCheck4";
/// <summary>
/// DO,0,C1线体电机4启动,MotorRun_C1_4,416,HC,Y416
/// </summary>
public static string MotorRun_C1_4 = "MotorRun_C1_4";
/// <summary>
/// DO,0,C2/C3/C4/C5/C8线体运转,MotorRun_23458,417,HC,Y417
/// </summary>
public static string MotorRun_23458 = "MotorRun_23458";
/// <summary>
/// DO,205,C2-HY5短线前阻挡下降,HY_ShortL_StopDown,421,HC,Y421
/// </summary>
public static string HY_ShortL_StopDown = "HY_ShortL_StopDown";
/// <summary>
/// DO,207,C8-HY7长线前阻挡下降,HY_LongL_StopDown,426,HC,Y426
/// </summary>
public static string HY_LongL_StopDown = "HY_LongL_StopDown";
/// <summary>
/// DO,211,C5-HY11阻挡下降,HY_OL_StopDown,491,HC,Y491
/// </summary>
public static string HY_OL_StopDown = "HY_OL_StopDown";
//************************************************以下为原有IO******************************************************************
///// <summary>
///// DI 0 启动 Start_BTN 2 联动按钮 X03 DI-03
///// </summary>
//public static string Start_BTN = "Start_BTN";
///// <summary>
///// DI 0 流水线自动运转 Line_Run 3 流水线自动运转 X04 DI-04
///// </summary>
//public static string Line_Run = "Line_Run";
///// <summary>
///// 移栽DI/DO 阻挡3-1夹具检测 TrayCheck 0
///// </summary>
//public static string TrayCheck = "TrayCheck";
///// <summary>
///// DO 0 移载4升降轴刹车ON UpDownAxis_BreakOn 30 移载4升降轴刹车ON Y07 DO-07
///// </summary>
//public static string UpDownAxis_BreakOn = "UpDownAxis_BreakOn";
///// <summary>
///// DO 0 移载4升降轴伺服ON UpDownAxis_ServoOn 31 移载4升降轴伺服ON Y08 DO-08
///// </summary>
//public static string UpDownAxis_ServoOn = "UpDownAxis_ServoOn";
//public static string BatchAxis_BreakOn = "BatchAxis_BreakOn";
//public static string BatchAxis_ServoOn = "BatchAxis_ServoOn";
//#region 流水线新增IO
///// <summary>
/////DI NG料盘推出气缸前进端,NGCylinder_Before, X005
///// </summary>
//public static string NGCylinder_Before = "NGCylinder_Before";
///// <summary>
/////DI NG料盘推出气缸后退端,NGCylinder_After, X006
///// </summary>
//public static string NGCylinder_After = "NGCylinder_After";
///// <summary>
///// DO 驱动电机1正转,DriveMotor_Run1, Y005
///// </summary>
//public static string DriveMotor_Run1 = "DriveMotor_Run1";
///// <summary>
///// DO 驱动电机2正转,DriveMotor_Run2, ,Y006
///// </summary>
//public static string DriveMotor_Run2 = "DriveMotor_Run2";
///// <summary>
///// DO 驱动电机3正转,DriveMotor_Run3, Y007
///// </summary>
//public static string DriveMotor_Run3 = "DriveMotor_Run3";
///// <summary>
///// DO 驱动电机4正转,DriveMotor_Run4, Y008
///// </summary>
//public static string DriveMotor_Run4 = "DriveMotor_Run4";
//#endregion
//#region 皮带线新增IO
///// <summary>
///// DI 出料皮带线体1急停 DLine_SuddenStop X021
///// </summary>
//public static string DLine_SuddenStop = "DLine_SuddenStop";
///// <summary>
///// DI 出料皮带线体1复位 DLine_Reset X022
///// </summary>
//public static string DLine_Reset = "DLine_Reset";
/////// <summary>
/////// DI 0 皮带线1入口定位检测 EntryLocation_Check1 2 PRO_AOI_IP_2 0 皮带线1入口定位检测 X023 X023
/////// </summary>
////public static string EntryLocation_Check1 = "EntryLocation_Check1";
///// <summary>
///// DI 0 皮带线1出口定位检测 ExitLocation_Check1 3 PRO_AOI_IP_2 0 皮带线1出口定位检测 X024 X024
///// </summary>
//public static string ExitLocation_Check1 = "ExitLocation_Check1";
///// <summary>
///// DI 0 皮带线1出口料盘检测 ExitTray_Check1 4 PRO_AOI_IP_2 0 皮带线1出口料盘检测 X025 X025
///// </summary>
//public static string ExitTray_Check1 = "ExitTray_Check1";
/////// <summary>
/////// DI,0,皮带线2入口定位检测 EntryLocation_Check2 5 PRO_AOI_IP_2 0 皮带线2入口定位检测 X026 X026
/////// </summary>
////public static string EntryLocation_Check2 = "EntryLocation_Check2";
///// <summary>
///// DI 皮带线2出口定位检测 ExitLocation_Check2 6 PRO_AOI_IP_2 0 皮带线2出口定位检测 X027 X027
///// </summary>
//public static string ExitLocation_Check2 = "ExitLocation_Check2";
///// <summary>
///// DI 皮带线2出口料盘检测 ExitTray_Check2 7 PRO_AOI_IP_2 0 皮带线2出口料盘检测 X028 X028
///// </summary>
//public static string ExitTray_Check2 = "ExitTray_Check2";
///// <summary>
///// DI 皮带线3定位检测,Location_Check3,8,PRO_AOI_IP_2,0,皮带线3定位检测,X029,X029
///// </summary>
//public static string Location_Check3 = "Location_Check3";
///// <summary>
///// DI 皮带线3入口料盘检测, EntryTray_Check3,9, PRO_AOI_IP_2,0, 皮带线3入口料盘检测, X030, X030
///// </summary>
//public static string EntryTray_Check3 = "EntryTray_Check3";
///// <summary>
///// DI 皮带线3中间位置料盘检测,MiddleTray_Check3,10,PRO_AOI_IP_2,0,皮带线3中间位置料盘检测,X031,X031
///// </summary>
//public static string MiddleTray_Check3 = "MiddleTray_Check3";
///// <summary>
///// DI 皮带线3出口料盘检测, ExitTray_Check3,11, PRO_AOI_IP_2,0, 皮带线3出口料盘检测, X032, X032
///// </summary>
//public static string ExitTray_Check3 = "ExitTray_Check3";
///// <summary>
///// DI 分盘装置1定位气缸上升端,SeparateDevice_Up,12,PRO_AOI_IP_2,0,分盘装置1定位气缸上升端,X033,X033
///// </summary>
//public static string SeparateDevice_Up = "SeparateDevice_Up";
///// <summary>
///// DI 分盘装置1定位气缸下降端, SeparateDevice_Down,13, PRO_AOI_IP_2,0, 分盘装置1定位气缸下降端, X034, X034
///// </summary>
//public static string SeparateDevice_Down = "SeparateDevice_Down";
///// <summary>
///// DI 分盘装置1料盘检测,SeparateDevice_Check,14,PRO_AOI_IP_2,0,分盘装置1料盘检测,X035,X035
///// </summary>
//public static string SeparateDevice_Check = "SeparateDevice_Check";
///// <summary>
///// DI 出料皮带线体1运行状态 DLine_RunStatus Y021
///// </summary>
//public static string DLine_RunStatus = "DLine_RunStatus";
///// <summary>
///// DI 出料皮带线体1故障状态 DLine_RunAlarm Y022
///// </summary>
//public static string DLine_RunAlarm = "DLine_RunAlarm";
///// <summary>
///// DO 0 出料皮带线1运转 DLine_Run1,Y021
///// </summary>
//public static string DLine_Run1 = "DLine_Run1";
///// <summary>
///// DO 0 出料皮带线2运转 DLine_Run2,Y022
///// </summary>
//public static string DLine_Run2 = "DLine_Run2";
///// <summary>
///// DO 0 出料皮带线3运转 DLine_Run3,Y023
///// </summary>
//public static string DLine_Run3 = "DLine_Run3";
///// <summary>
///// DO 0 分盘装置电机驱动 SeparateDevice_Run,Y024
///// </summary>
//public static string SeparateDevice_Run = "SeparateDevice_Run";
//#endregion
//#region 上料流水线
///// <summary>
///// DI 0 上料3夹爪料盘检测 ReelCheck 10 PRO_AOI_IP_16 0 上料3夹爪料盘检测 X211 X211
///// </summary>
//public static string ReelCheck = "ReelCheck";
///// <summary>
///// DI /DO SL1上料横移机构上升端 SL_MoveCylinder_Up X124
///// </summary>
//public static string SL_MoveCylinder_Up = "SL_MoveCylinder_Up";
///// <summary>
///// DI /DO SL1上料横移机构下降端 SL_MoveCylinder_Down X125
///// </summary>
//public static string SL_MoveCylinder_Down = "SL_MoveCylinder_Down";
///// <summary>
///// DI /DO SL1上料气缸放松端 SL_ClampCylinder_Relax X128
///// </summary>
//public static string SL_ClampCylinder_Relax = "SL_ClampCylinder_Relax";
///// <summary>
///// DI /DO SL1上料气缸夹紧端 SL_ClampCylinder_Work X129
///// </summary>
//public static string SL_ClampCylinder_Work = "SL_ClampCylinder_Work";
///// <summary>
///// DI SL1线体出口横移检测 SL_SideWay_OutCheck X136
///// </summary>
//public static string SL_SideWay_OutCheck = "SL_SideWay_OutCheck";
///// <summary>
///// DO SL1提升伺服刹车ON SL_UpAxis_BreakOn Y129
///// </summary>
//public static string SL_UpAxis_BreakOn = "SL_UpAxis_BreakOn";
///// <summary>
///// DO SL1移载1伺服刹车ON SL_MoveAxis_BreakOn Y130
///// </summary>
//public static string SL_MoveAxis_BreakOn = "SL_MoveAxis_BreakOn";
///// <summary>
///// DO SL1提升伺服运转ON SL_UpAxis_ServoOn Y131
///// </summary>
//public static string SL_UpAxis_ServoOn = "SL_UpAxis_ServoOn";
///// <summary>
///// DO SL1移载1伺服运转ON SL_MoveAxis_ServoOn Y132
///// </summary>
//public static string SL_MoveAxis_ServoOn = "SL_MoveAxis_ServoOn";
// /// <summary>
// /// DI FL1阻挡检测 FL_StopCheck X170
// /// </summary>
//public static string FL_StopCheck = "FL_StopCheck";
///// <summary>
///// DI FL1托盘检测 FL_TrayCheck X171
///// </summary>
//public static string FL_TrayCheck = "FL_TrayCheck";
/////// <summary>
/////// DI FL1料盘检测1 FL_ReelCheck X172
/////// </summary>
////public static string FL_ReelCheck = "FL_ReelCheck";
///// <summary>
///// DI /DO FL1顶升上升端 FL_TopCylinder_Up X173
///// </summary>
//public static string FL_TopCylinder_Up = "FL_TopCylinder_Up";
///// <summary>
///// DI /DO FL1顶升下降端 FL_TopCylinder_Down X174
///// </summary>
//public static string FL_TopCylinder_Down = "FL_TopCylinder_Down";
///// <summary>
///// DO FL1阻挡1下降SOL FL_StopCylinder_Down1 Y165
///// </summary>
//public static string FL_StopCylinder_Down1 = "FL_StopCylinder_Down1";
///// <summary>
///// DO FL1阻挡2下降SOL FL_StopCylinder_Down2 Y166
///// </summary>
//public static string FL_StopCylinder_Down2 = "FL_StopCylinder_Down2";
//#endregion
//#region 环行线横移
///// <summary>
///// DI 环形线横移1托盘检测 SW_TrayCheck X130
///// </summary>
//public static string SW_TrayCheck = "SW_TrayCheck";
/////// <summary>
/////// DI 环形线横移1料盘检测1 SW_ReelCheck X131
/////// </summary>
////public static string SW_ReelCheck = "SW_ReelCheck";
///// <summary>
///// DI /DO 环形线横移1顶升上升端 SW_TopCylinder_Up X132
///// </summary>
//public static string SW_TopCylinder_Up = "SW_TopCylinder_Up";
///// <summary>
///// DI /DO 环形线横移1顶升下降端 SW_TopCylinder_Down X133
///// </summary>
//public static string SW_TopCylinder_Down = "SW_TopCylinder_Down";
///// <summary>
///// DI /DO 环形线横移1定位上升端 SW_LocationCylinder_Up X134
///// </summary>
//public static string SW_LocationCylinder_Up = "SW_LocationCylinder_Up";
///// <summary>
///// DI /DO 环形线横移1定位下降端 SW_LocationCylinder_Down X135
///// </summary>
//public static string SW_LocationCylinder_Down = "SW_LocationCylinder_Down";
///// <summary>
///// DO 环形线横移1电机运转 SW_MotorRun Y105
///// </summary>
//public static string SW_MotorRun = "SW_MotorRun";
///// <summary>
///// DI 环形线横移1托盘检测 SW1_TrayCheck X130
///// </summary>
//public static string SW1_TrayCheck = "SW1_TrayCheck";
///// <summary>
///// DI 环形线横移1料盘检测1 SW1_ReelCheck X131
///// </summary>
//public static string SW1_ReelCheck = "SW1_ReelCheck";
///// <summary>
///// DI /DO 环形线横移1顶升上升端 SW1_TopCylinder_Up X132
///// </summary>
//public static string SW1_TopCylinder_Up = "SW1_TopCylinder_Up";
///// <summary>
///// DI /DO 环形线横移1顶升下降端 SW1_TopCylinder_Down X133
///// </summary>
//public static string SW1_TopCylinder_Down = "SW1_TopCylinder_Down";
///// <summary>
///// DI /DO 环形线横移1定位上升端 SW1_LocationCylinder_Up X134
///// </summary>
//public static string SW1_LocationCylinder_Up = "SW1_LocationCylinder_Up";
///// <summary>
///// DI /DO 环形线横移1定位下降端 SW1_LocationCylinder_Down X135
///// </summary>
//public static string SW1_LocationCylinder_Down = "SW1_LocationCylinder_Down";
///// <summary>
///// DO 环形线横移1电机运转 SW1_MotorRun Y105
///// </summary>
//public static string SW1_MotorRun = "SW1_MotorRun";
///// <summary>
///// DI 环形线横移2托盘检测 SW2_TrayCheck X210
///// </summary>
//public static string SW2_TrayCheck = "SW2_TrayCheck";
///// <summary>
///// DI 环形线横移2料盘检测1 SW2_ReelCheck X211
///// </summary>
//public static string SW2_ReelCheck = "SW2_ReelCheck";
///// <summary>
///// DI /DO 环形线横移2顶升上升端 SW2_TopCylinder_Up X212
///// </summary>
//public static string SW2_TopCylinder_Up = "SW2_TopCylinder_Up";
///// <summary>
///// DI /DO 环形线横移2顶升下降端 SW2_TopCylinder_Down X213
///// </summary>
//public static string SW2_TopCylinder_Down = "SW2_TopCylinder_Down";
///// <summary>
///// DI /DO 环形线横移2定位上升端 SW2_LocationCylinder_Up X214
///// </summary>
//public static string SW2_LocationCylinder_Up = "SW2_LocationCylinder_Up";
///// <summary>
///// DI /DO 环形线横移2定位下降端 SW2_LocationCylinder_Down X215
///// </summary>
//public static string SW2_LocationCylinder_Down = "SW2_LocationCylinder_Down";
///// <summary>
///// DO 环形线横移2电机运转 SW2_MotorRun Y185
///// </summary>
//public static string SW2_MotorRun = "SW2_MotorRun";
///// <summary>
///// DI 环形线横移3托盘检测 SW3_TrayCheck X250
///// </summary>
//public static string SW3_TrayCheck = "SW3_TrayCheck";
///// <summary>
///// DI 环形线横移3料盘检测1 SW3_ReelCheck X251
///// </summary>
//public static string SW3_ReelCheck = "SW3_ReelCheck";
///// <summary>
///// DI /DO 环形线横移3顶升上升端 SW3_TopCylinder_Up X252
///// </summary>
//public static string SW3_TopCylinder_Up = "SW3_TopCylinder_Up";
///// <summary>
///// DI /DO 环形线横移3顶升下降端 SW3_TopCylinder_Down X253
///// </summary>
//public static string SW3_TopCylinder_Down = "SW3_TopCylinder_Down";
///// <summary>
///// DI /DO 环形线横移3定位上升端 SW3_LocationCylinder_Up X254
///// </summary>
//public static string SW3_LocationCylinder_Up = "SW3_LocationCylinder_Up";
///// <summary>
///// DI /DO 环形线横移3定位下降端 SW3_LocationCylinder_Down X255
///// </summary>
//public static string SW3_LocationCylinder_Down = "SW3_LocationCylinder_Down";
///// <summary>
///// DO 环形线横移3电机运转 SW3_MotorRun Y225
///// </summary>
//public static string SW3_MotorRun = "SW3_MotorRun";
///// <summary>
///// DI 环形线横移4托盘检测 SW4_TrayCheck X556
///// </summary>
//public static string SW4_TrayCheck = "SW4_TrayCheck";
///// <summary>
///// DI 环形线横移4料盘检测1 SW4_ReelCheck X557
///// </summary>
//public static string SW4_ReelCheck = "SW4_ReelCheck";
///// <summary>
///// DI /DO 环形线横移4顶升上升端 SW4_TopCylinder_Up X558
///// </summary>
//public static string SW4_TopCylinder_Up = "SW4_TopCylinder_Up";
///// <summary>
///// DI /DO 环形线横移4顶升下降端 SW4_TopCylinder_Down X559
///// </summary>
//public static string SW4_TopCylinder_Down = "SW4_TopCylinder_Down";
///// <summary>
///// DI /DO 环形线横移4定位上升端 SW4_LocationCylinder_Up X007
///// </summary>
//public static string SW4_LocationCylinder_Up = "SW4_LocationCylinder_Up";
///// <summary>
///// DI /DO 环形线横移4定位下降端 SW4_LocationCylinder_Down X008
///// </summary>
//public static string SW4_LocationCylinder_Down = "SW4_LocationCylinder_Down";
///// <summary>
///// DO 环形线横移4电机运转 SW4_MotorRun Y009
///// </summary>
//public static string SW4_MotorRun = "SW4_MotorRun";
///// <summary>
///// DI,0,环形线横移2阻挡检测,SW2_StopCheck,2,PRO_AOI_IP_28,0,环形线横移2阻挡检测,X403,X403
///// </summary>
//public static string SW2_StopCheck = "SW2_StopCheck";
///// <summary>
///// DO,0, 环形线横移2阻挡下降SOL, SW2_StopDown,4, PRO_AOI_IP_28,0, 环形线横移2阻挡下降SOL, Y405, Y405
///// </summary>
//public static string SW2_StopDown = "SW2_StopDown";
///// <summary>
///// DI,1000,环形线横移4阻挡检测,SW4_StopCheck,6,PRO_AOI_IP_36,0,环形线横移4阻挡检测,X557,X557
///// </summary>
//public static string SW4_StopCheck = "SW4_StopCheck";
///// <summary>
///// DO,204, 环形线横移4阻挡下降SOL, SW4_StopDown,4, PRO_AOI_IP_36,0, 环形线横移4阻挡下降, Y555, Y555
///// </summary>
//public static string SW4_StopDown = "SW4_StopDown";
///// <summary>
///// DI,0,环形线横移2阻挡检测,SW2_StopCheck,2,PRO_AOI_IP_28,0,环形线横移2阻挡检测,X403,X403
///// </summary>
//public static string SW_StopCheck = "SW_StopCheck";
///// <summary>
///// DO,0, 环形线横移2阻挡下降SOL, SW2_StopDown,4, PRO_AOI_IP_28,0, 环形线横移2阻挡下降SOL, Y405, Y405
///// </summary>
//public static string SW_StopDown = "SW_StopDown";
//#endregion
///// <summary>
///// DO 0 扫码NG料气缸1前进SOL ScanNGCylinder_Forward 8 PRO_AOI_IP_2 0 扫码NG料气缸1前进SOL Y029 Y029
///// </summary>
//public static string ScanNGCylinder_Forward = "ScanNGCylinder_Forward";
///// <summary>
///// DO 0 扫码NG料气缸1后退SOL ScanNGCylinder_Back 9 PRO_AOI_IP_2 0 扫码NG料气缸1后退SOL Y030 Y030
///// </summary>
//public static string ScanNGCylinder_Back = "ScanNGCylinder_Back";
///// <summary>
///// DO 0 分盘装置电机1驱动反转 SeparateDevice_BackRun 10 PRO_AOI_IP_2 0 分盘装置电机1驱动反转 Y031 Y031
///// </summary>
//public static string SeparateDevice_BackRun = "SeparateDevice_BackRun";
///// <summary>
///// DO 0 皮带线1滚刷电机运行 DLine_Brush1 11 PRO_AOI_IP_2 0 皮带线1滚刷电机运行 Y032 Y032
///// </summary>
//public static string DLine_Brush1 = "DLine_Brush1";
///// <summary>
///// DO 0 皮带线2滚刷电机运行 DLine_Brush2 12 PRO_AOI_IP_2 0 皮带线2滚刷电机运行 Y033 Y033
///// </summary>
//public static string DLine_Brush2 = "DLine_Brush2";
//#region 20200715 新增分流横移装置
///// <summary>
///// DI,1000,分流前端托盘检测,Shunt_Check1_Front,3,PRO_AOI_IP_28,0,分流前端托盘检测,X404,X404
///// </summary>
//public static string Shunt_Check1_Front = "Shunt_Check1_Front";
///// <summary>
///// DI,1000, 分流中间托盘检测, Shunt_Check2_Middle,4, PRO_AOI_IP_28,0, 分流中间托盘检测, X405, X405
///// </summary>
//public static string Shunt_Check2_Middle = "Shunt_Check2_Middle";
///// <summary>
///// DI,1000,分流后端托盘检测,Shunt_Check3_Back,5,PRO_AOI_IP_28,0,分流后端托盘检测,X406,X406
///// </summary>
//public static string Shunt_Check3_Back = "Shunt_Check3_Back";
///// <summary>
/////DI,1000, 分流后端阻挡托盘检测, Shunt_Check4_BStop,6, PRO_AOI_IP_28,0, 分流后端阻挡托盘检测, X407, X407
///// </summary>
//public static string Shunt_Check4_BStop = "Shunt_Check4_BStop";
///// <summary>
///// DI,1000,分流横移机构1上升端,Shunt_TopCylinder_Up1,7,PRO_AOI_IP_28,0,分流横移机构1上升端,X408,X408
///// </summary>
//public static string Shunt_TopCylinder_Up1 = "Shunt_TopCylinder_Up1";
///// <summary>
///// DI,1000, 分流横移机构1下降端, Shunt_TopCylinder_Down1,8, PRO_AOI_IP_28,0, 分流横移机构1下降端, X409, X409
///// </summary>
//public static string Shunt_TopCylinder_Down1 = "Shunt_TopCylinder_Down1";
///// <summary>
///// DI,1000,分流横移机构2上升端,Shunt_TopCylinder_Up2,9,PRO_AOI_IP_28,0,分流横移机构2上升端,X410,X410
///// </summary>
//public static string Shunt_TopCylinder_Up2 = "Shunt_TopCylinder_Up2";
///// <summary>
///// DI,1000, 分流横移机构2下降端, Shunt_TopCylinder_Down2,10, PRO_AOI_IP_28,0, 分流横移机构2下降端, X411, X411
///// </summary>
//public static string Shunt_TopCylinder_Down2 = "Shunt_TopCylinder_Down2";
///// <summary>
///// DO,1000,分流前端阻挡下降SOL,Shunt_StopDown1_Front,5,PRO_AOI_IP_28,0,分流前端阻挡下降SOL,Y406,Y406
///// </summary>
//public static string Shunt_StopDown1_Front = "Shunt_StopDown1_Front";
///// <summary>
///// DO,1000, 分流后端阻挡下降SOL, Shunt_StopDown2_Back,6, PRO_AOI_IP_28,0, 分流后端阻挡下降SOL, Y407, Y407
///// </summary>
//public static string Shunt_StopDown2_Back = "Shunt_StopDown2_Back";
///// <summary>
///// DO,1000,分流横移机构1皮带运行,Shunt_MotorRun1,11,PRO_AOI_IP_28,0,分流横移机构1皮带运行,Y412,Y412
///// </summary>
//public static string Shunt_MotorRun1 = "Shunt_MotorRun1";
///// <summary>
///// DO,1000, 分流横移机构2皮带运行, Shunt_MotorRun2,12, PRO_AOI_IP_28,0, 分流横移机构2皮带运行, Y413, Y413
///// </summary>
//public static string Shunt_MotorRun2 = "Shunt_MotorRun2";
//#endregion
//#region 20200902 新增分流2
///// <summary>
///// DI,1000,分流2前端托盘检测,Shunt2_Check1_Front,2,PRO_AOI_IP_24,0,分流2前端托盘检测,X343,X343
///// </summary>
//public static string Shunt2_Check1_Front = "Shunt2_Check1_Front";
///// <summary>
///// DI,1000, 分流2中间托盘检测, Shunt2_Check2_Middle,3, PRO_AOI_IP_24,0, 分流2中间托盘检测, X344, X344
///// </summary>
//public static string Shunt2_Check2_Middle = "Shunt2_Check2_Middle";
///// <summary>
///// DI,1000,分流2后端托盘检测,Shunt2_Check3_Back,4,PRO_AOI_IP_24,0,分流2后端托盘检测,X345,X345
///// </summary>
//public static string Shunt2_Check3_Back = "Shunt2_Check3_Back";
///// <summary>
/////DI,1000, 分流2后端阻挡托盘检测, Shunt2_Check4_BStop,5, PRO_AOI_IP_24,0, 分流2后端阻挡托盘检测, X346, X346
///// </summary>
//public static string Shunt2_Check4_BStop = "Shunt2_Check4_BStop";
///// <summary>
///// DI,1000,分流2横移机构3上升端,Shunt2_TopCylinder_Up1,6,PRO_AOI_IP_24,0,分流2横移机构3上升端,X347,X347
///// </summary>
//public static string Shunt2_TopCylinder_Up1 = "Shunt2_TopCylinder_Up1";
///// <summary>
///// DI,1000, 分流2横移机构3下降端, Shunt2_TopCylinder_Down1,7, PRO_AOI_IP_24,0, 分流2横移机构3下降端, X348, X348
///// </summary>
//public static string Shunt2_TopCylinder_Down1 = "Shunt2_TopCylinder_Down1";
///// <summary>
///// DI,1000,分流2横移机构4上升端,Shunt2_TopCylinder_Up2,8,PRO_AOI_IP_24,0,分流2横移机构4上升端,X349,X349
///// </summary>
//public static string Shunt2_TopCylinder_Up2 = "Shunt2_TopCylinder_Up2";
///// <summary>
///// DI,1000, 分流2横移机构4下降端, Shunt2_TopCylinder_Down2,9, PRO_AOI_IP_24,0, 分流2横移机构4下降端, X350, X350
///// </summary>
//public static string Shunt2_TopCylinder_Down2 = "Shunt2_TopCylinder_Down2";
///// <summary>
///// DO,1000,分流2前端阻挡下降SOL,Shunt2_StopDown1_Front,4,PRO_AOI_IP_24,0,分流2前端阻挡下降SOL,Y345,Y345
///// </summary>
//public static string Shunt2_StopDown1_Front = "Shunt2_StopDown1_Front";
///// <summary>
///// DO,1000, 分流2后端阻挡下降SOL, Shunt2_StopDown2_Back,5, PRO_AOI_IP_24,0, 分流2后端阻挡下降SOL, Y346, Y346
///// </summary>
//public static string Shunt2_StopDown2_Back = "Shunt2_StopDown2_Back";
///// <summary>
///// DO,1000,分流2横移机构3皮带运行,Shunt2_MotorRun1,10,PRO_AOI_IP_24,0,分流2横移机构3皮带运行,Y351,Y351
///// </summary>
//public static string Shunt2_MotorRun1 = "Shunt2_MotorRun1";
///// <summary>
///// DO,1000, 分流2横移机构4皮带运行, Shunt2_MotorRun2,11, PRO_AOI_IP_24,0, 分流2横移机构4皮带运行, Y352, Y352
///// </summary>
//public static string Shunt2_MotorRun2 = "Shunt2_MotorRun2";
//#endregion
}
public enum IO_VALUE
{
......
......@@ -53,7 +53,22 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("IO_DOLength",false )]
public string IO_DOLength { get; set; }
/// <summary>
/// PRO,0,移栽上下轴走到待机点速度,UpdownAxis_P1Speed,400,,,,,
/// </summary>
[ConfigProAttribute("UpdownAxis_P1Speed", false)]
public int UpdownAxis_P1Speed { get; set; }
/// <summary>
/// PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,500,,,,,
/// </summary>
[ConfigProAttribute("UpdownAxis_P2Speed", false)]
public int UpdownAxis_P2Speed { get; set; }
/// <summary>
/// PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,500,,,,,
/// </summary>
[ConfigProAttribute("UpdownAxis_P3Speed", false)]
public int UpdownAxis_P3Speed { get; set; }
private Dictionary<string, ushort> DILengthMap = null;
......
......@@ -153,6 +153,22 @@ namespace OnlineStore.LoadCSVLibrary
UpDownP2DetialList = newPositionStr;
}
public void ConfigSpeed(Line_Config config)
{
if (this.UpdownAxis_P1Speed <= 0)
{
this.UpdownAxis_P1Speed = config.UpdownAxis_P1Speed;
}
if (this.UpdownAxis_P2Speed <= 0)
{
this.UpdownAxis_P2Speed = config.UpdownAxis_P2Speed;
}
if (this.UpdownAxis_P3Speed <= 0)
{
this.UpdownAxis_P3Speed = config.UpdownAxis_P3Speed;
}
}
///// <summary>s
///// PRO,0,移栽上下轴下降速度,UpdownAxis_DownSpeed,500,,,,,
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!