Commit 891cc5c7 LN

升降轴增加高度尺寸详细的P2配置,

1 个父辈 e0e17dc7
正在显示 31 个修改的文件 包含 733 行增加35 行删除
...@@ -76,6 +76,15 @@ ...@@ -76,6 +76,15 @@
this.groupBox8 = new System.Windows.Forms.GroupBox(); this.groupBox8 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupDetial = new System.Windows.Forms.GroupBox();
this.btnDSave = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.txtDP2 = new System.Windows.Forms.TextBox();
this.listDetitalP2 = new System.Windows.Forms.ListBox();
this.cmbDHeight = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.cmbDSize = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.groupBox9 = new System.Windows.Forms.GroupBox(); this.groupBox9 = new System.Windows.Forms.GroupBox();
this.btnBP3 = new System.Windows.Forms.Button(); this.btnBP3 = new System.Windows.Forms.Button();
this.txtBP3 = new System.Windows.Forms.TextBox(); this.txtBP3 = new System.Windows.Forms.TextBox();
...@@ -111,6 +120,7 @@ ...@@ -111,6 +120,7 @@
this.groupBox7.SuspendLayout(); this.groupBox7.SuspendLayout();
this.groupBox8.SuspendLayout(); this.groupBox8.SuspendLayout();
this.tabPage2.SuspendLayout(); this.tabPage2.SuspendLayout();
this.groupDetial.SuspendLayout();
this.groupBox9.SuspendLayout(); this.groupBox9.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
...@@ -886,6 +896,7 @@ ...@@ -886,6 +896,7 @@
// //
// tabPage2 // tabPage2
// //
this.tabPage2.Controls.Add(this.groupDetial);
this.tabPage2.Controls.Add(this.groupBox9); this.tabPage2.Controls.Add(this.groupBox9);
this.tabPage2.Controls.Add(this.axisMoveControl1); this.tabPage2.Controls.Add(this.axisMoveControl1);
this.tabPage2.Controls.Add(this.groupBox2); this.tabPage2.Controls.Add(this.groupBox2);
...@@ -897,6 +908,118 @@ ...@@ -897,6 +908,118 @@
this.tabPage2.Text = " 伺服信息 "; this.tabPage2.Text = " 伺服信息 ";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
// //
// groupDetial
//
this.groupDetial.Controls.Add(this.btnDSave);
this.groupDetial.Controls.Add(this.label3);
this.groupDetial.Controls.Add(this.txtDP2);
this.groupDetial.Controls.Add(this.listDetitalP2);
this.groupDetial.Controls.Add(this.cmbDHeight);
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(754, 9);
this.groupDetial.Name = "groupDetial";
this.groupDetial.Size = new System.Drawing.Size(381, 303);
this.groupDetial.TabIndex = 319;
this.groupDetial.TabStop = false;
this.groupDetial.Text = "移栽位置P2详细配置";
//
// btnDSave
//
this.btnDSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDSave.ForeColor = System.Drawing.Color.Blue;
this.btnDSave.Location = new System.Drawing.Point(21, 241);
this.btnDSave.Name = "btnDSave";
this.btnDSave.Size = new System.Drawing.Size(94, 34);
this.btnDSave.TabIndex = 322;
this.btnDSave.Text = "保存";
this.btnDSave.UseVisualStyleBackColor = true;
this.btnDSave.Click += new System.EventHandler(this.btnDSave_Click);
//
// label3
//
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(21, 172);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(94, 17);
this.label3.TabIndex = 321;
this.label3.Text = "升降轴P2位置:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtDP2
//
this.txtDP2.BackColor = System.Drawing.SystemColors.Window;
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(21, 202);
this.txtDP2.MaxLength = 12;
this.txtDP2.Name = "txtDP2";
this.txtDP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtDP2.Size = new System.Drawing.Size(90, 26);
this.txtDP2.TabIndex = 320;
this.txtDP2.Text = "-1";
//
// listDetitalP2
//
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(132, 30);
this.listDetitalP2.Name = "listDetitalP2";
this.listDetitalP2.Size = new System.Drawing.Size(208, 244);
this.listDetitalP2.TabIndex = 319;
this.listDetitalP2.SelectedIndexChanged += new System.EventHandler(this.listDetitalP2_SelectedIndexChanged);
//
// cmbDHeight
//
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(21, 131);
this.cmbDHeight.Name = "cmbDHeight";
this.cmbDHeight.Size = new System.Drawing.Size(90, 28);
this.cmbDHeight.TabIndex = 318;
this.cmbDHeight.SelectedIndexChanged += new System.EventHandler(this.cmbDHeight_SelectedIndexChanged);
//
// label2
//
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(21, 101);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(68, 17);
this.label2.TabIndex = 317;
this.label2.Text = "料盘高度:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// cmbDSize
//
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(21, 60);
this.cmbDSize.Name = "cmbDSize";
this.cmbDSize.Size = new System.Drawing.Size(90, 28);
this.cmbDSize.TabIndex = 316;
this.cmbDSize.SelectedIndexChanged += new System.EventHandler(this.cmbDHeight_SelectedIndexChanged);
//
// label1
//
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(21, 30);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(68, 17);
this.label1.TabIndex = 315;
this.label1.Text = "料盘尺寸:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// groupBox9 // groupBox9
// //
this.groupBox9.Controls.Add(this.btnBP3); this.groupBox9.Controls.Add(this.btnBP3);
...@@ -1020,7 +1143,7 @@ ...@@ -1020,7 +1143,7 @@
// //
this.axisMoveControl1.Location = new System.Drawing.Point(14, 4); this.axisMoveControl1.Location = new System.Drawing.Point(14, 4);
this.axisMoveControl1.Name = "axisMoveControl1"; this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(1058, 315); this.axisMoveControl1.Size = new System.Drawing.Size(734, 315);
this.axisMoveControl1.TabIndex = 219; this.axisMoveControl1.TabIndex = 219;
// //
// groupBox2 // groupBox2
...@@ -1262,6 +1385,8 @@ ...@@ -1262,6 +1385,8 @@
this.groupBox7.ResumeLayout(false); this.groupBox7.ResumeLayout(false);
this.groupBox8.ResumeLayout(false); this.groupBox8.ResumeLayout(false);
this.tabPage2.ResumeLayout(false); this.tabPage2.ResumeLayout(false);
this.groupDetial.ResumeLayout(false);
this.groupDetial.PerformLayout();
this.groupBox9.ResumeLayout(false); this.groupBox9.ResumeLayout(false);
this.groupBox9.PerformLayout(); this.groupBox9.PerformLayout();
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
...@@ -1357,6 +1482,15 @@ ...@@ -1357,6 +1482,15 @@
private System.Windows.Forms.Button btnOutStopDown; private System.Windows.Forms.Button btnOutStopDown;
private System.Windows.Forms.Button btnUpdateShelf; private System.Windows.Forms.Button btnUpdateShelf;
private System.Windows.Forms.TextBox txtShelfID; private System.Windows.Forms.TextBox txtShelfID;
private System.Windows.Forms.GroupBox groupDetial;
private System.Windows.Forms.Button btnDSave;
private System.Windows.Forms.Label label3;
internal System.Windows.Forms.TextBox txtDP2;
private System.Windows.Forms.ListBox listDetitalP2;
private System.Windows.Forms.ComboBox cmbDHeight;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cmbDSize;
private System.Windows.Forms.Label label1;
} }
} }
...@@ -271,6 +271,7 @@ namespace OnlineStore.AssemblyLine ...@@ -271,6 +271,7 @@ namespace OnlineStore.AssemblyLine
{ {
btnSwStop.Visible = false; btnSwStop.Visible = false;
} }
LoadDP2();
txtBp1.Text = equipBean.Config.BatchAxisP1.ToString(); txtBp1.Text = equipBean.Config.BatchAxisP1.ToString();
txtBP2.Text = equipBean.Config.BatchAxisP2.ToString(); txtBP2.Text = equipBean.Config.BatchAxisP2.ToString();
txtBP3.Text = equipBean.Config.BatchAxisP3.ToString(); txtBP3.Text = equipBean.Config.BatchAxisP3.ToString();
...@@ -434,7 +435,7 @@ namespace OnlineStore.AssemblyLine ...@@ -434,7 +435,7 @@ namespace OnlineStore.AssemblyLine
int size = 0; int size = 0;
try { size = Convert.ToInt32(cmbSizeList.Text); } catch (Exception ex) { } try { size = Convert.ToInt32(cmbSizeList.Text); } catch (Exception ex) { }
txtSizePosition.Text = equipBean.Config.GetUpdownPositionP2(size).ToString(); txtSizePosition.Text = equipBean.Config.GetUpdownP2(size).ToString();
btnMoveto.Text = size + "mm盘放料位置P2 :"; btnMoveto.Text = size + "mm盘放料位置P2 :";
} }
...@@ -636,6 +637,101 @@ namespace OnlineStore.AssemblyLine ...@@ -636,6 +637,101 @@ namespace OnlineStore.AssemblyLine
equipBean.CurrShelfId = shel; equipBean.CurrShelfId = shel;
} }
} }
private void LoadDP2()
{
cmbDHeight.Items.Clear();
foreach (int heigth in LineManager.GetTrayList())
{
cmbDHeight.Items.Add(heigth);
}
cmbDSize.Items.Clear();
cmbDSize.Items.AddRange(new object[] { 7, 11, 13, 15 });
cmbDSize.SelectedIndex = 0;
cmbDHeight.SelectedIndex = 0;
listDetitalP2.Items.Clear();
Dictionary<string, int> DP2Map = equipBean.Config.LoadP2DetialMap();
foreach (string key in DP2Map.Keys)
{
listDetitalP2.Items.Add(key + "=" + DP2Map[key]);
}
txtDP2.Text = txtSizePosition.Text;
}
private void btnDSave_Click(object sender, EventArgs e)
{
int size = Convert.ToInt32(cmbDSize.Text);
int height = Convert.ToInt32(cmbDHeight.Text);
int position = FormUtil.GetIntValue(txtDP2);
DialogResult result = MessageBox.Show("保存后只能修改不能删除,是否确定保存?", "确定保存", MessageBoxButtons.OKCancel);
if (result.Equals(DialogResult.OK))
{
equipBean.Config.UpdateUpdownP2Detial(size, height, position);
LineManager.SaveFeedingEquipConfig(equipBean.Config);
LogUtil.info(equipBean.Name + "用户操作:尺寸:" + size + ",高度:" + height + ",P2值:" + position + ",保存成功");
MessageBox.Show("保存成功!");
listDetitalP2.Items.Clear();
Dictionary<string, int> DP2Map = equipBean.Config.LoadP2DetialMap();
foreach (string key in DP2Map.Keys)
{
listDetitalP2.Items.Add(key + "=" + DP2Map[key]);
}
}
}
private void cmbDHeight_SelectedIndexChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
if (cmbDHeight.SelectedIndex < 0 || cmbDSize.SelectedIndex < 0)
{
return;
}
int size = Convert.ToInt32(cmbDSize.Text);
int height = Convert.ToInt32(cmbDHeight.Text);
int position = equipBean.Config.GetUpdownP2Detial(height, size);
txtDP2.Text = position.ToString();
}
private void listDetitalP2_SelectedIndexChanged(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(listDetitalP2.Text) || (!IsLoad))
{
return;
}
string text = listDetitalP2.Text;
try
{
string[] arrStr = text.Split('=');
if (arrStr.Length == 2)
{
string[] datastr = arrStr[0].Split('X');
if (datastr.Length.Equals(2))
{
int size = Convert.ToInt32(datastr[0]);
int height = Convert.ToInt32(datastr[1]);
int position = Convert.ToInt32(arrStr[1]);
cmbDHeight.Text = height.ToString();
cmbDSize.Text = size.ToString();
txtDP2.Text = equipBean.Config.GetUpdownP2Detial(height, size).ToString();
}
}
}
catch (Exception ex)
{
}
}
} }
} }
......
...@@ -39,29 +39,25 @@ namespace OnlineStore.AssemblyLine ...@@ -39,29 +39,25 @@ namespace OnlineStore.AssemblyLine
if (equipBean.UseAxis) if (equipBean.UseAxis)
{ {
axisMoveControl1.LoadData(equipBean, new AxisBean[] { equipBean.UpdownAxis }); axisMoveControl1.LoadData(equipBean, new AxisBean[] { equipBean.UpdownAxis });
btnUpDownUp.Visible = false; btnUpDownUp.Visible = false;
} }
else else
{ {
tabControl1.TabPages.Remove(tabPage2); tabControl1.TabPages.Remove(tabPage2);
btnUpDownUp.Visible = true; btnUpDownUp.Visible = true;
} }
cmbSizeList.Items.Clear(); cmbSizeList.Items.Clear();
cmbSizeList.Items.Add("0=默认位置"); cmbSizeList.Items.Add("0=默认位置");
foreach (int heigth in LineManager.GetTrayList()) foreach (int heigth in LineManager.GetTrayList())
{ {
cmbSizeList.Items.Add(heigth); cmbSizeList.Items.Add(heigth);
} }
//for (int i = 8; i <= 48; i = i + 4)
//{
// cmbSizeList.Items.Add(i.ToString());
//}
cmbSizeList.SelectedIndex = 0; cmbSizeList.SelectedIndex = 0;
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, equipBean.runStatus); lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, equipBean.runStatus);
lblThisSta.Text = equipBean.WarnMsg; lblThisSta.Text = equipBean.WarnMsg;
txtP1.Text = equipBean.Config.UpDownAxisP1.ToString(); txtP1.Text = equipBean.Config.UpDownAxisP1.ToString();
lblName.Text = equipBean.Name; lblName.Text = equipBean.Name;
LoadDP2();
IsLoad = true; IsLoad = true;
} }
...@@ -476,9 +472,101 @@ namespace OnlineStore.AssemblyLine ...@@ -476,9 +472,101 @@ namespace OnlineStore.AssemblyLine
} }
private void groupBox1_Enter(object sender, EventArgs e)
private void LoadDP2()
{
cmbDHeight.Items.Clear();
foreach (int heigth in LineManager.GetTrayList())
{
cmbDHeight.Items.Add(heigth);
}
cmbDSize.Items.Clear();
cmbDSize.Items.AddRange(new object[] { 7, 11, 13, 15 });
cmbDSize.SelectedIndex = 0;
cmbDHeight.SelectedIndex = 0;
listDetitalP2.Items.Clear();
Dictionary<string, int> DP2Map = equipBean.Config.LoadP2DetialMap();
foreach (string key in DP2Map.Keys)
{
listDetitalP2.Items.Add(key + "=" + DP2Map[key]);
}
txtDP2.Text = txtP2.Text;
}
private void btnDSave_Click(object sender, EventArgs e)
{
int size = Convert.ToInt32(cmbDSize.Text);
int height = Convert.ToInt32(cmbDHeight.Text);
int position = FormUtil.GetIntValue(txtDP2);
DialogResult result = MessageBox.Show("保存后只能修改不能删除,是否确定保存?", "确定保存",MessageBoxButtons.OKCancel);
if (result.Equals(DialogResult.OK))
{
equipBean.Config.UpdateUpdownP2Detial(size, height, position);
LineManager.SaveMoveEquipConfig(equipBean.Config);
LogUtil.info(equipBean.Name + "用户操作:尺寸:" + size + ",高度:" + height + ",P2值:" + position + ",保存成功");
MessageBox.Show("保存成功!");
listDetitalP2.Items.Clear();
Dictionary<string, int> DP2Map = equipBean.Config.LoadP2DetialMap();
foreach (string key in DP2Map.Keys)
{
listDetitalP2.Items.Add(key + "=" + DP2Map[key]);
}
}
}
private void cmbDHeight_SelectedIndexChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
if (cmbDHeight.SelectedIndex < 0 || cmbDSize.SelectedIndex < 0)
{
return;
}
int size = Convert.ToInt32(cmbDSize.Text);
int height = Convert.ToInt32(cmbDHeight.Text);
int position = equipBean.Config.GetUpdownP2Detial( height, size);
txtDP2.Text = position.ToString();
}
private void listDetitalP2_SelectedIndexChanged(object sender, EventArgs e)
{ {
if (String.IsNullOrEmpty(listDetitalP2.Text) || (!IsLoad))
{
return;
}
string text = listDetitalP2.Text;
try
{
string[] arrStr = text.Split('=');
if (arrStr.Length == 2)
{
string[] datastr = arrStr[0].Split('X');
if (datastr.Length.Equals(2))
{
int size = Convert.ToInt32(datastr[0]);
int height = Convert.ToInt32(datastr[1]);
int position = Convert.ToInt32(arrStr[1]);
cmbDHeight.Text = height.ToString();
cmbDSize.Text = size.ToString();
txtDP2.Text = equipBean.Config.GetUpdownP2Detial(height,size).ToString();
}
}
}
catch(Exception ex)
{
}
} }
} }
......
...@@ -55,6 +55,7 @@ namespace OnlineStore.AssemblyLine ...@@ -55,6 +55,7 @@ namespace OnlineStore.AssemblyLine
tabControl1.TabPages.Remove(tabPage2); tabControl1.TabPages.Remove(tabPage2);
btnUpDownUp.Visible = true; btnUpDownUp.Visible = true;
} }
LoadDP2();
chbDebug.Checked = equipBean.IsDebug; chbDebug.Checked = equipBean.IsDebug;
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, equipBean.runStatus); lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, equipBean.runStatus);
...@@ -428,6 +429,103 @@ namespace OnlineStore.AssemblyLine ...@@ -428,6 +429,103 @@ namespace OnlineStore.AssemblyLine
LineManager.SaveProvidingEquipConfig(equipBean.Config); LineManager.SaveProvidingEquipConfig(equipBean.Config);
MessageBox.Show("保存成功!"); MessageBox.Show("保存成功!");
} }
private void LoadDP2()
{
cmbDHeight.Items.Clear();
foreach (int heigth in LineManager.GetTrayList())
{
cmbDHeight.Items.Add(heigth);
}
cmbDSize.Items.Clear();
cmbDSize.Items.AddRange(new object[] { 7, 11, 13, 15 });
cmbDSize.SelectedIndex = 0;
cmbDHeight.SelectedIndex = 0;
listDetitalP2.Items.Clear();
Dictionary<string, int> DP2Map = equipBean.Config.LoadP2DetialMap();
foreach (string key in DP2Map.Keys)
{
listDetitalP2.Items.Add(key + "=" + DP2Map[key]);
}
txtDP2.Text = txtP2.Text;
}
private void btnDSave_Click(object sender, EventArgs e)
{
int size = Convert.ToInt32(cmbDSize.Text);
int height = Convert.ToInt32(cmbDHeight.Text);
int position = FormUtil.GetIntValue(txtDP2);
DialogResult result = MessageBox.Show("保存后只能修改不能删除,是否确定保存?", "确定保存", MessageBoxButtons.OKCancel);
if (result.Equals(DialogResult.OK))
{
equipBean.Config.UpdateUpdownP2Detial(size, height, position);
LineManager.SaveProvidingEquipConfig(equipBean.Config);
LogUtil.info(equipBean.Name + "用户操作:尺寸:" + size + ",高度:" + height + ",P2值:" + position + ",保存成功");
MessageBox.Show("保存成功!");
listDetitalP2.Items.Clear();
Dictionary<string, int> DP2Map = equipBean.Config.LoadP2DetialMap();
foreach (string key in DP2Map.Keys)
{
listDetitalP2.Items.Add(key + "=" + DP2Map[key]);
}
}
}
private void cmbDHeight_SelectedIndexChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
if (cmbDHeight.SelectedIndex < 0 || cmbDSize.SelectedIndex < 0)
{
return;
}
int size = Convert.ToInt32(cmbDSize.Text);
int height = Convert.ToInt32(cmbDHeight.Text);
int position = equipBean.Config.GetUpdownP2Detial(height, size);
txtDP2.Text = position.ToString();
}
private void listDetitalP2_SelectedIndexChanged(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(listDetitalP2.Text) || (!IsLoad))
{
return;
}
string text = listDetitalP2.Text;
try
{
string[] arrStr = text.Split('=');
if (arrStr.Length == 2)
{
string[] datastr = arrStr[0].Split('X');
if (datastr.Length.Equals(2))
{
int size = Convert.ToInt32(datastr[0]);
int height = Convert.ToInt32(datastr[1]);
int position = Convert.ToInt32(arrStr[1]);
cmbDHeight.Text = height.ToString();
cmbDSize.Text = size.ToString();
txtDP2.Text = equipBean.Config.GetUpdownP2Detial(height, size).ToString();
}
}
}
catch (Exception ex)
{
}
}
} }
} }
......
...@@ -181,7 +181,32 @@ Config_MoveEquip_10.csv ...@@ -181,7 +181,32 @@ Config_MoveEquip_10.csv
PRO,0,是否存放的大料盘,IsBigTray,1,,,,, PRO,0,是否存放的大料盘,IsBigTray,1,,,,,
20200301
1.升降轴增加高度尺寸详细的P2配置,
需要修改配置文件,
Config_MoveEquip_03.csv
Config_MoveEquip_04.csv
Config_MoveEquip_05.csv
Config_MoveEquip_06.csv
Config_MoveEquip_07.csv
Config_MoveEquip_10.csv
Config_FeedingEquip_1.csv
Config_FeedingEquip_2.csv
Config_FeedingEquip_3.csv
Config_FeedingEquip_4.csv
Config_ProvidingEquip_1.csv
Config_ProvidingEquip_2.csv
Config_ProvidingEquip_3.csv
Config_ProvidingEquip_4.csv
以上配置文件增加一行配置:
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
......
...@@ -6,6 +6,7 @@ PRO,0,对应的横移模块,SidesWayNum,1,,,,, ...@@ -6,6 +6,7 @@ PRO,0,对应的横移模块,SidesWayNum,1,,,,,
PRO,0,是否是用来出料,IsCanOut,0,,,,, PRO,0,是否是用来出料,IsCanOut,0,,,,,
PRO,0,上料流水线入口AGV小车站号名称,AgvInName,D5,,,,, PRO,0,上料流水线入口AGV小车站号名称,AgvInName,D5,,,,,
PRO,0,上料流水线出口AGV小车站号名称,AgvOutName,D6,,,,, PRO,0,上料流水线出口AGV小车站号名称,AgvOutName,D6,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,,,,,, ,,,,,,,,,
AXIS,0,轴二提升上料轴,Batch_Axis,1,COM6,0,,, AXIS,0,轴二提升上料轴,Batch_Axis,1,COM6,0,,,
PRO,0,提升上料轴上升待机点 P1,BatchAxisP1,6504500,,,,, PRO,0,提升上料轴上升待机点 P1,BatchAxisP1,6504500,,,,,
......
...@@ -6,6 +6,7 @@ PRO,0,对应的横移模块,SidesWayNum,0,,,,, ...@@ -6,6 +6,7 @@ PRO,0,对应的横移模块,SidesWayNum,0,,,,,
PRO,0,是否是用来出料,IsCanOut,0,,,,, PRO,0,是否是用来出料,IsCanOut,0,,,,,
PRO,0,上料流水线入口AGV小车站号名称,AgvInName,D3,,,,, PRO,0,上料流水线入口AGV小车站号名称,AgvInName,D3,,,,,
PRO,0,上料流水线出口AGV小车站号名称,AgvOutName,D4,,,,, PRO,0,上料流水线出口AGV小车站号名称,AgvOutName,D4,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,,,,,, ,,,,,,,,,
AXIS,0,轴二提升上料轴,Batch_Axis,3,COM6,0,,, AXIS,0,轴二提升上料轴,Batch_Axis,3,COM6,0,,,
PRO,0,提升上料轴上升待机点 P1,BatchAxisP1,6573000,,,,, PRO,0,提升上料轴上升待机点 P1,BatchAxisP1,6573000,,,,,
......
...@@ -6,6 +6,7 @@ PRO,0,对应的横移模块,SidesWayNum,2,,,,, ...@@ -6,6 +6,7 @@ PRO,0,对应的横移模块,SidesWayNum,2,,,,,
PRO,0,是否是用来出料,IsCanOut,0,,,,, PRO,0,是否是用来出料,IsCanOut,0,,,,,
PRO,0,上料流水线入口AGV小车站号名称,AgvInName,D1,,,,, PRO,0,上料流水线入口AGV小车站号名称,AgvInName,D1,,,,,
PRO,0,上料流水线出口AGV小车站号名称,AgvOutName,D2,,,,, PRO,0,上料流水线出口AGV小车站号名称,AgvOutName,D2,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,,,,,, ,,,,,,,,,
AXIS,0,轴二提升上料轴,Batch_Axis,5,COM6,0,,, AXIS,0,轴二提升上料轴,Batch_Axis,5,COM6,0,,,
PRO,0,提升上料轴上升待机点 P1,BatchAxisP1,6488350,,,,, PRO,0,提升上料轴上升待机点 P1,BatchAxisP1,6488350,,,,,
......
...@@ -6,6 +6,7 @@ PRO,0,对应的横移模块,SidesWayNum,3,,,,, ...@@ -6,6 +6,7 @@ PRO,0,对应的横移模块,SidesWayNum,3,,,,,
PRO,0,是否是用来出料,IsCanOut,1,,,,, PRO,0,是否是用来出料,IsCanOut,1,,,,,
PRO,0,上料流水线入口AGV小车站号名称,AgvInName,D7,,,,, PRO,0,上料流水线入口AGV小车站号名称,AgvInName,D7,,,,,
PRO,0,上料流水线出口AGV小车站号名称,AgvOutName,D8,,,,, PRO,0,上料流水线出口AGV小车站号名称,AgvOutName,D8,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,,,,,, ,,,,,,,,,
AXIS,0,轴二提升上料轴,Batch_Axis,7,COM6,0,,, AXIS,0,轴二提升上料轴,Batch_Axis,7,COM6,0,,,
PRO,0,提升上料轴上升待机点 P1,BatchAxisP1,6508000,,,,, PRO,0,提升上料轴上升待机点 P1,BatchAxisP1,6508000,,,,,
......
...@@ -3,6 +3,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,, ...@@ -3,6 +3,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,对应的横移模块,SidesWayNum,0,,,,, PRO,0,对应的横移模块,SidesWayNum,0,,,,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,,,,, PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,,,,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,,,,, PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,, ,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,15,COM6,0,,, AXIS,0,移栽上下轴,UpDown_Axis,15,COM6,0,,,
......
...@@ -3,6 +3,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,, ...@@ -3,6 +3,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,对应的横移模块,SidesWayNum,0,,,,, PRO,0,对应的横移模块,SidesWayNum,0,,,,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,,,,, PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,,,,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,2,,,,, PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,2,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,, ,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,16,COM6,0,,, AXIS,0,移栽上下轴,UpDown_Axis,16,COM6,0,,,
......
...@@ -3,6 +3,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,, ...@@ -3,6 +3,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,对应的横移模块,SidesWayNum,0,,,,, PRO,0,对应的横移模块,SidesWayNum,0,,,,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,2,,,,, PRO,0,设备对应的出料流水线的编号,DLineEquipNum,2,,,,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,,,,, PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,, ,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,9,COM6,0,,, AXIS,0,移栽上下轴,UpDown_Axis,9,COM6,0,,,
......
...@@ -3,6 +3,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,, ...@@ -3,6 +3,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
PRO,0,对应的横移模块,SidesWayNum,4,,,,, PRO,0,对应的横移模块,SidesWayNum,4,,,,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,2,,,,, PRO,0,设备对应的出料流水线的编号,DLineEquipNum,2,,,,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,2,,,,, PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,2,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,, ,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,10,COM6,0,,, AXIS,0,移栽上下轴,UpDown_Axis,10,COM6,0,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
PRO,0,是否存放的大料盘,IsBigTray,1,,,,, PRO,0,是否存放的大料盘,IsBigTray,1,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,11,COM6,0,,, AXIS,0,移栽上下轴,UpDown_Axis,11,COM6,0,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
PRO,0,是否存放的大料盘,IsBigTray,1,,,,, PRO,0,是否存放的大料盘,IsBigTray,1,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,12,COM6,0,,, AXIS,0,移栽上下轴,UpDown_Axis,12,COM6,0,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
PRO,0,是否存放的大料盘,IsBigTray,1,,,,, PRO,0,是否存放的大料盘,IsBigTray,1,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,13,COM6,0,,, AXIS,0,移栽上下轴,UpDown_Axis,13,COM6,0,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
PRO,0,是否存放的大料盘,IsBigTray,1,,,,, PRO,0,是否存放的大料盘,IsBigTray,1,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,14,COM6,0,,, AXIS,0,移栽上下轴,UpDown_Axis,14,COM6,0,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
PRO,0,是否存放的大料盘,IsBigTray,1,,,,, PRO,0,是否存放的大料盘,IsBigTray,1,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,17,COM6,0,,, AXIS,0,移栽上下轴,UpDown_Axis,17,COM6,0,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
PRO,0,是否存放的大料盘,IsBigTray,1,,,,, PRO,0,是否存放的大料盘,IsBigTray,1,,,,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,18,COM6,0,,, AXIS,0,移栽上下轴,UpDown_Axis,18,COM6,0,,,
......
...@@ -64,10 +64,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -64,10 +64,11 @@ namespace OnlineStore.DeviceLibrary
if (Config.SidesWayNum > 0) if (Config.SidesWayNum > 0)
{ {
bool canProcess = (LineManager.Line.SwNoProcess(Config.SidesWayNum)); bool canProcess = (LineManager.Line.SwNoProcess(Config.SidesWayNum));
if (IOValue(IO_Type.SW_TrayCheck).Equals(IO_VALUE.HIGH) && canProcess) if (IOValue(IO_Type.SW_TrayCheck).Equals(IO_VALUE.HIGH) )
{ {
if (TrayManager.checkWatch(swWaitWatch, TrayManager.SwTrayWaitTime, true)) if (TrayManager.checkWatch(swWaitWatch, TrayManager.SwTrayWaitTime, true) && canProcess)
{ {
swWaitWatch.Stop();
UpdateTrayNum(); UpdateTrayNum();
//判断是否是需要的托盘 //判断是否是需要的托盘
if (CurrTrayIsNeed(currTrayNum, true)) if (CurrTrayIsNeed(currTrayNum, true))
...@@ -83,14 +84,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -83,14 +84,16 @@ namespace OnlineStore.DeviceLibrary
} }
} }
} }
else if (Config.SidesWayNum.Equals(2) && IOValue(IO_Type.SW_StopCheck).Equals(IO_VALUE.HIGH) && canProcess else if (Config.SidesWayNum.Equals(2) && IOValue(IO_Type.SW_StopCheck).Equals(IO_VALUE.HIGH)
&& (DateTime.Now - lastStopDown).TotalSeconds > 2.5) && (DateTime.Now - lastStopDown).TotalSeconds > 3)
{ {
if (TrayManager.checkWatch(swWaitWatch, TrayManager.SwTrayWaitTime, true)) if (TrayManager.checkWatch(swWaitWatch, TrayManager.SwTrayWaitTime, true) && canProcess)
{ {
swWaitWatch.Stop();
SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam); SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam);
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_Stop1Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_Stop1Down);
CheckLog("检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,等待 SW_StopCheck=0" ); LogUtil.info(Name+ "检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,等待 SW_StopCheck=0" );
//CheckLog("检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,等待 SW_StopCheck=0" );
IOMove(IO_Type.SW_StopDown, IO_VALUE.HIGH); IOMove(IO_Type.SW_StopDown, IO_VALUE.HIGH);
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime)); // SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_StopDown, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_StopDown, IO_VALUE.HIGH));
...@@ -701,7 +704,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -701,7 +704,7 @@ namespace OnlineStore.DeviceLibrary
if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_11_CodeRember)) if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_11_CodeRember))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_21_UpdownAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FI_21_UpdownAxisToP2);
int targetPositon = Config.GetUpdownPositionP2(LastHeight); int targetPositon = Config.GetUpdownP2Detial(LastHeight, LastWidth);
InLog("料盘移栽" + MoveInfo.SLog + ":移栽伺服下降到P2:" + targetPositon + ",托盘号【" + currTrayNum + "】,获取库位号,更新托盘信息"); InLog("料盘移栽" + MoveInfo.SLog + ":移栽伺服下降到P2:" + targetPositon + ",托盘号【" + currTrayNum + "】,获取库位号,更新托盘信息");
UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed); UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
......
...@@ -386,7 +386,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -386,7 +386,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_212_CylinderTake)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_212_CylinderTake))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_213_UpdownAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FO_213_UpdownAxisToP2);
int targetP = Config.GetUpdownPositionP2(MoveInfo.MoveParam.PlateH); int targetP = Config.GetUpdownP2Detial(MoveInfo.MoveParam.PlateH,MoveInfo.MoveParam.PlateW);
OutLog("紧急出料" + MoveInfo.SLog + ":升降伺服下降到P2:" + targetP); OutLog("紧急出料" + MoveInfo.SLog + ":升降伺服下降到P2:" + targetP);
UpdownAxis.AbsMove(MoveInfo, targetP, Config.UpdownAxis_P2Speed); UpdownAxis.AbsMove(MoveInfo, targetP, Config.UpdownAxis_P2Speed);
} }
......
...@@ -309,11 +309,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -309,11 +309,11 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private void UpdownDownP2Move(int trayHeight) private void UpdownDownP2Move(int trayHeight,int traySize)
{ {
if (UseAxis) if (UseAxis)
{ {
int position = Config.GetUpdownP2(trayHeight); int position = Config.GetUpdownP2Detial(trayHeight,traySize);
UpdownAxis.AbsMove(MoveInfo, position, Config.UpdownAxis_P2Speed); UpdownAxis.AbsMove(MoveInfo, position, Config.UpdownAxis_P2Speed);
} }
else else
......
...@@ -137,7 +137,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -137,7 +137,7 @@ namespace OnlineStore.DeviceLibrary
//更新料盘位置 //更新料盘位置
SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.INLINE, "E" + trayNum.ToString().PadLeft(2, '0')); SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.INLINE, "E" + trayNum.ToString().PadLeft(2, '0'));
UpdownDownP2Move(MoveInfo.MoveParam.PlateH); UpdownDownP2Move(MoveInfo.MoveParam.PlateH,MoveInfo.MoveParam.PlateW);
} }
//} //}
//else if (MoveInfo.IsTimeOut(180)) //else if (MoveInfo.IsTimeOut(180))
...@@ -248,7 +248,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -248,7 +248,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.MI_06_CylinderDown); MoveInfo.NextMoveStep(LineMoveStep.MI_06_CylinderDown);
InLog("入库 " + MoveInfo.SLog + ": 升降下降"); InLog("入库 " + MoveInfo.SLog + ": 升降下降");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
UpdownDownP2Move(MoveInfo.MoveParam.PlateH); UpdownDownP2Move(MoveInfo.MoveParam.PlateH,MoveInfo.MoveParam.PlateW);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_06_CylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_06_CylinderDown))
{ {
......
...@@ -233,11 +233,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -233,11 +233,11 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private void UpdownDownP2Move(int trayHeight) private void UpdownDownP2Move(int trayHeight,int traySize)
{ {
if (UseAxis) if (UseAxis)
{ {
int position = Config.GetUpdownP2(trayHeight); int position = Config.GetUpdownP2Detial(trayHeight,traySize);
UpdownAxis.AbsMove(MoveInfo, position, Config.UpdownAxis_P2Speed); UpdownAxis.AbsMove(MoveInfo, position, Config.UpdownAxis_P2Speed);
} }
else else
......
...@@ -35,10 +35,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -35,10 +35,11 @@ namespace OnlineStore.DeviceLibrary
{ {
bool canProcess = (LineManager.Line.SwNoProcess(Config.SidesWayNum)); bool canProcess = (LineManager.Line.SwNoProcess(Config.SidesWayNum));
//int num = TrayManager.GetTrayNum(DeviceID); //int num = TrayManager.GetTrayNum(DeviceID);
if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH) && canProcess) if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH) )
{ {
if (TrayManager.checkWatch(trayCheckWait, TrayManager.SwTrayWaitTime, true)) if (TrayManager.checkWatch(trayCheckWait, TrayManager.SwTrayWaitTime, true) && canProcess)
{ {
trayCheckWait.Stop();
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + "阻挡气缸1-1上升)"); CheckLog("托盘阻挡" + SecondMoveInfo.SLog + "阻挡气缸1-1上升)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down);
...@@ -47,10 +48,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -47,10 +48,11 @@ namespace OnlineStore.DeviceLibrary
} }
} }
else if (IOValue(IO_Type.StopCylinder_Check1).Equals(IO_VALUE.HIGH) && canProcess) else if (IOValue(IO_Type.StopCylinder_Check1).Equals(IO_VALUE.HIGH) )
{ {
if (TrayManager.checkWatch(trayCheckWait, TrayManager.SwTrayWaitTime, true)) if (TrayManager.checkWatch(trayCheckWait, TrayManager.SwTrayWaitTime, true) && canProcess)
{ {
trayCheckWait.Stop();
//托盘在第一个阻挡处 //托盘在第一个阻挡处
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_Stop1Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_Stop1Down);
...@@ -392,7 +394,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -392,7 +394,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.PO_01_CylinderDown); MoveInfo.NextMoveStep(LineMoveStep.PO_01_CylinderDown);
LogInfo(" " + MoveInfo.SLog + " : 上下气缸下降"); LogInfo(" " + MoveInfo.SLog + " : 上下气缸下降");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
UpdownDownP2Move(MoveInfo.MoveParam.PlateH); UpdownDownP2Move(MoveInfo.MoveParam.PlateH,MoveInfo.MoveParam.PlateW);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_01_CylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_01_CylinderDown))
{ {
......
...@@ -183,6 +183,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -183,6 +183,7 @@ namespace OnlineStore.DeviceLibrary
{ {
continue; continue;
} }
LogUtil.info(" 摄像机【" + cameraName + "】开始获取图片");
using (Bitmap bitmap = GetCamerImage(cameraName)) using (Bitmap bitmap = GetCamerImage(cameraName))
{ {
if (bitmap == null) if (bitmap == null)
...@@ -192,10 +193,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -192,10 +193,10 @@ namespace OnlineStore.DeviceLibrary
continue; continue;
} }
LogUtil.debug(" 摄像机【" + cameraName + "】获取图片完成"); LogUtil.info(" 【" + cameraName + "】获取图片完成,开始转换图片");
System.Threading.Thread.Sleep(1); System.Threading.Thread.Sleep(1);
HalconDotNet.HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap); HalconDotNet.HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap);
LogUtil.debug(" 摄像机【" + cameraName + "】转换图片完成,开始扫码"); LogUtil.info(" 【" + cameraName + "】转换图片完成,开始扫码");
List<CodeInfo> cc = new List<CodeInfo>(); List<CodeInfo> cc = new List<CodeInfo>();
string r = ""; string r = "";
foreach (string codeType in codeTypeList) foreach (string codeType in codeTypeList)
...@@ -218,7 +219,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -218,7 +219,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.debug(" 【" + cameraName + "】【" + codeType + "】扫码完成:" + r); LogUtil.debug(" 【" + cameraName + "】【" + codeType + "】扫码完成:" + r);
} }
LogUtil.info(" [" + cameraName + "] 扫码完成:" + r); LogUtil.info("【" + cameraName + "】扫码完成:" + r);
ho_Image.Dispose(); ho_Image.Dispose();
bitmap.Dispose(); bitmap.Dispose();
} }
......
...@@ -215,6 +215,83 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -215,6 +215,83 @@ namespace OnlineStore.LoadCSVLibrary
public int IsCanOut { get; set; } public int IsCanOut { get; set; }
/// <summary>
/// PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7*16=80000;,,,,,
/// </summary>
[ConfigProAttribute("UpDownP2DetialList", false)]
public string UpDownP2DetialList { get; set; }
private Dictionary<string, int> UpdownP2DetialMap = null;
public Dictionary<string, int> LoadP2DetialMap()
{
try
{
if (UpdownP2DetialMap == null)
{
UpdownP2DetialMap = new Dictionary<string, int>();
string[] arrayList = UpDownP2DetialList.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());
UpdownP2DetialMap.Add(key, length);
}
}
}
}
catch (Exception ex)
{
}
return UpdownP2DetialMap;
}
public int GetUpdownP2Detial(int trayHeight, int traySize = 8)
{
LoadP2DetialMap();
string fkey = traySize + "X" + trayHeight;
if (UpdownP2DetialMap.ContainsKey(fkey))
{
return UpdownP2DetialMap[fkey];
}
else
{
return GetUpdownP2(trayHeight);
}
return -1;
}
public void UpdateUpdownP2Detial(int size, int height, int sizePosition)
{
string fkey = size + "X" + height;
string newPositionStr = "";
if (UpdownP2DetialMap.ContainsKey(fkey))
{
UpdownP2DetialMap[fkey] = sizePosition;
}
else
{
UpdownP2DetialMap.Add(fkey, sizePosition);
}
foreach (string key in UpdownP2DetialMap.Keys)
{
newPositionStr += key + "=" + UpdownP2DetialMap[key] + ";";
}
newPositionStr = newPositionStr.Substring(0, newPositionStr.Length - 1);
UpDownP2DetialList = newPositionStr;
}
private List<string> CameraList = null; private List<string> CameraList = null;
public List<string> GetCameraList() public List<string> GetCameraList()
...@@ -236,7 +313,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -236,7 +313,7 @@ namespace OnlineStore.LoadCSVLibrary
} }
private Dictionary<int, int> UpDownPositionP2Map = null; private Dictionary<int, int> UpDownPositionP2Map = null;
public int GetUpdownPositionP2(int trayHeight) public int GetUpdownP2(int trayHeight)
{ {
try try
{ {
......
...@@ -109,13 +109,93 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -109,13 +109,93 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
[ConfigProAttribute("UpdownAxis_P3Speed", false)] [ConfigProAttribute("UpdownAxis_P3Speed", false)]
public int UpdownAxis_P3Speed { get; set; } public int UpdownAxis_P3Speed { get; set; }
/// <summary>
/// PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7*16=80000;,,,,,
/// </summary>
[ConfigProAttribute("UpDownP2DetialList", false)]
public string UpDownP2DetialList { get; set; }
private Dictionary<string, int> UpdownP2DetialMap = null;
public Dictionary<string, int> LoadP2DetialMap()
{
try
{
if (UpdownP2DetialMap == null)
{
UpdownP2DetialMap = new Dictionary<string, int>();
string[] arrayList = UpDownP2DetialList.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());
UpdownP2DetialMap.Add(key, length);
}
}
}
}
catch (Exception ex)
{
}
return UpdownP2DetialMap;
}
public int GetUpdownP2Detial( int trayHeight, int traySize=8)
{
LoadP2DetialMap();
string fkey = traySize + "X" + trayHeight;
if (UpdownP2DetialMap.ContainsKey(fkey))
{
return UpdownP2DetialMap[fkey];
}
else
{
return GetUpdownP2(trayHeight);
}
return -1;
}
public void UpdateUpdownP2Detial(int size,int height, int sizePosition)
{
string fkey = size + "X" + height;
string newPositionStr = "";
if (UpdownP2DetialMap.ContainsKey(fkey))
{
UpdownP2DetialMap[fkey] = sizePosition;
}
else
{
UpdownP2DetialMap.Add(fkey, sizePosition);
}
foreach (string key in UpdownP2DetialMap.Keys)
{
newPositionStr += key + "=" + UpdownP2DetialMap[key] + ";";
}
newPositionStr = newPositionStr.Substring(0, newPositionStr.Length - 1);
UpDownP2DetialList = newPositionStr;
}
///// <summary>s ///// <summary>s
///// PRO,0,移栽上下轴下降速度,UpdownAxis_DownSpeed,500,,,,, ///// PRO,0,移栽上下轴下降速度,UpdownAxis_DownSpeed,500,,,,,
///// </summary> ///// </summary>
//[ConfigProAttribute("UpdownAxis_DownSpeed", false)] //[ConfigProAttribute("UpdownAxis_DownSpeed", false)]
//public int UpdownAxis_DownSpeed { get; set; } //public int UpdownAxis_DownSpeed { get; set; }
private Dictionary<int, int> UpDownP2Map = null; private Dictionary<int, int> UpDownP2Map = null;
public int GetUpdownP2(int trayHeight) public int GetUpdownP2(int trayHeight)
{ {
try try
{ {
......
...@@ -118,7 +118,87 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -118,7 +118,87 @@ namespace OnlineStore.LoadCSVLibrary
/// PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,500,,,,, /// PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,500,,,,,
/// </summary> /// </summary>
[ConfigProAttribute("UpdownAxis_P3Speed", false)] [ConfigProAttribute("UpdownAxis_P3Speed", false)]
public int UpdownAxis_P3Speed { get; set; } public int UpdownAxis_P3Speed { get; set; }
/// <summary>
/// PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7*16=80000;,,,,,
/// </summary>
[ConfigProAttribute("UpDownP2DetialList", false)]
public string UpDownP2DetialList { get; set; }
private Dictionary<string, int> UpdownP2DetialMap = null;
public Dictionary<string, int> LoadP2DetialMap()
{
try
{
if (UpdownP2DetialMap == null)
{
UpdownP2DetialMap = new Dictionary<string, int>();
string[] arrayList = UpDownP2DetialList.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());
UpdownP2DetialMap.Add(key, length);
}
}
}
}
catch (Exception ex)
{
}
return UpdownP2DetialMap;
}
public int GetUpdownP2Detial(int trayHeight, int traySize = 8)
{
LoadP2DetialMap();
string fkey = traySize + "X" + trayHeight;
if (UpdownP2DetialMap.ContainsKey(fkey))
{
return UpdownP2DetialMap[fkey];
}
else
{
return GetUpdownP2(trayHeight);
}
return -1;
}
public void UpdateUpdownP2Detial(int size, int height, int sizePosition)
{
string fkey = size + "X" + height;
string newPositionStr = "";
if (UpdownP2DetialMap.ContainsKey(fkey))
{
UpdownP2DetialMap[fkey] = sizePosition;
}
else
{
UpdownP2DetialMap.Add(fkey, sizePosition);
}
foreach (string key in UpdownP2DetialMap.Keys)
{
newPositionStr += key + "=" + UpdownP2DetialMap[key] + ";";
}
newPositionStr = newPositionStr.Substring(0, newPositionStr.Length - 1);
UpDownP2DetialList = newPositionStr;
}
///// <summary>s ///// <summary>s
///// PRO,0,移栽上下轴下降速度,UpdownAxis_DownSpeed,500,,,,, ///// PRO,0,移栽上下轴下降速度,UpdownAxis_DownSpeed,500,,,,,
///// </summary> ///// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!