Commit a413bcc3 LN

升降盘P3增加详细位置配置

1 个父辈 73f9bc4a
......@@ -77,6 +77,15 @@
this.label4 = new System.Windows.Forms.Label();
this.btnP2 = new System.Windows.Forms.Button();
this.txtP2 = new System.Windows.Forms.TextBox();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.btnP3Save = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.txtlP3 = new System.Windows.Forms.TextBox();
this.listP3 = new System.Windows.Forms.ListBox();
this.cmbP3Height = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.cmbP3Width = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.panBase.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout();
......@@ -89,6 +98,7 @@
this.tabPage2.SuspendLayout();
this.groupDetial.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox7.SuspendLayout();
this.SuspendLayout();
//
// panBase
......@@ -605,7 +615,10 @@
//
// tabPage2
//
this.tabPage2.Controls.Add(this.groupBox7);
this.tabPage2.Controls.Add(this.lblP3List);
this.tabPage2.Controls.Add(this.groupDetial);
this.tabPage2.Controls.Add(this.lblP2);
this.tabPage2.Controls.Add(this.axisMoveControl1);
this.tabPage2.Controls.Add(this.groupBox2);
this.tabPage2.Location = new System.Drawing.Point(4, 26);
......@@ -626,9 +639,9 @@
this.groupDetial.Controls.Add(this.label2);
this.groupDetial.Controls.Add(this.cmbDSize);
this.groupDetial.Controls.Add(this.label1);
this.groupDetial.Location = new System.Drawing.Point(498, 254);
this.groupDetial.Location = new System.Drawing.Point(498, 165);
this.groupDetial.Name = "groupDetial";
this.groupDetial.Size = new System.Drawing.Size(482, 195);
this.groupDetial.Size = new System.Drawing.Size(237, 347);
this.groupDetial.TabIndex = 317;
this.groupDetial.TabStop = false;
this.groupDetial.Text = "移栽位置P2详细配置";
......@@ -637,9 +650,9 @@
//
this.btnDSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDSave.ForeColor = System.Drawing.Color.Blue;
this.btnDSave.Location = new System.Drawing.Point(40, 142);
this.btnDSave.Location = new System.Drawing.Point(164, 66);
this.btnDSave.Name = "btnDSave";
this.btnDSave.Size = new System.Drawing.Size(128, 34);
this.btnDSave.Size = new System.Drawing.Size(64, 34);
this.btnDSave.TabIndex = 322;
this.btnDSave.Text = "保存";
this.btnDSave.UseVisualStyleBackColor = true;
......@@ -650,11 +663,11 @@
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label3.Location = new System.Drawing.Point(7, 106);
this.label3.Location = new System.Drawing.Point(15, 75);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(70, 17);
this.label3.Size = new System.Drawing.Size(49, 17);
this.label3.TabIndex = 321;
this.label3.Text = "升降轴P2:";
this.label3.Text = "P3位置:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtDP2
......@@ -663,7 +676,7 @@
this.txtDP2.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtDP2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDP2.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtDP2.Location = new System.Drawing.Point(78, 100);
this.txtDP2.Location = new System.Drawing.Point(69, 70);
this.txtDP2.MaxLength = 12;
this.txtDP2.Name = "txtDP2";
this.txtDP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -676,9 +689,9 @@
this.listDetitalP2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.listDetitalP2.FormattingEnabled = true;
this.listDetitalP2.ItemHeight = 20;
this.listDetitalP2.Location = new System.Drawing.Point(176, 22);
this.listDetitalP2.Location = new System.Drawing.Point(9, 110);
this.listDetitalP2.Name = "listDetitalP2";
this.listDetitalP2.Size = new System.Drawing.Size(270, 164);
this.listDetitalP2.Size = new System.Drawing.Size(219, 224);
this.listDetitalP2.TabIndex = 319;
this.listDetitalP2.SelectedIndexChanged += new System.EventHandler(this.listDetitalP2_SelectedIndexChanged);
//
......@@ -687,9 +700,9 @@
this.cmbDHeight.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbDHeight.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbDHeight.FormattingEnabled = true;
this.cmbDHeight.Location = new System.Drawing.Point(78, 62);
this.cmbDHeight.Location = new System.Drawing.Point(163, 25);
this.cmbDHeight.Name = "cmbDHeight";
this.cmbDHeight.Size = new System.Drawing.Size(90, 28);
this.cmbDHeight.Size = new System.Drawing.Size(65, 28);
this.cmbDHeight.TabIndex = 318;
this.cmbDHeight.SelectedIndexChanged += new System.EventHandler(this.cmbDHeight_SelectedIndexChanged);
//
......@@ -698,11 +711,11 @@
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label2.Location = new System.Drawing.Point(7, 68);
this.label2.Location = new System.Drawing.Point(122, 31);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(68, 17);
this.label2.Size = new System.Drawing.Size(35, 17);
this.label2.TabIndex = 317;
this.label2.Text = "料盘高度:";
this.label2.Text = "高度:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// cmbDSize
......@@ -710,9 +723,9 @@
this.cmbDSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbDSize.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbDSize.FormattingEnabled = true;
this.cmbDSize.Location = new System.Drawing.Point(78, 24);
this.cmbDSize.Location = new System.Drawing.Point(51, 25);
this.cmbDSize.Name = "cmbDSize";
this.cmbDSize.Size = new System.Drawing.Size(90, 28);
this.cmbDSize.Size = new System.Drawing.Size(65, 28);
this.cmbDSize.TabIndex = 316;
this.cmbDSize.SelectedIndexChanged += new System.EventHandler(this.cmbDHeight_SelectedIndexChanged);
//
......@@ -721,11 +734,11 @@
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label1.Location = new System.Drawing.Point(7, 30);
this.label1.Location = new System.Drawing.Point(10, 31);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(68, 17);
this.label1.Size = new System.Drawing.Size(35, 17);
this.label1.TabIndex = 315;
this.label1.Text = "料盘尺寸:";
this.label1.Text = "宽度:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// axisMoveControl1
......@@ -737,8 +750,6 @@
//
// groupBox2
//
this.groupBox2.Controls.Add(this.lblP3List);
this.groupBox2.Controls.Add(this.lblP2);
this.groupBox2.Controls.Add(this.btnP3);
this.groupBox2.Controls.Add(this.txtP3);
this.groupBox2.Controls.Add(this.btnSave);
......@@ -750,7 +761,7 @@
this.groupBox2.Controls.Add(this.txtP2);
this.groupBox2.Location = new System.Drawing.Point(498, 4);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(482, 241);
this.groupBox2.Size = new System.Drawing.Size(482, 155);
this.groupBox2.TabIndex = 218;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "升降轴位置配置";
......@@ -761,9 +772,9 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.lblP3List.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblP3List.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblP3List.Location = new System.Drawing.Point(10, 193);
this.lblP3List.Location = new System.Drawing.Point(6, 458);
this.lblP3List.Name = "lblP3List";
this.lblP3List.Size = new System.Drawing.Size(464, 40);
this.lblP3List.Size = new System.Drawing.Size(486, 40);
this.lblP3List.TabIndex = 314;
this.lblP3List.Text = "P3列表:";
this.lblP3List.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -774,9 +785,9 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.lblP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblP2.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblP2.Location = new System.Drawing.Point(10, 148);
this.lblP2.Location = new System.Drawing.Point(6, 413);
this.lblP2.Name = "lblP2";
this.lblP2.Size = new System.Drawing.Size(464, 40);
this.lblP2.Size = new System.Drawing.Size(486, 40);
this.lblP2.TabIndex = 313;
this.lblP2.Text = "P2列表:";
this.lblP2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -906,6 +917,117 @@
this.txtP2.TabIndex = 305;
this.txtP2.Text = "-1";
//
// groupBox7
//
this.groupBox7.Controls.Add(this.btnP3Save);
this.groupBox7.Controls.Add(this.label6);
this.groupBox7.Controls.Add(this.txtlP3);
this.groupBox7.Controls.Add(this.listP3);
this.groupBox7.Controls.Add(this.cmbP3Height);
this.groupBox7.Controls.Add(this.label8);
this.groupBox7.Controls.Add(this.cmbP3Width);
this.groupBox7.Controls.Add(this.label9);
this.groupBox7.Location = new System.Drawing.Point(742, 165);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(237, 347);
this.groupBox7.TabIndex = 324;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "升降轴仓门取放点P3详细配置";
//
// btnP3Save
//
this.btnP3Save.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnP3Save.ForeColor = System.Drawing.Color.Blue;
this.btnP3Save.Location = new System.Drawing.Point(167, 65);
this.btnP3Save.Name = "btnP3Save";
this.btnP3Save.Size = new System.Drawing.Size(64, 34);
this.btnP3Save.TabIndex = 322;
this.btnP3Save.Text = "保存";
this.btnP3Save.UseVisualStyleBackColor = true;
this.btnP3Save.Click += new System.EventHandler(this.btnP3Save_Click);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label6.Location = new System.Drawing.Point(6, 74);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(49, 17);
this.label6.TabIndex = 321;
this.label6.Text = "P3位置:";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtlP3
//
this.txtlP3.BackColor = System.Drawing.SystemColors.Window;
this.txtlP3.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtlP3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtlP3.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtlP3.Location = new System.Drawing.Point(66, 69);
this.txtlP3.MaxLength = 12;
this.txtlP3.Name = "txtlP3";
this.txtlP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtlP3.Size = new System.Drawing.Size(90, 26);
this.txtlP3.TabIndex = 320;
this.txtlP3.Text = "-1";
//
// listP3
//
this.listP3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.listP3.FormattingEnabled = true;
this.listP3.ItemHeight = 20;
this.listP3.Location = new System.Drawing.Point(13, 110);
this.listP3.Name = "listP3";
this.listP3.Size = new System.Drawing.Size(219, 224);
this.listP3.TabIndex = 319;
//
// cmbP3Height
//
this.cmbP3Height.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbP3Height.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbP3Height.FormattingEnabled = true;
this.cmbP3Height.Location = new System.Drawing.Point(166, 25);
this.cmbP3Height.Name = "cmbP3Height";
this.cmbP3Height.Size = new System.Drawing.Size(65, 28);
this.cmbP3Height.TabIndex = 318;
this.cmbP3Height.SelectedIndexChanged += new System.EventHandler(this.cmbP3Width_SelectedIndexChanged);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label8.Location = new System.Drawing.Point(125, 31);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(35, 17);
this.label8.TabIndex = 317;
this.label8.Text = "高度:";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// cmbP3Width
//
this.cmbP3Width.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbP3Width.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbP3Width.FormattingEnabled = true;
this.cmbP3Width.Location = new System.Drawing.Point(54, 25);
this.cmbP3Width.Name = "cmbP3Width";
this.cmbP3Width.Size = new System.Drawing.Size(65, 28);
this.cmbP3Width.TabIndex = 316;
this.cmbP3Width.SelectedIndexChanged += new System.EventHandler(this.cmbP3Width_SelectedIndexChanged);
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label9.Location = new System.Drawing.Point(13, 31);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(35, 17);
this.label9.TabIndex = 315;
this.label9.Text = "宽度:";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// FrmMoveEquip
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......@@ -940,6 +1062,8 @@
this.groupDetial.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox7.ResumeLayout(false);
this.groupBox7.PerformLayout();
this.ResumeLayout(false);
}
......@@ -1006,6 +1130,15 @@
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox txtPosId;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.Button btnP3Save;
private System.Windows.Forms.Label label6;
internal System.Windows.Forms.TextBox txtlP3;
private System.Windows.Forms.ListBox listP3;
private System.Windows.Forms.ComboBox cmbP3Height;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.ComboBox cmbP3Width;
private System.Windows.Forms.Label label9;
}
}
......@@ -63,6 +63,7 @@ namespace OnlineStore.AssemblyLine
lblName.Text = equipBean.Name;
this.Text = equipBean.Name;
LoadDP2();
LoadDP3();
LoadDOBtn(groupDO);
if (equipBean.OnlyProOutTray)
......@@ -524,7 +525,27 @@ namespace OnlineStore.AssemblyLine
lblP2.Text = "P2列表:" + equipBean.Config.UpDownP2List;
lblP3List.Text = "P3列表:" + equipBean.Config.UpDownP3List;
}
private void LoadDP3()
{
cmbP3Height.Items.Clear();
foreach (int heigth in LineManager.GetTrayList())
{
cmbP3Height.Items.Add(heigth);
}
cmbP3Width.Items.Clear();
cmbP3Width.Items.AddRange(new object[] { 7, 11, 13, 15 });
cmbP3Width.SelectedIndex = 0;
cmbP3Height.SelectedIndex = 0;
listP3.Items.Clear();
Dictionary<string, int> DP3Map = equipBean.Config.LoadP3DetialMap();
foreach (string key in DP3Map.Keys)
{
listP3.Items.Add(key + "=" + DP3Map[key]);
}
txtlP3.Text = txtP3.Text;
}
private void btnDSave_Click(object sender, EventArgs e)
{
......@@ -715,6 +736,47 @@ namespace OnlineStore.AssemblyLine
txtPosId.Clear();
}
}
private void cmbP3Width_SelectedIndexChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
if (cmbP3Width.SelectedIndex < 0 || cmbP3Height.SelectedIndex < 0)
{
return;
}
int size = Convert.ToInt32(cmbP3Width.Text);
int height = Convert.ToInt32(cmbP3Height.Text);
int position = equipBean.Config.GetUpdownP3Detial(height, size);
txtlP3.Text = position.ToString();
}
private void btnP3Save_Click(object sender, EventArgs e)
{
int size = Convert.ToInt32(cmbP3Width.Text);
int height = Convert.ToInt32(cmbP3Height.Text);
int position = FormUtil.GetIntValue(txtlP3);
DialogResult result = MessageBox.Show("保存后只能修改不能删除,是否确定保存?", "确定保存", MessageBoxButtons.OKCancel);
if (result.Equals(DialogResult.OK))
{
equipBean.Config.UpdateUpdownP3Detial(size, height, position);
LineManager.SaveMoveEquipConfig(equipBean.Config);
LogUtil.info(equipBean.Name + "用户操作:尺寸:" + size + ",高度:" + height + ",P3值:" + position + ",保存成功");
MessageBox.Show("保存成功!");
listP3.Items.Clear();
Dictionary<string, int> DP3Map = equipBean.Config.LoadP3DetialMap();
foreach (string key in DP3Map.Keys)
{
listP3.Items.Add(key + "=" + DP3Map[key]);
}
}
}
}
}
......
......@@ -8,6 +8,7 @@ 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,移栽上下轴仓门口取放点P3详细位置,UpDownP3DetialList,0X0=0;,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,400,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,300,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,300,,
\ No newline at end of file
......@@ -8,3 +8,4 @@ PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,,,,,,,,,,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=8000,,,,,,,,,,,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=9000,,,,,,,,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=8000,,,,,,,,,,,,
PRO,0,移栽上下轴仓门口取放点P3详细位置,UpDownP3DetialList,0X0=0;,,
......@@ -8,3 +8,4 @@ PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=8000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=9000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=8000,,
PRO,0,移栽上下轴仓门口取放点P3详细位置,UpDownP3DetialList,0X0=0;,,
\ No newline at end of file
......@@ -8,3 +8,4 @@ PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=8000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=9000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=8000,,
PRO,0,移栽上下轴仓门口取放点P3详细位置,UpDownP3DetialList,0X0=0;,,
\ No newline at end of file
......@@ -8,3 +8,4 @@ PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=8000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=9000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=8000,,
PRO,0,移栽上下轴仓门口取放点P3详细位置,UpDownP3DetialList,0X0=0;,,
\ No newline at end of file
......@@ -8,3 +8,4 @@ PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=8000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=9000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=8000,,
PRO,0,移栽上下轴仓门口取放点P3详细位置,UpDownP3DetialList,0X0=0;,,
\ No newline at end of file
......@@ -311,12 +311,12 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
}
}
private void UpdownDownP3Move(int trayHeight)
private void UpdownDownP3Move(int trayHeight, int traySize)
{
if (UseAxis)
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
int position = Config.GetUpdownP3(trayHeight);
int position = Config.GetUpdownP3Detial(trayHeight, traySize);
UpdownAxis.AbsMove(MoveInfo, position, Config.UpdownAxis_P3Speed);
}
else
......
......@@ -283,7 +283,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(LineMoveStep.MO_52_CylinderDown);
OutLog("出库 " + MoveInfo.SLog + ": 上下气缸下降 ");
UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
UpdownDownP3Move(MoveInfo.MoveParam.PlateH,MoveInfo.MoveParam.PlateW);
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
}
else
......@@ -324,7 +324,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(LineMoveStep.MO_52_CylinderDown);
OutLog("出库 " + MoveInfo.SLog + ": 上下气缸下降 ");
UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
UpdownDownP3Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
}
else if (MoveInfo.IsStep(LineMoveStep.MO_55_CylinderUp))
{
......@@ -603,7 +603,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(LineMoveStep.MI_11_CylinderDown);
InLog("入库 " + MoveInfo.SLog + " ,上下气缸下降");
UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
UpdownDownP3Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
}
else
{
......
......@@ -82,6 +82,13 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[ConfigProAttribute("UpDownP2DetialList", false)]
public string UpDownP2DetialList { get; set; }
/// <summary>
/// PRO,0,移栽上下轴仓门口取放点P3详细位置,UpDownP3DetialList,0X0=0;,,
/// </summary>
[ConfigProAttribute("UpDownP3DetialList", false)]
public string UpDownP3DetialList { get; set; }
#region P2
private Dictionary<string, int> UpdownP2DetialMap = null;
......@@ -153,6 +160,81 @@ namespace OnlineStore.LoadCSVLibrary
UpDownP2DetialList = newPositionStr;
}
#endregion
#region P3
private Dictionary<string, int> UpdownP3DetialMap = null;
public Dictionary<string, int> LoadP3DetialMap()
{
try
{
if (UpdownP3DetialMap == null)
{
UpdownP3DetialMap = new Dictionary<string, int>();
string[] arrayList = UpDownP3DetialList.Split(';');
foreach (string str in arrayList)
{
string[] arrStr = str.Split('=');
if (arrStr.Length == 2)
{
string key = arrStr[0].Trim().ToUpper();
if (key.Equals("0X0"))
{
continue;
}
int length = Convert.ToInt32(arrStr[1].Trim());
UpdownP3DetialMap.Add(key, length);
}
}
}
}
catch (Exception ex)
{
}
return UpdownP3DetialMap;
}
public int GetUpdownP3Detial(int trayHeight, int traySize = 8)
{
LoadP3DetialMap();
string fkey = traySize + "X" + trayHeight;
if (UpdownP3DetialMap.ContainsKey(fkey))
{
return UpdownP3DetialMap[fkey];
}
else
{
return GetUpdownP3(trayHeight);
}
return -1;
}
public void UpdateUpdownP3Detial(int size, int height, int sizePosition)
{
string fkey = size + "X" + height;
string newPositionStr = "";
if (UpdownP3DetialMap.ContainsKey(fkey))
{
UpdownP3DetialMap[fkey] = sizePosition;
}
else
{
UpdownP3DetialMap.Add(fkey, sizePosition);
}
foreach (string key in UpdownP3DetialMap.Keys)
{
newPositionStr += key + "=" + UpdownP3DetialMap[key] + ";";
}
newPositionStr = newPositionStr.Substring(0, newPositionStr.Length - 1);
UpDownP3DetialList = newPositionStr;
}
#endregion
public void ConfigSpeed(Line_Config config)
{
if (this.UpdownAxis_P1Speed <= 0)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!