Commit e00a84eb LN

入料最后一盘报警

1 个父辈 42331e87
......@@ -59,6 +59,7 @@ namespace OnlineStore.AssemblyLine
{
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName);
control.Click += Control_Click;
this.tableLayoutPanel2.Controls.Add(control, 0, roleindex);
roleindex++;
DOControlList.Add(ioValue.ProName, control);
......@@ -70,6 +71,17 @@ namespace OnlineStore.AssemblyLine
cmbWriteIO.DisplayMember = "DisplayStr";
}
private void Control_Click(object sender, EventArgs e)
{
IOTextControl control = (IOTextControl)sender;
string name = control.Name.Substring(3, control.Name.Length - 3);
List<string> keyList = new List<string>(DOControlList.Keys);
int index = keyList.IndexOf(name);
if (index >= 0)
{
cmbWriteIO.SelectedIndex = index;
}
}
private LineTurnBean dlineRun = null;
private void timer1_Tick(object sender, EventArgs e)
{
......
......@@ -69,6 +69,7 @@ namespace OnlineStore.AssemblyLine
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, 26));
......@@ -90,6 +91,17 @@ namespace OnlineStore.AssemblyLine
cmbWriteIO.DisplayMember = "DisplayStr";
}
private void Control_Click(object sender, EventArgs e)
{
IOTextControl control = (IOTextControl)sender;
string name = control.Name.Substring(3, control.Name.Length - 3);
List<string> keyList = new List<string>(DOControlList.Keys);
int index = keyList.IndexOf(name);
if (index >= 0)
{
cmbWriteIO.SelectedIndex = index;
}
}
private bool IsInCheck = false;
private void timer1_Tick(object sender, EventArgs e)
{
......
......@@ -72,6 +72,7 @@ namespace OnlineStore.AssemblyLine
foreach (ConfigIO ioValue in LineManager.Config.DOList.Values)
{
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain,ioValue.ProName);
control.Click += Control_Click;
if (roleindex >= count)
{
this.tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
......@@ -92,7 +93,17 @@ namespace OnlineStore.AssemblyLine
cmbWriteIO.DisplayMember = "DisplayStr";
}
private void Control_Click(object sender, EventArgs e)
{
IOTextControl control = (IOTextControl)sender;
string name = control.Name.Substring(3, control.Name.Length - 3);
List<string> keyList = new List<string>(DOControlList.Keys);
int index = keyList.IndexOf(name);
if (index >= 0)
{
cmbWriteIO.SelectedIndex = index;
}
}
private void timer1_Tick(object sender, EventArgs e)
{
......
......@@ -82,6 +82,7 @@ namespace OnlineStore.AssemblyLine
{
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName);
control.Click += Control_Click;
this.tableLayoutPanel2.Controls.Add(control, 0, roleindex);
roleindex++;
DOControlList.Add(ioValue.ProName, control);
......@@ -93,6 +94,17 @@ namespace OnlineStore.AssemblyLine
cmbWriteIO.DisplayMember = "DisplayStr";
}
private void Control_Click(object sender, EventArgs e)
{
IOTextControl control = (IOTextControl)sender;
string name = control.Name.Substring(3, control.Name.Length - 3);
List<string> keyList = new List<string>(DOControlList.Keys);
int index = keyList.IndexOf(name);
if (index >= 0)
{
cmbWriteIO.SelectedIndex = index;
}
}
private void timer1_Tick(object sender, EventArgs e)
{
......
......@@ -86,6 +86,7 @@ namespace OnlineStore.AssemblyLine
{
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName);
control.Click += Control_Click;
this.tableLayoutPanel2.Controls.Add(control, 0, roleindex);
roleindex++;
DOControlList.Add(ioValue.ProName, control);
......@@ -97,7 +98,17 @@ namespace OnlineStore.AssemblyLine
cmbWriteIO.DisplayMember = "DisplayStr";
}
private void Control_Click(object sender, EventArgs e)
{
IOTextControl control = (IOTextControl)sender;
string name = control.Name.Substring(3, control.Name.Length - 3);
List<string> keyList = new List<string>(DOControlList.Keys);
int index = keyList.IndexOf(name);
if (index >= 0)
{
cmbWriteIO.SelectedIndex = index;
}
}
private void timer1_Tick(object sender, EventArgs e)
{
try
......
......@@ -793,25 +793,6 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_20_SaveSize))
{
// MoveInfo.NextMoveStep(LineMoveStep.FI_21_BatchAxisDown);
// MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
// int maxtPosition = Config.BatchAxisP3 - Config.Height_ChangeValue * 30; //在上料位置基础上下降30mm
// int currPositon = BatchAxis.GetAclPosition();
// int targetPosition = currPositon - Config.Height_ChangeValue * 30;
// if (targetPosition <= Config.BatchAxisP2)
// {
// targetPosition = Config.BatchAxisP2;
// }
// else if (targetPosition > maxtPosition)
// {
// targetPosition = maxtPosition;
// }
// InLog("料盘移栽" + MoveInfo.SLog + ":提升轴下降到料盘不溢出(" + (currPositon - Config.Height_ChangeValue * 30) + "):" + targetPosition);
// BatchAxis.AbsMove(MoveInfo, targetPosition, Config.BatchAxis_P2Speed);
//}
//else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_21_BatchAxisDown))
//{
if (MoveCylineIsUp())
{
MoveInfo.NextMoveStep(LineMoveStep.FI_22_CylinderGive);
......@@ -832,11 +813,10 @@ namespace OnlineStore.DeviceLibrary
string log = ":移栽伺服下降到P2:" + targetPositon;
InLog("料盘移栽" + MoveInfo.SLog + ":等待空托盘到达 " + log + "");
UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
if (!MoveInfo.ShelfNoTray)
{
YuScanCode();
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_23_WaitTray))//TODO
{
......@@ -848,9 +828,16 @@ namespace OnlineStore.DeviceLibrary
//UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
MoveInfo.NextMoveStep(LineMoveStep.FI_24_CylinderDown);
InLog("料盘移栽" + MoveInfo.SLog + ":上料机构下降, 托盘号【" + currTrayNum + "】,获取库位号,更新托盘信息 , 提升轴下降指定位置");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
if (!MoveInfo.ShelfNoTray)
{
InLog("料盘移栽" + MoveInfo.SLog + ":上料机构下降, 托盘号【" + currTrayNum + "】,获取库位号,更新托盘信息 , 提升轴下降指定位置");
FI_21_BatchAxisDown();
}
else
{
InLog("料盘移栽" + MoveInfo.SLog + ":上料机构下降, 托盘号【" + currTrayNum + "】,获取库位号,更新托盘信息 ,");
}
Task.Factory.StartNew(delegate
{
//更新托盘条码信息
......
......@@ -45,6 +45,7 @@
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 0;
this.label1.Text = "测试一下";
this.label1.Click += new System.EventHandler(this.label1_DoubleClick);
//
// pictureBox1
//
......
......@@ -81,20 +81,16 @@ namespace UserFromControl
private void pictureBox2_Click(object sender, EventArgs e)
{
if (isCanClick)
{
pictureBox2.Visible = true;
pictureBox1.Visible = false;
}
this.OnClick(e);
}
private void pictureBox1_Click(object sender, EventArgs e)
{
if (isCanClick)
{
pictureBox2.Visible = false;
pictureBox1.Visible = true;
this.OnClick(e);
}
private void label1_DoubleClick(object sender, EventArgs e)
{
this.OnClick(e);
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!