Commit 1f52fefb LN

bug修改

1 个父辈 850d2d5e
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
this.btnStart = new System.Windows.Forms.Button(); this.btnStart = new System.Windows.Forms.Button();
this.btnInStore = new System.Windows.Forms.Button(); this.btnInStore = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button(); this.btnStop = new System.Windows.Forms.Button();
this.chbMoveStop = new System.Windows.Forms.CheckBox();
this.panBase.SuspendLayout(); this.panBase.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
...@@ -45,6 +46,7 @@ ...@@ -45,6 +46,7 @@
this.panBase.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.panBase.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.panBase.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panBase.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panBase.Controls.Add(this.chbMoveStop);
this.panBase.Controls.Add(this.btnExit); this.panBase.Controls.Add(this.btnExit);
this.panBase.Controls.Add(this.lblName); this.panBase.Controls.Add(this.lblName);
this.panBase.Controls.Add(this.chbDebug); this.panBase.Controls.Add(this.chbDebug);
...@@ -87,7 +89,7 @@ ...@@ -87,7 +89,7 @@
// //
this.chbDebug.AutoSize = true; this.chbDebug.AutoSize = true;
this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDebug.Location = new System.Drawing.Point(682, 12); this.chbDebug.Location = new System.Drawing.Point(666, 12);
this.chbDebug.Name = "chbDebug"; this.chbDebug.Name = "chbDebug";
this.chbDebug.Size = new System.Drawing.Size(84, 24); this.chbDebug.Size = new System.Drawing.Size(84, 24);
this.chbDebug.TabIndex = 247; this.chbDebug.TabIndex = 247;
...@@ -100,7 +102,7 @@ ...@@ -100,7 +102,7 @@
this.lblStoreStatus.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblStoreStatus.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblStoreStatus.ForeColor = System.Drawing.Color.Green; this.lblStoreStatus.ForeColor = System.Drawing.Color.Green;
this.lblStoreStatus.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblStoreStatus.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblStoreStatus.Location = new System.Drawing.Point(804, 14); this.lblStoreStatus.Location = new System.Drawing.Point(862, 14);
this.lblStoreStatus.Name = "lblStoreStatus"; this.lblStoreStatus.Name = "lblStoreStatus";
this.lblStoreStatus.Size = new System.Drawing.Size(65, 20); this.lblStoreStatus.Size = new System.Drawing.Size(65, 20);
this.lblStoreStatus.TabIndex = 245; this.lblStoreStatus.TabIndex = 245;
...@@ -155,6 +157,17 @@ ...@@ -155,6 +157,17 @@
this.btnStop.Text = "停止"; this.btnStop.Text = "停止";
this.btnStop.UseVisualStyleBackColor = false; this.btnStop.UseVisualStyleBackColor = false;
// //
// chbMoveStop
//
this.chbMoveStop.AutoSize = true;
this.chbMoveStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbMoveStop.Location = new System.Drawing.Point(764, 12);
this.chbMoveStop.Name = "chbMoveStop";
this.chbMoveStop.Size = new System.Drawing.Size(84, 24);
this.chbMoveStop.TabIndex = 262;
this.chbMoveStop.Text = "暂停运动";
this.chbMoveStop.UseVisualStyleBackColor = true;
//
// FrmEquipBase // FrmEquipBase
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
...@@ -180,5 +193,6 @@ ...@@ -180,5 +193,6 @@
protected System.Windows.Forms.Button btnStart; protected System.Windows.Forms.Button btnStart;
protected System.Windows.Forms.Button btnInStore; protected System.Windows.Forms.Button btnInStore;
protected System.Windows.Forms.Button btnStop; protected System.Windows.Forms.Button btnStop;
protected System.Windows.Forms.CheckBox chbMoveStop;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -102,7 +102,6 @@ ...@@ -102,7 +102,6 @@
this.btnMoveto = new System.Windows.Forms.Button(); this.btnMoveto = new System.Windows.Forms.Button();
this.txtSizePosition = new System.Windows.Forms.TextBox(); this.txtSizePosition = new System.Windows.Forms.TextBox();
this.chbBoxSendShelf = new System.Windows.Forms.CheckBox(); this.chbBoxSendShelf = new System.Windows.Forms.CheckBox();
this.chbMoveStop = new System.Windows.Forms.CheckBox();
this.btnScan = new System.Windows.Forms.Button(); this.btnScan = new System.Windows.Forms.Button();
this.panBase.SuspendLayout(); this.panBase.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
...@@ -123,10 +122,10 @@ ...@@ -123,10 +122,10 @@
// //
// panBase // panBase
// //
this.panBase.Controls.Add(this.chbMoveStop);
this.panBase.Controls.Add(this.chbBoxSendShelf); this.panBase.Controls.Add(this.chbBoxSendShelf);
this.panBase.Controls.Add(this.btnScan); this.panBase.Controls.Add(this.btnScan);
this.panBase.Size = new System.Drawing.Size(1226, 50); this.panBase.Size = new System.Drawing.Size(1226, 50);
this.panBase.Controls.SetChildIndex(this.chbMoveStop, 0);
this.panBase.Controls.SetChildIndex(this.btnStop, 0); this.panBase.Controls.SetChildIndex(this.btnStop, 0);
this.panBase.Controls.SetChildIndex(this.btnInStore, 0); this.panBase.Controls.SetChildIndex(this.btnInStore, 0);
this.panBase.Controls.SetChildIndex(this.btnStart, 0); this.panBase.Controls.SetChildIndex(this.btnStart, 0);
...@@ -137,7 +136,6 @@ ...@@ -137,7 +136,6 @@
this.panBase.Controls.SetChildIndex(this.lblName, 0); this.panBase.Controls.SetChildIndex(this.lblName, 0);
this.panBase.Controls.SetChildIndex(this.btnExit, 0); this.panBase.Controls.SetChildIndex(this.btnExit, 0);
this.panBase.Controls.SetChildIndex(this.chbBoxSendShelf, 0); this.panBase.Controls.SetChildIndex(this.chbBoxSendShelf, 0);
this.panBase.Controls.SetChildIndex(this.chbMoveStop, 0);
// //
// btnExit // btnExit
// //
...@@ -150,11 +148,12 @@ ...@@ -150,11 +148,12 @@
// //
// lblStoreStatus // lblStoreStatus
// //
this.lblStoreStatus.Location = new System.Drawing.Point(880, 13); this.lblStoreStatus.Location = new System.Drawing.Point(880, 14);
// //
// btnOutStore // btnOutStore
// //
this.btnOutStore.Visible = false; this.btnOutStore.Visible = false;
this.btnOutStore.Click += new System.EventHandler(this.btnOutStore_Click);
// //
// btnStart // btnStart
// //
...@@ -168,6 +167,10 @@ ...@@ -168,6 +167,10 @@
// //
this.btnStop.Click += new System.EventHandler(this.btnStop_Click); this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
// //
// chbMoveStop
//
this.chbMoveStop.CheckedChanged += new System.EventHandler(this.chbMoveStop_CheckedChanged);
//
// timer1 // timer1
// //
this.timer1.Interval = 1000; this.timer1.Interval = 1000;
...@@ -1309,18 +1312,6 @@ ...@@ -1309,18 +1312,6 @@
this.chbBoxSendShelf.UseVisualStyleBackColor = true; this.chbBoxSendShelf.UseVisualStyleBackColor = true;
this.chbBoxSendShelf.CheckedChanged += new System.EventHandler(this.chbBoxSendShelf_CheckedChanged); this.chbBoxSendShelf.CheckedChanged += new System.EventHandler(this.chbBoxSendShelf_CheckedChanged);
// //
// chbMoveStop
//
this.chbMoveStop.AutoSize = true;
this.chbMoveStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbMoveStop.Location = new System.Drawing.Point(772, 12);
this.chbMoveStop.Name = "chbMoveStop";
this.chbMoveStop.Size = new System.Drawing.Size(84, 24);
this.chbMoveStop.TabIndex = 250;
this.chbMoveStop.Text = "暂停运动";
this.chbMoveStop.UseVisualStyleBackColor = true;
this.chbMoveStop.CheckedChanged += new System.EventHandler(this.chbMoveStop_CheckedChanged);
//
// btnScan // btnScan
// //
this.btnScan.BackColor = System.Drawing.Color.White; this.btnScan.BackColor = System.Drawing.Color.White;
...@@ -1437,7 +1428,6 @@ ...@@ -1437,7 +1428,6 @@
private System.Windows.Forms.Label lblMoveInfo; private System.Windows.Forms.Label lblMoveInfo;
internal System.Windows.Forms.TextBox txtUpdownP3; internal System.Windows.Forms.TextBox txtUpdownP3;
internal System.Windows.Forms.Button btnUpdownP3; internal System.Windows.Forms.Button btnUpdownP3;
private System.Windows.Forms.CheckBox chbMoveStop;
private System.Windows.Forms.Button SL_OutLine_Run; private System.Windows.Forms.Button SL_OutLine_Run;
private System.Windows.Forms.TabPage tabPage3; private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.Label lblwidth; private System.Windows.Forms.Label lblwidth;
......
...@@ -30,7 +30,7 @@ namespace OnlineStore.AssemblyLine ...@@ -30,7 +30,7 @@ namespace OnlineStore.AssemblyLine
this.equipBean = moveEquip; this.equipBean = moveEquip;
Control.CheckForIllegalCrossThreadCalls = false; Control.CheckForIllegalCrossThreadCalls = false;
InitializeComponent(); InitializeComponent();
LoadIOList(); LoadIOList();
} }
private void LoadIOList() private void LoadIOList()
...@@ -47,12 +47,12 @@ namespace OnlineStore.AssemblyLine ...@@ -47,12 +47,12 @@ namespace OnlineStore.AssemblyLine
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName); IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName);
if (i >= maxCount) if (i >= maxCount)
{ {
this.tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 26)); this.tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
this.tableLayoutPanel3.Controls.Add(control, 0, roleindex - maxCount); this.tableLayoutPanel3.Controls.Add(control, 0, roleindex - maxCount);
} }
else else
{ {
this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 26)); this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
this.tableLayoutPanel1.Controls.Add(control, 0, roleindex); this.tableLayoutPanel1.Controls.Add(control, 0, roleindex);
} }
roleindex++; roleindex++;
...@@ -72,12 +72,12 @@ namespace OnlineStore.AssemblyLine ...@@ -72,12 +72,12 @@ namespace OnlineStore.AssemblyLine
control.Click += Control_Click; control.Click += Control_Click;
if (i >= maxCount) if (i >= maxCount)
{ {
this.tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 26)); this.tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
this.tableLayoutPanel4.Controls.Add(control, 0, roleindex - maxCount); this.tableLayoutPanel4.Controls.Add(control, 0, roleindex - maxCount);
} }
else else
{ {
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 26)); this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
this.tableLayoutPanel2.Controls.Add(control, 0, roleindex); this.tableLayoutPanel2.Controls.Add(control, 0, roleindex);
} }
roleindex++; roleindex++;
...@@ -174,7 +174,7 @@ namespace OnlineStore.AssemblyLine ...@@ -174,7 +174,7 @@ namespace OnlineStore.AssemblyLine
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.StackTrace, "Exception(异常)", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.StackTrace, "Exception(异常)", MessageBoxButtons.OK, MessageBoxIcon.Error);
LogUtil.error("",ex); LogUtil.error("", ex);
} }
} }
private void btnOpenDo_Click(object sender, EventArgs e) private void btnOpenDo_Click(object sender, EventArgs e)
...@@ -259,7 +259,7 @@ namespace OnlineStore.AssemblyLine ...@@ -259,7 +259,7 @@ namespace OnlineStore.AssemblyLine
else else
{ {
SL_RollerLine_Run.Visible = false; SL_RollerLine_Run.Visible = false;
} }
LoadDP2(); LoadDP2();
LoadDOBtn(groupDO); LoadDOBtn(groupDO);
txtBp1.Text = equipBean.Config.BatchAxisP1.ToString(); txtBp1.Text = equipBean.Config.BatchAxisP1.ToString();
...@@ -270,6 +270,7 @@ namespace OnlineStore.AssemblyLine ...@@ -270,6 +270,7 @@ namespace OnlineStore.AssemblyLine
chbBoxSendShelf.Visible = equipBean.Config.IsCanOut.Equals(1); chbBoxSendShelf.Visible = equipBean.Config.IsCanOut.Equals(1);
btnScan.Visible = equipBean.Config.IsCanOut.Equals(0); btnScan.Visible = equipBean.Config.IsCanOut.Equals(0);
chbBoxSendShelf.Checked = equipBean.OutEndSendShelfOut; chbBoxSendShelf.Checked = equipBean.OutEndSendShelfOut;
btnOutStore.Visible = equipBean.Config.IsCanOut.Equals(1);
IsLoad = true; IsLoad = true;
} }
...@@ -292,7 +293,7 @@ namespace OnlineStore.AssemblyLine ...@@ -292,7 +293,7 @@ namespace OnlineStore.AssemblyLine
{ {
ReadIOList(); ReadIOList();
} }
private void FrmIOStatus_Shown(object sender, EventArgs e) private void FrmIOStatus_Shown(object sender, EventArgs e)
{ {
timer1.Start(); timer1.Start();
...@@ -331,7 +332,7 @@ namespace OnlineStore.AssemblyLine ...@@ -331,7 +332,7 @@ namespace OnlineStore.AssemblyLine
LogUtil.info(equipBean.Name + "点击:停止"); LogUtil.info(equipBean.Name + "点击:停止");
StopRun(); StopRun();
} }
private void chbDebug_CheckedChanged(object sender, EventArgs e) private void chbDebug_CheckedChanged(object sender, EventArgs e)
{ {
if (!IsLoad) if (!IsLoad)
...@@ -369,7 +370,7 @@ namespace OnlineStore.AssemblyLine ...@@ -369,7 +370,7 @@ namespace OnlineStore.AssemblyLine
} }
} }
} }
} }
private void btnLocationCylinder_Click(object sender, EventArgs e) private void btnLocationCylinder_Click(object sender, EventArgs e)
{ {
...@@ -379,9 +380,9 @@ namespace OnlineStore.AssemblyLine ...@@ -379,9 +380,9 @@ namespace OnlineStore.AssemblyLine
private void btnOutTopCylinder_Click(object sender, EventArgs e) private void btnOutTopCylinder_Click(object sender, EventArgs e)
{ {
LogUtil.info(equipBase.Name + "界面点击:" + SL_OutTopCylinder_Up.Text); LogUtil.info(equipBase.Name + "界面点击:" + SL_OutTopCylinder_Up.Text);
equipBean.CylinderMove(null, IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up); equipBean.CylinderMove(null, IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up);
} }
private void btnFeedSideWayCylinder_Click(object sender, EventArgs e) private void btnFeedSideWayCylinder_Click(object sender, EventArgs e)
{ {
if (equipBean.UpdownIsInP1()) if (equipBean.UpdownIsInP1())
...@@ -395,19 +396,19 @@ namespace OnlineStore.AssemblyLine ...@@ -395,19 +396,19 @@ namespace OnlineStore.AssemblyLine
} }
} }
private void btnTrayLocationCylinder_Click(object sender, EventArgs e) private void btnTrayLocationCylinder_Click(object sender, EventArgs e)
{ {
if(!equipBean.TrayLCylinderCanAfter()) if (!equipBean.TrayLCylinderCanAfter())
{ {
DialogResult result = MessageBox.Show("提升轴当前不在待机点P2,是否确定" + SL_TrayLocation_Before.Text+"?","确认操作 ",MessageBoxButtons.YesNo); DialogResult result = MessageBox.Show("提升轴当前不在待机点P2,是否确定" + SL_TrayLocation_Before.Text + "?", "确认操作 ", MessageBoxButtons.YesNo);
if (!result.Equals(DialogResult.Yes)) if (!result.Equals(DialogResult.Yes))
{ {
return; return;
} }
} }
LogUtil.info(equipBase.Name + "界面点击:" + SL_TrayLocation_Before.Text); LogUtil.info(equipBase.Name + "界面点击:" + SL_TrayLocation_Before.Text);
equipBean.CylinderMove(null,IO_Type.SL_TrayLocation_After, IO_Type.SL_TrayLocation_Before); equipBean.CylinderMove(null, IO_Type.SL_TrayLocation_After, IO_Type.SL_TrayLocation_Before);
} }
private void cmbSizeList_SelectedIndexChanged(object sender, EventArgs e) private void cmbSizeList_SelectedIndexChanged(object sender, EventArgs e)
{ {
if (cmbSizeList.SelectedIndex < 0) if (cmbSizeList.SelectedIndex < 0)
...@@ -457,10 +458,10 @@ namespace OnlineStore.AssemblyLine ...@@ -457,10 +458,10 @@ namespace OnlineStore.AssemblyLine
private void button3_Click(object sender, EventArgs e) private void button3_Click(object sender, EventArgs e)
{ {
int position = FormUtil.GetIntValue(txtP1); int position = FormUtil.GetIntValue(txtP1);
int speed = equipBean.Config.UpdownAxis_P1Speed; int speed = equipBean.Config.UpdownAxis_P1Speed;
LogUtil.info("点击【移栽升降轴待机位置P1:】, 位置【" + position + "】速度【" + speed + "】"); LogUtil.info("点击【移栽升降轴待机位置P1:】, 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(null, position, speed); equipBean.UpdownAxis.AbsMove(null, position, speed);
} }
private void btnSave_Click(object sender, EventArgs e) private void btnSave_Click(object sender, EventArgs e)
...@@ -536,9 +537,9 @@ namespace OnlineStore.AssemblyLine ...@@ -536,9 +537,9 @@ namespace OnlineStore.AssemblyLine
private void btnScan_Click(object sender, EventArgs e) private void btnScan_Click(object sender, EventArgs e)
{ {
List<string> camers = equipBean.Config.GetCameraList(); List<string> camers = equipBean.Config.GetCameraList();
List<string> LastCodeList = CodeManager.CameraScan(camers,equipBean.Name.Trim()+"测试"); List<string> LastCodeList = CodeManager.CameraScan(camers, equipBean.Name.Trim() + "测试");
string cameraStr = ""; string cameraStr = "";
foreach(string ca in camers) foreach (string ca in camers)
{ {
cameraStr += ca + "#"; cameraStr += ca + "#";
} }
...@@ -555,24 +556,25 @@ namespace OnlineStore.AssemblyLine ...@@ -555,24 +556,25 @@ namespace OnlineStore.AssemblyLine
//} //}
LogUtil.info(equipBean.Name + "["+ cameraStr + "]扫码测试结果:\r\n" + msg); LogUtil.info(equipBean.Name + "[" + cameraStr + "]扫码测试结果:\r\n" + msg);
MessageBox.Show(equipBean.Name + "[" + cameraStr + "]扫码测试结果:" + msg); MessageBox.Show(equipBean.Name + "[" + cameraStr + "]扫码测试结果:" + msg);
} }
private void btnUpdownP3_Click(object sender, EventArgs e) private void btnUpdownP3_Click(object sender, EventArgs e)
{ {
int position = FormUtil.GetIntValue(txtUpdownP3); int position = FormUtil.GetIntValue(txtUpdownP3);
int speed = equipBean.Config.UpdownAxis_P3Speed; int speed = equipBean.Config.UpdownAxis_P3Speed;
LogUtil.info("点击【移栽升降轴取料位置P3:】, 位置【" + position + "】速度【" + speed + "】"); LogUtil.info("点击【移栽升降轴取料位置P3:】, 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(null, position, speed); equipBean.UpdownAxis.AbsMove(null, position, speed);
} }
private void chbMoveStop_CheckedChanged(object sender, EventArgs e) private void chbMoveStop_CheckedChanged(object sender, EventArgs e)
{ {
if (!IsLoad) if (!IsLoad)
{ {
return; return;
} }
equipBean.MoveStop = chbMoveStop.Checked; equipBean.MoveStop = chbMoveStop.Checked;
LogUtil.info(equipBean.Name + "用户切换是否暂停: " + equipBean.MoveStop); LogUtil.info(equipBean.Name + "用户切换是否暂停: " + equipBean.MoveStop);
} }
...@@ -582,7 +584,7 @@ namespace OnlineStore.AssemblyLine ...@@ -582,7 +584,7 @@ namespace OnlineStore.AssemblyLine
DoBtnClick(sender); DoBtnClick(sender);
} }
private void chbBoxSendShelf_CheckedChanged(object sender, EventArgs e) private void chbBoxSendShelf_CheckedChanged(object sender, EventArgs e)
{ {
...@@ -592,7 +594,7 @@ namespace OnlineStore.AssemblyLine ...@@ -592,7 +594,7 @@ namespace OnlineStore.AssemblyLine
IsInCheck = false; IsInCheck = false;
} }
private void btnOutStopDown_Click(object sender, EventArgs e) private void btnOutStopDown_Click(object sender, EventArgs e)
{ {
DoBtnClick(sender); DoBtnClick(sender);
...@@ -604,7 +606,7 @@ namespace OnlineStore.AssemblyLine ...@@ -604,7 +606,7 @@ namespace OnlineStore.AssemblyLine
DialogResult result = MessageBox.Show("确定更改当前料架号为:" + shel + "?", "", MessageBoxButtons.YesNo); DialogResult result = MessageBox.Show("确定更改当前料架号为:" + shel + "?", "", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
LogUtil.info(equipBean.Name + "旧料架号【"+equipBean.CurrShelfId+"】手动更改料架号为【" + shel + "】"); LogUtil.info(equipBean.Name + "旧料架号【" + equipBean.CurrShelfId + "】手动更改料架号为【" + shel + "】");
equipBean.CurrShelfId = shel; equipBean.CurrShelfId = shel;
} }
} }
...@@ -717,8 +719,8 @@ namespace OnlineStore.AssemblyLine ...@@ -717,8 +719,8 @@ namespace OnlineStore.AssemblyLine
private void btnTopUp_Click(object sender, EventArgs e) private void btnTopUp_Click(object sender, EventArgs e)
{ {
LogUtil.info(equipBase.Name+ "界面点击:" + SL_TopCylinder_Up.Text); LogUtil.info(equipBase.Name + "界面点击:" + SL_TopCylinder_Up.Text);
equipBean.CylinderMove(null, IO_Type.SL_TopCylinder_Down, IO_Type.SL_TopCylinder_Up); equipBean.CylinderMove(null, IO_Type.SL_TopCylinder_Down, IO_Type.SL_TopCylinder_Up);
} }
private void btnRollerRun_Click(object sender, EventArgs e) private void btnRollerRun_Click(object sender, EventArgs e)
...@@ -729,13 +731,13 @@ namespace OnlineStore.AssemblyLine ...@@ -729,13 +731,13 @@ namespace OnlineStore.AssemblyLine
private void btnFeedCylinder_Click(object sender, EventArgs e) private void btnFeedCylinder_Click(object sender, EventArgs e)
{ {
LogUtil.info(equipBase.Name + "界面点击:" + SL_ClampCylinder_Work.Text); LogUtil.info(equipBase.Name + "界面点击:" + SL_ClampCylinder_Work.Text);
equipBean.CylinderMove(null,IO_Type.SL_ClampCylinder_Relax, IO_Type.SL_ClampCylinder_Work); equipBean.CylinderMove(null, IO_Type.SL_ClampCylinder_Relax, IO_Type.SL_ClampCylinder_Work);
} }
private void SL_TopCylinder_Down_Click(object sender, EventArgs e) private void SL_TopCylinder_Down_Click(object sender, EventArgs e)
{ {
LogUtil.info(equipBase.Name + "界面点击:" + SL_TopCylinder_Down.Text); LogUtil.info(equipBase.Name + "界面点击:" + SL_TopCylinder_Down.Text);
equipBean.CylinderMove(null, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_TopCylinder_Down); equipBean.CylinderMove(null, IO_Type.SL_TopCylinder_Up, IO_Type.SL_TopCylinder_Down);
} }
private void SL_FixedCylinder_Down_Click(object sender, EventArgs e) private void SL_FixedCylinder_Down_Click(object sender, EventArgs e)
...@@ -787,6 +789,25 @@ namespace OnlineStore.AssemblyLine ...@@ -787,6 +789,25 @@ namespace OnlineStore.AssemblyLine
LogUtil.info(equipBase.Name + "界面点击:" + SL_TrayLocation_After.Text); LogUtil.info(equipBase.Name + "界面点击:" + SL_TrayLocation_After.Text);
equipBean.CylinderMove(null, IO_Type.SL_TrayLocation_After, IO_Type.SL_TrayLocation_After); equipBean.CylinderMove(null, IO_Type.SL_TrayLocation_After, IO_Type.SL_TrayLocation_After);
} }
private void btnOutStore_Click(object sender, EventArgs e)
{
//模拟出库测试
if (equipBean.runStatus > LineRunStatus.Wait && equipBean.MoveInfo.MoveType.Equals(LineMoveType.None))
{
InOutParam param = new InOutParam(999, "barcode-test", "posid-test", 12, 7, false, false, true);
LogUtil.info(equipBase.Name + "点击出库测试:" + param.ToShortStr());
bool result = equipBean.StartTrayOut(param);
if (!result)
{
MessageBox.Show("出库测试失败,详情请查看日志!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else
{
MessageBox.Show("未启动或不在空闲中,出库测试失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
} }
} }
......
...@@ -103,13 +103,22 @@ ...@@ -103,13 +103,22 @@
this.btnExit.Location = new System.Drawing.Point(1131, 4); this.btnExit.Location = new System.Drawing.Point(1131, 4);
this.btnExit.Click += new System.EventHandler(this.btnClose_Click); this.btnExit.Click += new System.EventHandler(this.btnClose_Click);
// //
// lblName
//
this.lblName.Text = "线体横移";
//
// chbDebug // chbDebug
// //
this.chbDebug.Location = new System.Drawing.Point(662, 13);
this.chbDebug.Click += new System.EventHandler(this.chbDebug_CheckedChanged); this.chbDebug.Click += new System.EventHandler(this.chbDebug_CheckedChanged);
// //
// lblStoreStatus
//
this.lblStoreStatus.Location = new System.Drawing.Point(868, 15);
//
// btnOutStore // btnOutStore
// //
this.btnOutStore.Text = "出料测试"; this.btnOutStore.Text = "料盘移栽测试";
this.btnOutStore.Click += new System.EventHandler(this.btnOutStore_Click); this.btnOutStore.Click += new System.EventHandler(this.btnOutStore_Click);
// //
// btnStart // btnStart
...@@ -124,6 +133,10 @@ ...@@ -124,6 +133,10 @@
// //
this.btnStop.Click += new System.EventHandler(this.btnStop_Click); this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
// //
// chbMoveStop
//
this.chbMoveStop.CheckedChanged += new System.EventHandler(this.chbMoveStop_CheckedChanged_1);
//
// timer1 // timer1
// //
this.timer1.Interval = 1000; this.timer1.Interval = 1000;
...@@ -981,7 +994,7 @@ ...@@ -981,7 +994,7 @@
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "FrmHYEquip"; this.Name = "FrmHYEquip";
this.Text = "出料移栽——"; this.Text = "线体横移——";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing);
this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load); this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load);
this.Shown += new System.EventHandler(this.FrmIOStatus_Shown); this.Shown += new System.EventHandler(this.FrmIOStatus_Shown);
......
...@@ -59,6 +59,14 @@ namespace OnlineStore.AssemblyLine ...@@ -59,6 +59,14 @@ namespace OnlineStore.AssemblyLine
txtP1.Text = equipBean.Config.UpDownAxisP1.ToString(); txtP1.Text = equipBean.Config.UpDownAxisP1.ToString();
lblHyInfo.Text = equipBean.GetHYDesc(); lblHyInfo.Text = equipBean.GetHYDesc();
LoadDOBtn(groupDo); LoadDOBtn(groupDo);
if(equipBean is HY_Coveryor)
{
btnOutStore.Visible = true;
}
else
{
btnOutStore.Visible = false;
}
IsLoad = true; IsLoad = true;
} }
...@@ -97,14 +105,7 @@ namespace OnlineStore.AssemblyLine ...@@ -97,14 +105,7 @@ namespace OnlineStore.AssemblyLine
} }
private void Control_Click(object sender, EventArgs e) 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) private void timer1_Tick(object sender, EventArgs e)
{ {
...@@ -213,9 +214,7 @@ namespace OnlineStore.AssemblyLine ...@@ -213,9 +214,7 @@ namespace OnlineStore.AssemblyLine
selectControl = newControl; selectControl = newControl;
} }
} }
} }
private void cmbWriteIO_DrawItem(object sender, DrawItemEventArgs e) private void cmbWriteIO_DrawItem(object sender, DrawItemEventArgs e)
{ {
if (e.Index < 0) if (e.Index < 0)
...@@ -315,12 +314,13 @@ namespace OnlineStore.AssemblyLine ...@@ -315,12 +314,13 @@ namespace OnlineStore.AssemblyLine
{ {
if (equipBean.runStatus.Equals(LineRunStatus.Runing)) if (equipBean.runStatus.Equals(LineRunStatus.Runing))
{ {
LogUtil.info(equipBean.Name + "点击:出料测试"); InOutParam param = new InOutParam(999, "barcode-test", "posid-test", 12, 7, false, false, false);
equipBean.StartOutStoreMove(new InOutParam()); LogUtil.info(equipBean.Name + "点击:托盘移栽测试"+ param.ToShortStr());
equipBean.StartOutStoreMove(param);
} }
else else
{ {
MessageBox.Show("未启动或不在空闲中,无法入库测试!"); MessageBox.Show("未启动或不在空闲中,无法启动托盘移栽测试!","提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
} }
} }
...@@ -421,9 +421,7 @@ namespace OnlineStore.AssemblyLine ...@@ -421,9 +421,7 @@ namespace OnlineStore.AssemblyLine
listDetitalP2.Items.Add(key + "=" + DP2Map[key]); listDetitalP2.Items.Add(key + "=" + DP2Map[key]);
} }
txtDP2.Text = txtP2.Text; txtDP2.Text = txtP2.Text;
} }
private void btnDSave_Click(object sender, EventArgs e) private void btnDSave_Click(object sender, EventArgs e)
{ {
int size = Convert.ToInt32(cmbDSize.Text); int size = Convert.ToInt32(cmbDSize.Text);
...@@ -603,7 +601,28 @@ namespace OnlineStore.AssemblyLine ...@@ -603,7 +601,28 @@ namespace OnlineStore.AssemblyLine
LogUtil.info(equipBase.Name + "界面点击:" + HY_ClampCylinder_Relax.Text); LogUtil.info(equipBase.Name + "界面点击:" + HY_ClampCylinder_Relax.Text);
equipBean.CylinderMove(null, IO_Type.HY_ClampCylinder_Work, IO_Type.HY_ClampCylinder_Relax); equipBean.CylinderMove(null, IO_Type.HY_ClampCylinder_Work, IO_Type.HY_ClampCylinder_Relax);
} }
private void chbMoveStop_CheckedChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
equipBean.MoveStop = chbMoveStop.Checked;
LogUtil.info(equipBean.Name + "用户切换是否暂停: " + equipBean.MoveStop);
}
private void chbMoveStop_CheckedChanged_1(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
equipBean.MoveStop = chbMoveStop.Checked;
LogUtil.info(equipBean.Name + "用户切换是否暂停: " + equipBean.MoveStop);
}
} }
} }
......
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
// chbRightDis // chbRightDis
// //
this.chbRightDis.AutoSize = true; this.chbRightDis.AutoSize = true;
this.chbRightDis.Location = new System.Drawing.Point(339, 14); this.chbRightDis.Location = new System.Drawing.Point(241, 14);
this.chbRightDis.Name = "chbRightDis"; this.chbRightDis.Name = "chbRightDis";
this.chbRightDis.Size = new System.Drawing.Size(126, 24); this.chbRightDis.Size = new System.Drawing.Size(126, 24);
this.chbRightDis.TabIndex = 197; this.chbRightDis.TabIndex = 197;
......
...@@ -115,6 +115,10 @@ ...@@ -115,6 +115,10 @@
// //
this.btnStop.Click += new System.EventHandler(this.btnStop_Click); this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
// //
// chbMoveStop
//
this.chbMoveStop.CheckedChanged += new System.EventHandler(this.chbMoveStop_CheckedChanged);
//
// timer1 // timer1
// //
this.timer1.Interval = 1000; this.timer1.Interval = 1000;
...@@ -704,7 +708,7 @@ ...@@ -704,7 +708,7 @@
// //
this.axisMoveControl1.Location = new System.Drawing.Point(10, 7); this.axisMoveControl1.Location = new System.Drawing.Point(10, 7);
this.axisMoveControl1.Name = "axisMoveControl1"; this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(567, 437); this.axisMoveControl1.Size = new System.Drawing.Size(567, 390);
this.axisMoveControl1.TabIndex = 219; this.axisMoveControl1.TabIndex = 219;
// //
// groupBox2 // groupBox2
......
...@@ -357,8 +357,9 @@ namespace OnlineStore.AssemblyLine ...@@ -357,8 +357,9 @@ namespace OnlineStore.AssemblyLine
{ {
if (equipBean.runStatus.Equals(LineRunStatus.Runing)) if (equipBean.runStatus.Equals(LineRunStatus.Runing))
{ {
LogUtil.info(equipBean.Name + "点击:出库测试"); InOutParam param = new InOutParam(999, "barcode-test", "posid-test", 12, 7, false, false, false);
equipBean.StartOutStoreMove(new InOutParam()); LogUtil.info(equipBean.Name + "点击:出库测试 "+ param.ToShortStr());
equipBean.StartOutStoreMove(param);
} }
else else
{ {
...@@ -370,8 +371,9 @@ namespace OnlineStore.AssemblyLine ...@@ -370,8 +371,9 @@ namespace OnlineStore.AssemblyLine
{ {
if (equipBean.runStatus.Equals(LineRunStatus.Runing)) if (equipBean.runStatus.Equals(LineRunStatus.Runing))
{ {
LogUtil.info(equipBean.Name + "点击:入库测试"); InOutParam param = new InOutParam(999, "barcode-test", "posid-test", 12, 7, false, false, false);
equipBean.StartInStoreMove(new InOutParam()); LogUtil.info(equipBean.Name + "点击:入库测试" + param.ToShortStr());
equipBean.StartInStoreMove(param);
} }
else else
{ {
...@@ -646,6 +648,17 @@ namespace OnlineStore.AssemblyLine ...@@ -646,6 +648,17 @@ namespace OnlineStore.AssemblyLine
{ {
} }
private void chbMoveStop_CheckedChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
equipBean.MoveStop = chbMoveStop.Checked;
LogUtil.info(equipBean.Name + "用户切换是否暂停: " + equipBean.MoveStop);
}
} }
} }
......
...@@ -17,7 +17,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -17,7 +17,7 @@ namespace OnlineStore.DeviceLibrary
private InOutParam LastOutParam = new InOutParam(); private InOutParam LastOutParam = new InOutParam();
private bool NeedCheckShelf = true; private bool NeedCheckShelf = true;
internal bool StartTrayOut(InOutParam outParam) public bool StartTrayOut(InOutParam outParam)
{ {
if (outParam == null || outParam.PosId == null || outParam.PosId.Equals("")) if (outParam == null || outParam.PosId == null || outParam.PosId.Equals(""))
{ {
......
...@@ -378,8 +378,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -378,8 +378,8 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.HY13_WaitHY2Ready); MoveInfo.NextMoveStep(LineMoveStep.HY13_WaitHY2Ready);
CheckLog("托盘横移" + MoveInfo.SLog + " ,等待" + hyout.Name + " 准备完成(顶升上升,定位下降) "); CheckLog("托盘横移" + MoveInfo.SLog + " ,等待" + hyout.Name + " 准备完成(顶升上升,定位下降) ");
GetHyOutEquip().MoveInfo.NewMove(LineMoveType.CheckFixture); hyout.MoveInfo.NewMove(LineMoveType.CheckFixture);
GetHyOutEquip().MoveInfo.NextMoveStep(LineMoveStep.HY51_WaitFree); hyout.MoveInfo.NextMoveStep(LineMoveStep.HY51_WaitFree);
ClearTimeoutAlarm("等待" + hyout.Name + "可以横移超时"); ClearTimeoutAlarm("等待" + hyout.Name + "可以横移超时");
} }
else if (MoveInfo.IsTimeOut()) else if (MoveInfo.IsTimeOut())
......
...@@ -356,8 +356,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -356,8 +356,8 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.HY13_WaitHY2Ready); MoveInfo.NextMoveStep(LineMoveStep.HY13_WaitHY2Ready);
CheckLog("托盘横移" + MoveInfo.SLog + " ,等待"+ hyOut.Name + "准备完成(顶升上升,定位下降) "); CheckLog("托盘横移" + MoveInfo.SLog + " ,等待"+ hyOut.Name + "准备完成(顶升上升,定位下降) ");
GetHyOutEquip().MoveInfo.NewMove(LineMoveType.CheckFixture); hyOut.MoveInfo.NewMove(LineMoveType.CheckFixture);
GetHyOutEquip().MoveInfo.NextMoveStep(LineMoveStep.HY51_WaitFree); hyOut.MoveInfo.NextMoveStep(LineMoveStep.HY51_WaitFree);
ClearTimeoutAlarm("等待"+ hyOut .Name+ "可以横移超时"); ClearTimeoutAlarm("等待"+ hyOut .Name+ "可以横移超时");
} }
else if (MoveInfo.IsTimeOut()) else if (MoveInfo.IsTimeOut())
...@@ -590,6 +590,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -590,6 +590,11 @@ namespace OnlineStore.DeviceLibrary
internal override void TrayCanLeave() internal override void TrayCanLeave()
{ {
if (runStatus <= LineRunStatus.Wait)
{
LogUtil.error(Name + "TrayCanLeave :当前未启动,不需要处理");
return;
}
if (TrayIsReady()) if (TrayIsReady())
{ {
if (Config.IsSideWayIn) if (Config.IsSideWayIn)
......
...@@ -461,8 +461,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -461,8 +461,15 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_07_ClampCheck)) else if (MoveInfo.IsStep(LineMoveStep.JM_07_ClampCheck))
{ {
//托盘可以离开 if (SecondMoveInfo.IsStep(LineMoveStep.JHY_09_WaitProcessReel))
JHY_10_ReelProEnd(); {
//托盘可以离开
JHY_10_ReelProEnd();
}
else
{
OutLog(logName + MoveInfo.SLog + ":SecondMoveInfo当前无处理,暂时不用 JHY_10_ReelProEnd ");
}
MoveInfo.NextMoveStep(LineMoveStep.JM_10_WaitJNoReel); MoveInfo.NextMoveStep(LineMoveStep.JM_10_WaitJNoReel);
OutLog(logName + MoveInfo.SLog + ":等待接驳台无料 "); OutLog(logName + MoveInfo.SLog + ":等待接驳台无料 ");
......
...@@ -355,6 +355,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -355,6 +355,9 @@ namespace OnlineStore.DeviceLibrary
internal bool TrayIsReady(int deviceID,out int trayNum) internal bool TrayIsReady(int deviceID,out int trayNum)
{ {
trayNum = -1; trayNum = -1;
bool isDebug = AllEquipMap[deviceID].IsDebug;
if (deviceID.Equals(103)) if (deviceID.Equals(103))
{ {
if (T3C1TrayIsReady()) if (T3C1TrayIsReady())
...@@ -362,6 +365,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -362,6 +365,12 @@ namespace OnlineStore.DeviceLibrary
trayNum = T3C1_TrayNum; trayNum = T3C1_TrayNum;
return true; return true;
} }
//TODO 调试模式直接返回true
if (IsDebug && runStatus <= LineRunStatus.Wait)
{
return true;
}
}else }else
{ {
foreach(HYEquipBase hy in HYEquipMap.Values) foreach(HYEquipBase hy in HYEquipMap.Values)
...@@ -373,6 +382,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -373,6 +382,12 @@ namespace OnlineStore.DeviceLibrary
trayNum = hy.currTrayNum; trayNum = hy.currTrayNum;
return true; return true;
} }
//TODO 调试模式直接返回true
if (IsDebug && hy.runStatus <= LineRunStatus.Wait)
{
return true;
}
} }
} }
} }
...@@ -392,6 +407,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -392,6 +407,7 @@ namespace OnlineStore.DeviceLibrary
{ {
foreach (HYEquipBase hy in HYEquipMap.Values) foreach (HYEquipBase hy in HYEquipMap.Values)
{ {
if (hy.Config.WorkDeviceId.Equals(deviceID)) if (hy.Config.WorkDeviceId.Equals(deviceID))
{ {
hy.TrayCanLeave(); hy.TrayCanLeave();
......
...@@ -313,6 +313,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -313,6 +313,10 @@ namespace OnlineStore.DeviceLibrary
internal void T3C1TrayCanLeave() internal void T3C1TrayCanLeave()
{ {
if (runStatus <= LineRunStatus.Wait)
{
return;
}
if (T3C1TrayIsReady()) if (T3C1TrayIsReady())
{ {
MO_16_Stop2Down(); MO_16_Stop2Down();
......
...@@ -26,6 +26,7 @@ namespace OnlineStore.DeviceLibrary.IO ...@@ -26,6 +26,7 @@ namespace OnlineStore.DeviceLibrary.IO
{ {
if (!HCBoardManager.CardInitOk()) if (!HCBoardManager.CardInitOk())
{ {
LogUtil.info("HCIOManager ConnectionIOList,打开板卡");
HCBoardManager.OpenCard(); HCBoardManager.OpenCard();
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!