Commit 1f52fefb LN

bug修改

1 个父辈 850d2d5e
......@@ -37,6 +37,7 @@
this.btnStart = new System.Windows.Forms.Button();
this.btnInStore = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button();
this.chbMoveStop = new System.Windows.Forms.CheckBox();
this.panBase.SuspendLayout();
this.SuspendLayout();
//
......@@ -45,6 +46,7 @@
this.panBase.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
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.lblName);
this.panBase.Controls.Add(this.chbDebug);
......@@ -87,7 +89,7 @@
//
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.Location = new System.Drawing.Point(682, 12);
this.chbDebug.Location = new System.Drawing.Point(666, 12);
this.chbDebug.Name = "chbDebug";
this.chbDebug.Size = new System.Drawing.Size(84, 24);
this.chbDebug.TabIndex = 247;
......@@ -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.ForeColor = System.Drawing.Color.Green;
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.Size = new System.Drawing.Size(65, 20);
this.lblStoreStatus.TabIndex = 245;
......@@ -155,6 +157,17 @@
this.btnStop.Text = "停止";
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
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......@@ -180,5 +193,6 @@
protected System.Windows.Forms.Button btnStart;
protected System.Windows.Forms.Button btnInStore;
protected System.Windows.Forms.Button btnStop;
protected System.Windows.Forms.CheckBox chbMoveStop;
}
}
\ No newline at end of file
......@@ -102,7 +102,6 @@
this.btnMoveto = new System.Windows.Forms.Button();
this.txtSizePosition = new System.Windows.Forms.TextBox();
this.chbBoxSendShelf = new System.Windows.Forms.CheckBox();
this.chbMoveStop = new System.Windows.Forms.CheckBox();
this.btnScan = new System.Windows.Forms.Button();
this.panBase.SuspendLayout();
this.groupBox1.SuspendLayout();
......@@ -123,10 +122,10 @@
//
// panBase
//
this.panBase.Controls.Add(this.chbMoveStop);
this.panBase.Controls.Add(this.chbBoxSendShelf);
this.panBase.Controls.Add(this.btnScan);
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.btnInStore, 0);
this.panBase.Controls.SetChildIndex(this.btnStart, 0);
......@@ -137,7 +136,6 @@
this.panBase.Controls.SetChildIndex(this.lblName, 0);
this.panBase.Controls.SetChildIndex(this.btnExit, 0);
this.panBase.Controls.SetChildIndex(this.chbBoxSendShelf, 0);
this.panBase.Controls.SetChildIndex(this.chbMoveStop, 0);
//
// btnExit
//
......@@ -150,11 +148,12 @@
//
// lblStoreStatus
//
this.lblStoreStatus.Location = new System.Drawing.Point(880, 13);
this.lblStoreStatus.Location = new System.Drawing.Point(880, 14);
//
// btnOutStore
//
this.btnOutStore.Visible = false;
this.btnOutStore.Click += new System.EventHandler(this.btnOutStore_Click);
//
// btnStart
//
......@@ -168,6 +167,10 @@
//
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// chbMoveStop
//
this.chbMoveStop.CheckedChanged += new System.EventHandler(this.chbMoveStop_CheckedChanged);
//
// timer1
//
this.timer1.Interval = 1000;
......@@ -1309,18 +1312,6 @@
this.chbBoxSendShelf.UseVisualStyleBackColor = true;
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
//
this.btnScan.BackColor = System.Drawing.Color.White;
......@@ -1437,7 +1428,6 @@
private System.Windows.Forms.Label lblMoveInfo;
internal System.Windows.Forms.TextBox txtUpdownP3;
internal System.Windows.Forms.Button btnUpdownP3;
private System.Windows.Forms.CheckBox chbMoveStop;
private System.Windows.Forms.Button SL_OutLine_Run;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.Label lblwidth;
......
......@@ -103,13 +103,22 @@
this.btnExit.Location = new System.Drawing.Point(1131, 4);
this.btnExit.Click += new System.EventHandler(this.btnClose_Click);
//
// lblName
//
this.lblName.Text = "线体横移";
//
// chbDebug
//
this.chbDebug.Location = new System.Drawing.Point(662, 13);
this.chbDebug.Click += new System.EventHandler(this.chbDebug_CheckedChanged);
//
// lblStoreStatus
//
this.lblStoreStatus.Location = new System.Drawing.Point(868, 15);
//
// btnOutStore
//
this.btnOutStore.Text = "出料测试";
this.btnOutStore.Text = "料盘移栽测试";
this.btnOutStore.Click += new System.EventHandler(this.btnOutStore_Click);
//
// btnStart
......@@ -124,6 +133,10 @@
//
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// chbMoveStop
//
this.chbMoveStop.CheckedChanged += new System.EventHandler(this.chbMoveStop_CheckedChanged_1);
//
// timer1
//
this.timer1.Interval = 1000;
......@@ -981,7 +994,7 @@
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmHYEquip";
this.Text = "出料移栽——";
this.Text = "线体横移——";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing);
this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load);
this.Shown += new System.EventHandler(this.FrmIOStatus_Shown);
......
......@@ -59,6 +59,14 @@ namespace OnlineStore.AssemblyLine
txtP1.Text = equipBean.Config.UpDownAxisP1.ToString();
lblHyInfo.Text = equipBean.GetHYDesc();
LoadDOBtn(groupDo);
if(equipBean is HY_Coveryor)
{
btnOutStore.Visible = true;
}
else
{
btnOutStore.Visible = false;
}
IsLoad = true;
}
......@@ -97,14 +105,7 @@ namespace OnlineStore.AssemblyLine
}
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)
{
......@@ -213,9 +214,7 @@ namespace OnlineStore.AssemblyLine
selectControl = newControl;
}
}
}
}
private void cmbWriteIO_DrawItem(object sender, DrawItemEventArgs e)
{
if (e.Index < 0)
......@@ -315,12 +314,13 @@ namespace OnlineStore.AssemblyLine
{
if (equipBean.runStatus.Equals(LineRunStatus.Runing))
{
LogUtil.info(equipBean.Name + "点击:出料测试");
equipBean.StartOutStoreMove(new InOutParam());
InOutParam param = new InOutParam(999, "barcode-test", "posid-test", 12, 7, false, false, false);
LogUtil.info(equipBean.Name + "点击:托盘移栽测试"+ param.ToShortStr());
equipBean.StartOutStoreMove(param);
}
else
{
MessageBox.Show("未启动或不在空闲中,无法入库测试!");
MessageBox.Show("未启动或不在空闲中,无法启动托盘移栽测试!","提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
}
}
......@@ -421,9 +421,7 @@ namespace OnlineStore.AssemblyLine
listDetitalP2.Items.Add(key + "=" + DP2Map[key]);
}
txtDP2.Text = txtP2.Text;
}
}
private void btnDSave_Click(object sender, EventArgs e)
{
int size = Convert.ToInt32(cmbDSize.Text);
......@@ -603,7 +601,28 @@ namespace OnlineStore.AssemblyLine
LogUtil.info(equipBase.Name + "界面点击:" + HY_ClampCylinder_Relax.Text);
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 @@
// chbRightDis
//
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.Size = new System.Drawing.Size(126, 24);
this.chbRightDis.TabIndex = 197;
......
......@@ -115,6 +115,10 @@
//
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// chbMoveStop
//
this.chbMoveStop.CheckedChanged += new System.EventHandler(this.chbMoveStop_CheckedChanged);
//
// timer1
//
this.timer1.Interval = 1000;
......@@ -704,7 +708,7 @@
//
this.axisMoveControl1.Location = new System.Drawing.Point(10, 7);
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;
//
// groupBox2
......
......@@ -357,8 +357,9 @@ namespace OnlineStore.AssemblyLine
{
if (equipBean.runStatus.Equals(LineRunStatus.Runing))
{
LogUtil.info(equipBean.Name + "点击:出库测试");
equipBean.StartOutStoreMove(new InOutParam());
InOutParam param = new InOutParam(999, "barcode-test", "posid-test", 12, 7, false, false, false);
LogUtil.info(equipBean.Name + "点击:出库测试 "+ param.ToShortStr());
equipBean.StartOutStoreMove(param);
}
else
{
......@@ -370,8 +371,9 @@ namespace OnlineStore.AssemblyLine
{
if (equipBean.runStatus.Equals(LineRunStatus.Runing))
{
LogUtil.info(equipBean.Name + "点击:入库测试");
equipBean.StartInStoreMove(new InOutParam());
InOutParam param = new InOutParam(999, "barcode-test", "posid-test", 12, 7, false, false, false);
LogUtil.info(equipBean.Name + "点击:入库测试" + param.ToShortStr());
equipBean.StartInStoreMove(param);
}
else
{
......@@ -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
private InOutParam LastOutParam = new InOutParam();
private bool NeedCheckShelf = true;
internal bool StartTrayOut(InOutParam outParam)
public bool StartTrayOut(InOutParam outParam)
{
if (outParam == null || outParam.PosId == null || outParam.PosId.Equals(""))
{
......
......@@ -378,8 +378,8 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(LineMoveStep.HY13_WaitHY2Ready);
CheckLog("托盘横移" + MoveInfo.SLog + " ,等待" + hyout.Name + " 准备完成(顶升上升,定位下降) ");
GetHyOutEquip().MoveInfo.NewMove(LineMoveType.CheckFixture);
GetHyOutEquip().MoveInfo.NextMoveStep(LineMoveStep.HY51_WaitFree);
hyout.MoveInfo.NewMove(LineMoveType.CheckFixture);
hyout.MoveInfo.NextMoveStep(LineMoveStep.HY51_WaitFree);
ClearTimeoutAlarm("等待" + hyout.Name + "可以横移超时");
}
else if (MoveInfo.IsTimeOut())
......
......@@ -356,8 +356,8 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(LineMoveStep.HY13_WaitHY2Ready);
CheckLog("托盘横移" + MoveInfo.SLog + " ,等待"+ hyOut.Name + "准备完成(顶升上升,定位下降) ");
GetHyOutEquip().MoveInfo.NewMove(LineMoveType.CheckFixture);
GetHyOutEquip().MoveInfo.NextMoveStep(LineMoveStep.HY51_WaitFree);
hyOut.MoveInfo.NewMove(LineMoveType.CheckFixture);
hyOut.MoveInfo.NextMoveStep(LineMoveStep.HY51_WaitFree);
ClearTimeoutAlarm("等待"+ hyOut .Name+ "可以横移超时");
}
else if (MoveInfo.IsTimeOut())
......@@ -590,6 +590,11 @@ namespace OnlineStore.DeviceLibrary
internal override void TrayCanLeave()
{
if (runStatus <= LineRunStatus.Wait)
{
LogUtil.error(Name + "TrayCanLeave :当前未启动,不需要处理");
return;
}
if (TrayIsReady())
{
if (Config.IsSideWayIn)
......
......@@ -461,8 +461,15 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.IsStep(LineMoveStep.JM_07_ClampCheck))
{
//托盘可以离开
JHY_10_ReelProEnd();
if (SecondMoveInfo.IsStep(LineMoveStep.JHY_09_WaitProcessReel))
{
//托盘可以离开
JHY_10_ReelProEnd();
}
else
{
OutLog(logName + MoveInfo.SLog + ":SecondMoveInfo当前无处理,暂时不用 JHY_10_ReelProEnd ");
}
MoveInfo.NextMoveStep(LineMoveStep.JM_10_WaitJNoReel);
OutLog(logName + MoveInfo.SLog + ":等待接驳台无料 ");
......
......@@ -355,6 +355,9 @@ namespace OnlineStore.DeviceLibrary
internal bool TrayIsReady(int deviceID,out int trayNum)
{
trayNum = -1;
bool isDebug = AllEquipMap[deviceID].IsDebug;
if (deviceID.Equals(103))
{
if (T3C1TrayIsReady())
......@@ -362,6 +365,12 @@ namespace OnlineStore.DeviceLibrary
trayNum = T3C1_TrayNum;
return true;
}
//TODO 调试模式直接返回true
if (IsDebug && runStatus <= LineRunStatus.Wait)
{
return true;
}
}else
{
foreach(HYEquipBase hy in HYEquipMap.Values)
......@@ -373,6 +382,12 @@ namespace OnlineStore.DeviceLibrary
trayNum = hy.currTrayNum;
return true;
}
//TODO 调试模式直接返回true
if (IsDebug && hy.runStatus <= LineRunStatus.Wait)
{
return true;
}
}
}
}
......@@ -392,6 +407,7 @@ namespace OnlineStore.DeviceLibrary
{
foreach (HYEquipBase hy in HYEquipMap.Values)
{
if (hy.Config.WorkDeviceId.Equals(deviceID))
{
hy.TrayCanLeave();
......
......@@ -313,6 +313,10 @@ namespace OnlineStore.DeviceLibrary
internal void T3C1TrayCanLeave()
{
if (runStatus <= LineRunStatus.Wait)
{
return;
}
if (T3C1TrayIsReady())
{
MO_16_Stop2Down();
......
......@@ -26,6 +26,7 @@ namespace OnlineStore.DeviceLibrary.IO
{
if (!HCBoardManager.CardInitOk())
{
LogUtil.info("HCIOManager ConnectionIOList,打开板卡");
HCBoardManager.OpenCard();
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!