public override ErrorInfoWithPause ResetOutPort() { base.ResetOutPort(); for (int i = 0; i < CELLCOUNT; i++) { UnloadPNPDataStations[i].CellData = null; } for (int i = 0; i < CellVacuums.Count; i++) { CellVacuums[i].MainPort.SetOutPortStatus(false); foreach (ClassAirPort vacuum in CellVacuums[i].AirPorts) { vacuum.SetOutPortStatus(false); } } CellBlow.SetOutPortStatus(false); TimeClass.Delay(200); if (!PNPCylinder.SetCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { return(new ErrorInfoWithPause("气缸上升错误", ErrorLevel.Error)); } else { return(null); } }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { if (!e.Cancel) { //ClassBaseWorkZone.ActionEnable = false; CommonFunction.SysPublisher.notifyStopEventSubscribers(null, new StateEventArgs("停止", "程序退出")); TimeClass.Delay(3000); CommonFunction.SysPublisher.notifyProgramExitEventSubscribers(null, new StateEventArgs("程序退出", "")); ClassCommonSetting.CommonRelease(); HardwarePool.SystemHardware.instance.Release(); } }
public static void CloseCDIVision() { timer.StopTimer(); TimeClass.Delay(100); SocketToAOI.DisConnect(); if (AOIProcess != null) { if (!AOIProcess.HasExited) { AOIProcess.CloseMainWindow(); } } AOIProcess = null; }
private void Beep(int SoundTime, int SilenceTime, int Repeat = 1) { if (BeepDisable) { return; } for (int i = 0; i < Repeat; i++) { ThisOutport(EnumOutportName.FrameBuzz).SetOutput(true); TimeClass.Delay(SoundTime); ThisOutport(EnumOutportName.FrameBuzz).SetOutput(false); TimeClass.Delay(SilenceTime); } }
public void Open() { if (!IsSimulation) { GetSerialPort(HardwareSerialPortName.LoadInBarcode).OwnerPort.PortOpen(true); GetSerialPort(HardwareSerialPortName.OutlineMeasLightController).OwnerPort.PortOpen(true); GetSerialPort(HardwareSerialPortName.ThicknessSensorLeft).OwnerPort.PortOpen(true, ThicknessPortOnOpen); GetSerialPort(HardwareSerialPortName.ThicknessSensorMid).OwnerPort.PortOpen(true, ThicknessPortOnOpen); GetSerialPort(HardwareSerialPortName.ThicknessSensorRight).OwnerPort.PortOpen(true, ThicknessPortOnOpen); foreach (BaseIOSys iosys in m_IOSysList) { TimeClass.Delay(12); iosys.StartInputAcquisition(); } } }
public ErrorInfoWithPause ActionOneCCDMeas(EnumCellIndex cellindex, DataComp NeedComp) { if (CCDMeasDataStations[cellindex].CellData != null) { if (ClassWorkFlow.Instance.WorkMode != EnumWorkMode.空跑) { Comps[(int)cellindex] = NeedComp; SnapShot((int)cellindex, CCDMeasDataStations[cellindex].CellData.Barcode); } else { TimeClass.Delay(400); MeasDone[(int)cellindex] = true; } } return(null); }
public ErrorInfoWithPause ActionCylinderTest() { ErrorInfoWithPause res = null; isCylinderTest = !isCylinderTest; for (int i = 0; i < CELLCOUNT; i++) { if (ThicknessDataStations[i].CellData == null) { ThicknessDataStations[i].CellData = ClassDataInfo.NewCellData(); } } while (isCylinderTest) { res = AllCyDown(); if (res != null) { isCylinderTest = false; break; } if (!isCylinderTest) { break; } TimeClass.Delay(ClassCommonSetting.SysParam.ThicknessMeasDelayTime); if (!isCylinderTest) { break; } res = AllCyUp(); if (res != null) { isCylinderTest = false; break; } if (!isCylinderTest) { break; } TimeClass.Delay(ClassCommonSetting.SysParam.ThicknessMeasDelayTime); if (!isCylinderTest) { break; } } return(res); }
public void Release() { //for (int i = 0; i < 64; i++) //{ // m_IOSysList[i / 16].GetOutPort(i % 16).SetOutput(false); //} //for (int i = 0; i < 64; i++) //{ // m_IOSysList[4].GetOutPort(i).SetOutput(false); //} for (int i = 0; i < m_IOSysList.Length; i++) { m_IOSysList[i].StopInputAcquisition(); } TimeClass.Delay(200); for (int i = 0; i < 4; i++) { m_MotionCards[i].Release(); } }
public override ErrorInfoWithPause ResetOutPort() { ErrorInfoWithPause res = null; string err = ""; base.ResetOutPort(); for (int i = 0; i < CellVacuums.Count; i++) { CellVacuums[i].MainPort.SetOutPortStatus(false); foreach (ClassAirPort vacuum in CellVacuums[i].AirPorts) { vacuum.SetOutPortStatus(false); } } CellBlow.SetOutPortStatus(false); TimeClass.Delay(200); PNPCylinder[EnumCellIndex.左电芯].SetCylinderState(CYLIND_UP, 0, false); PNPCylinder[EnumCellIndex.中电芯].SetCylinderState(CYLIND_UP, 0, false); PNPCylinder[EnumCellIndex.右电芯].SetCylinderState(CYLIND_UP, 0, false); if (!PNPCylinder[EnumCellIndex.左电芯].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { err += "左气缸 "; } if (!PNPCylinder[EnumCellIndex.中电芯].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { err += "中气缸 "; } if (!PNPCylinder[EnumCellIndex.右电芯].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { err += "右气缸 "; } if (err != "") { res = new ErrorInfoWithPause("气缸上升错误: " + err.Trim(), ErrorLevel.Error); } return(res); }
public ErrorInfoWithPause ActionSortPNPStartPlaceNG(CallBackCommonFunc AfterActionSortPNPPlaceNG) { ErrorInfoWithPause res = null; //Check vacuum res = CheckVacuumStatus(); if (res != null) { return(res); } bool NeedCylinderDown; //res = UpdateRow(); //if (res != null) return res; if (ClassWorkFlow.Instance.UnloadMode != EnumUnloadMode.全NG) { for (int i = 0; i < CELLCOUNT; i++) { if (CheckCellIsNG(SortNGDataStations[i].CellData)) { if (IsUseBackNGBox) { if (SortNGDataStations[i].CellData.ThicknessNG) { CurrentNGBoxRow = (int)EnumPointPNPY.NGBox1; } else { CurrentNGBoxRow = (int)EnumPointPNPY.NGBox2; } } else { if (SortNGDataStations[i].CellData.ThicknessNG) { CurrentNGBoxRow = (int)EnumPointPNPY.NGBox3; } else { CurrentNGBoxRow = (int)EnumPointPNPY.NGBox4; } } NGBoxCellCount[CurrentNGBoxRow, i]++; string NGData = SortNGDataStations[i].CellData.NGDataInfoString; if (NGData != "") { NGBoxDataInfoString[CurrentNGBoxRow, i] += NGData + Environment.NewLine; } NeedCylinderDown = CheckIfNeedCylinder(NGBoxCellCount[CurrentNGBoxRow, i]); //PNP Y move away res = ActionMove((EnumPointPNPY)CurrentNGBoxRow); if (res != null) { return(res); } if (NeedCylinderDown) { //PNP Z down while (!AxisSortingPNPZ.MoveTo(EnumPointPNPZ.Place, true, 1 + NGBoxCellCount[CurrentNGBoxRow, i] * ClassCommonSetting.SysParam.CurrentProductParam.CellDataSpec.CellThickness.Mean)) //return DispMotionError(AxisSortingPNPZ, EnumPointPNPZ.Place); { res = DispMotionError(AxisSortingPNPZ, EnumPointPNPZ.Place); if (res != null) { return(res); } } //Cylinder down while (!PNPCylinder[i].SetCylinderState(CYLIND_DOWN, ClassErrorHandle.TIMEOUT)) //return new ErrorInfoWithPause("NG挑选PNP气缸下移超时错。", ErrorLevel.Error); { res = WaitAlarmPause("NG挑选PNP放料", "NG挑选PNP气缸下移超时错"); if (res != null) { return(res); } } } else { //PNP Z down while (!AxisSortingPNPZ.MoveTo(EnumPointPNPZ.Place, true, -100 + 1 + GetMaxCount() * ClassCommonSetting.SysParam.CurrentProductParam.CellDataSpec.CellThickness.Mean)) //return DispMotionError(AxisSortingPNPZ, EnumPointPNPZ.Place); { res = DispMotionError(AxisSortingPNPZ, EnumPointPNPZ.Place); if (res != null) { return(res); } } } //Open blow AirControl((EnumCellIndex)i, EnumAirControl.Blow); //AirControl((EnumCellIndex)i, EnumAirControl.Close); //Delay TimeClass.Delay(400); //Cylinder up while (!PNPCylinder[i].SetCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) //return new ErrorInfoWithPause("NG挑选PNP气缸上移超时错。", ErrorLevel.Error); { res = WaitAlarmPause("NG挑选PNP放料", "NG挑选PNP气缸上移超时错"); if (res != null) { return(res); } } //Close blow AirControl((EnumCellIndex)i, EnumAirControl.Close); } } } else { for (int i = 0; i < CELLCOUNT; i++) { if (CheckCellIsNG(SortNGDataStations[i].CellData)) { NGBoxCellCount[CurrentNGBoxRow, i]++; } } NeedCylinderDown = CheckIfNeedCylinder(GetMaxCount()); //PNP Y move away res = ActionMove((EnumPointPNPY)CurrentNGBoxRow); if (res != null) { return(res); } if (NeedCylinderDown) { //PNP Z down while (!AxisSortingPNPZ.MoveTo(EnumPointPNPZ.Place, true, 1 + GetMaxCount() * ClassCommonSetting.SysParam.CurrentProductParam.CellDataSpec.CellThickness.Mean)) //return DispMotionError(AxisSortingPNPZ, EnumPointPNPZ.Place); { res = DispMotionError(AxisSortingPNPZ, EnumPointPNPZ.Place); if (res != null) { return(res); } } //Cylinder down PNPCylinder[0].SetCylinderState(CYLIND_DOWN, 0, false); PNPCylinder[1].SetCylinderState(CYLIND_DOWN, 0, false); PNPCylinder[2].SetCylinderState(CYLIND_DOWN, 0, false); while (!PNPCylinder[0].WaitCylinderState(CYLIND_DOWN, ClassErrorHandle.TIMEOUT) || !PNPCylinder[1].WaitCylinderState(CYLIND_DOWN, ClassErrorHandle.TIMEOUT) || !PNPCylinder[2].WaitCylinderState(CYLIND_DOWN, ClassErrorHandle.TIMEOUT)) //return new ErrorInfoWithPause("NG挑选PNP气缸下移超时错。", ErrorLevel.Error); { res = WaitAlarmPause("NG挑选PNP放料", "NG挑选PNP气缸下移超时错"); if (res != null) { return(res); } } } else { //PNP Z down while (!AxisSortingPNPZ.MoveTo(EnumPointPNPZ.Place, true, -100 + 1 + GetMaxCount() * ClassCommonSetting.SysParam.CurrentProductParam.CellDataSpec.CellThickness.Mean)) //return DispMotionError(AxisSortingPNPZ, EnumPointPNPZ.Place); { res = DispMotionError(AxisSortingPNPZ, EnumPointPNPZ.Place); if (res != null) { return(res); } } } //Open blow AirControl(EnumAirControl.Blow, EnumAirControl.Blow, EnumAirControl.Blow); //AirControl(EnumAirControl.Close, EnumAirControl.Close, EnumAirControl.Close); //Delay TimeClass.Delay(400); //Cylinder up PNPCylinder[0].SetCylinderState(CYLIND_UP, 0, false); PNPCylinder[1].SetCylinderState(CYLIND_UP, 0, false); PNPCylinder[2].SetCylinderState(CYLIND_UP, 0, false); while (!PNPCylinder[0].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT) || !PNPCylinder[1].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT) || !PNPCylinder[2].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) //return new ErrorInfoWithPause("NG挑选PNP气缸上移超时错。", ErrorLevel.Error); { res = WaitAlarmPause("NG挑选PNP放料", "NG挑选PNP气缸上移超时错"); if (res != null) { return(res); } } //Close blow AirControl(EnumAirControl.Close, EnumAirControl.Close, EnumAirControl.Close); } //PNP Z up while (!AxisSortingPNPZ.MoveTo(EnumPointPNPZ.Up)) //return DispMotionError(AxisSortingPNPZ, EnumPointPNPZ.Up); { res = DispMotionError(AxisSortingPNPZ, EnumPointPNPZ.Up); if (res != null) { return(res); } } DoUpdateNGBox(); //PNP Y move away while (!AxisSortingPNPY.MoveTo(EnumPointPNPY.Pick)) //return DispMotionError(AxisSortingPNPY, EnumPointPNPY.Pick); { res = DispMotionError(AxisSortingPNPY, EnumPointPNPZ.Pick); if (res != null) { return(res); } } if (AfterActionSortPNPPlaceNG != null) { AfterActionSortPNPPlaceNG(); } NGBoxFullErrorHandler(this.Name, "", ErrorDialogResult.OK); return(null); }
public ErrorInfoWithPause ActionStartThicknessMeas(DataComp NeedComp, bool CheckVacuum = true) { DataNeedComp = NeedComp; DateTime start = DateTime.Now; if (!HavePart()) { return(null); } ErrorInfoWithPause res; //if (CheckVacuum) //{ // res = CheckVacuumStatus(); // if (res != null) return res; //} TimeSpan span1 = DateTime.Now - start; res = ActionLoad(); TimeSpan span2 = DateTime.Now - start; if (res != null) { return(res); } #region 开始实时读取 //if (ThicknessDataStations[0].CellData != null) //{ // SerialPort[0].SerialDataReceiveEvent += ClassZone厚度测量_SerialDataReceiveEvent0; // StartSerialRealSend(SerialPort[0], HardwareSerialProtocolName.ThicknessRead); //} //if (ThicknessDataStations[1].CellData != null) //{ // SerialPort[1].SerialDataReceiveEvent += ClassZone厚度测量_SerialDataReceiveEvent1; // StartSerialRealSend(SerialPort[1], HardwareSerialProtocolName.ThicknessRead); //} //if (ThicknessDataStations[2].CellData != null) //{ // SerialPort[2].SerialDataReceiveEvent += ClassZone厚度测量_SerialDataReceiveEvent2; // StartSerialRealSend(SerialPort[2], HardwareSerialProtocolName.ThicknessRead); //} #endregion 开始实时读取 TimeClass.Delay(ClassCommonSetting.SysParam.ThicknessMeasDelayTime); //for (int i = 0; i < CELLCOUNT; i++) // if (ThicknessDataStations[i].CellData != null) // GetData((EnumCellIndex)i, SerialPort[i].Data, NeedComp); #region 实时读取结束 //for (int i = 0; i < CELLCOUNT; i++) // if (ThicknessDataStations[i].CellData != null) // StopSerialRealSend(SerialPort[i]); //if (ThicknessDataStations[0].CellData != null) // SerialPort[0].SerialDataReceiveEvent -= ClassZone厚度测量_SerialDataReceiveEvent0; //if (ThicknessDataStations[1].CellData != null) // SerialPort[1].SerialDataReceiveEvent -= ClassZone厚度测量_SerialDataReceiveEvent1; //if (ThicknessDataStations[2].CellData != null) // SerialPort[2].SerialDataReceiveEvent -= ClassZone厚度测量_SerialDataReceiveEvent2; #endregion 实时读取结束 TimeSpan span3 = DateTime.Now - start; res = StartThicknessReading(NeedComp); TimeSpan span4 = DateTime.Now - start; if (res != null) { return(res); } res = ActionUnload(); TimeSpan span5 = DateTime.Now - start; TimeUsage.UpdateTimeUsage(TimeUsageItem.ZoneThickness, span5.TotalSeconds, string.Format("检查真空: {0:0.00}s\n加载电芯: {1:0.00}s\n延时等待: {2:0.00}s\n读取厚度: {3:0.00}s\n卸载电芯: {4:0.00}s", span1.TotalSeconds, (span2 - span1).TotalSeconds, (span3 - span2).TotalSeconds, (span4 - span3).TotalSeconds, (span5 - span4).TotalSeconds)); for (int i = 0; i < ClassBaseWorkZone.CELLCOUNT; i++) { ThicknessCellVacuums[i].SetOutPortStatus(false); } return(res); }
private void buttonStartMeasCali_Click(object sender, EventArgs e) { int index; string temp = ""; switch (comboBoxStdType.Text) { case "大": temp = "Big"; break; case "中": temp = "Middle"; break; case "小": temp = "Small"; break; } labelStatus.Text = ""; if (!CheckOption()) { return; } EnumCellIndex stdindex = (EnumCellIndex)Enum.Parse(typeof(EnumCellIndex), comboBoxStdPosition.Text); bool res = false; if (!optionBoxFromFile.Checked) { ClassCommonSetting.SocketToAOI.SendCommandCamLive(false); index = (int)stdindex; zone.CCDMeasDataStations[stdindex].CellData = ClassDataInfo.NewCellData(); zone.CCDMeasDataStations[stdindex].CellData.Barcode = ClassCommonSetting.SysParam.CurrentProductParam.UseGauge + temp + "Standard"; zone.MeasDone[(int)stdindex] = false; zone.BufferDatas[(int)stdindex] = zone.CCDMeasDataStations[(int)stdindex].CellData; zone.CellVacuums[stdindex].SetOutPortStatus(true); TimeClass.Delay(500); res = DoAction(sender, () => { return(zone.ActionOneCCDMeas(stdindex, DataComp.AddComp)); }) == null; if (!res) { return; } while (!zone.MeasDone[(int)stdindex]) { Application.DoEvents(); } } else { index = 3; res = DoAction(sender, () => { return(zone.MeasPicture(true)); }) == null; } if (res) { DataRow newrow = DT.NewRow(); newrow[colType] = comboBoxStdType.Text; ////Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.CellWidth, ref zone.BufferDatas[index].Data.CellWidth, StdErr, selectBoxYEnable.Checked); Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.CellLength, ref zone.BufferDatas[index].Data.CellLength, StdErr, true); ////Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.AlTabDistance, ref zone.BufferDatas[index].Data.AlTabDistance, StdErr, selectBoxYEnable.Checked); ////Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.NiTabDistance, ref zone.BufferDatas[index].Data.NiTabDistance, StdErr, selectBoxYEnable.Checked); Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.AlTabLength, ref zone.BufferDatas[index].Data.AlTabLength, StdErr, true); Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.NiTabLength, ref zone.BufferDatas[index].Data.NiTabLength, StdErr, true); ////Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.TabDistance, ref zone.BufferDatas[index].Data.TabDistance, StdErr, selectBoxYEnable.Checked); ////Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.AlSealantHeight, ref zone.BufferDatas[index].Data.AlSealantHeight, StdErr, selectBoxXEnable.Checked); ////Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.NiSealantHeight, ref zone.BufferDatas[index].Data.NiSealantHeight, StdErr, selectBoxXEnable.Checked); ////Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.ShoulderWidth, ref zone.BufferDatas[index].Data.ShoulderWidth, StdErr, selectBoxYEnable.Checked); newrow[colCellWidth] = zone.BufferDatas[index].Data.CellWidth.Value.ToString("0.000"); newrow[colCellLength] = zone.BufferDatas[index].Data.CellLength.Value.ToString("0.000"); newrow[colAlTabDist] = zone.BufferDatas[index].Data.AlTabDistance.Value.ToString("0.000"); newrow[colNiTabDist] = zone.BufferDatas[index].Data.NiTabDistance.Value.ToString("0.000"); newrow[colAlTabLen] = zone.BufferDatas[index].Data.AlTabLength.Value.ToString("0.000"); newrow[colNiTabLen] = zone.BufferDatas[index].Data.NiTabLength.Value.ToString("0.000"); newrow[colTabDist] = zone.BufferDatas[index].Data.TabDistance.Value.ToString("0.000"); newrow[colAlSealantHi] = zone.BufferDatas[index].Data.AlSealantHeight.Value.ToString("0.000"); newrow[colNiSealantHi] = zone.BufferDatas[index].Data.NiSealantHeight.Value.ToString("0.000"); newrow[colShoulderWidth] = zone.BufferDatas[index].Data.ShoulderWidth.Value.ToString("0.000"); DT.Rows.Add(newrow); if (!Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.CellWidth, ref zone.BufferDatas[index].Data.CellWidth, StdErr)) { dataGridView1.Rows[DT.Rows.Count - 1].Cells[colCellWidth.Caption].Style.BackColor = Color.Red; dataGridView1.Rows[DT.Rows.Count - 1].Cells[colCellWidth.Caption].Style.ForeColor = Color.Yellow; } if (!Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.CellLength, ref zone.BufferDatas[index].Data.CellLength, StdErr)) { dataGridView1.Rows[DT.Rows.Count - 1].Cells[colCellLength.Caption].Style.BackColor = Color.Red; dataGridView1.Rows[DT.Rows.Count - 1].Cells[colCellLength.Caption].Style.ForeColor = Color.Yellow; } if (!Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.AlTabDistance, ref zone.BufferDatas[index].Data.AlTabDistance, StdErr)) { dataGridView1.Rows[DT.Rows.Count - 1].Cells[colAlTabDist.Caption].Style.BackColor = Color.Red; dataGridView1.Rows[DT.Rows.Count - 1].Cells[colAlTabDist.Caption].Style.ForeColor = Color.Yellow; } if (!Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.NiTabDistance, ref zone.BufferDatas[index].Data.NiTabDistance, StdErr)) { dataGridView1.Rows[DT.Rows.Count - 1].Cells[colNiTabDist.Caption].Style.BackColor = Color.Red; dataGridView1.Rows[DT.Rows.Count - 1].Cells[colNiTabDist.Caption].Style.ForeColor = Color.Yellow; } if (!Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.AlTabLength, ref zone.BufferDatas[index].Data.AlTabLength, StdErr)) { dataGridView1.Rows[DT.Rows.Count - 1].Cells[colAlTabLen.Caption].Style.BackColor = Color.Red; dataGridView1.Rows[DT.Rows.Count - 1].Cells[colAlTabLen.Caption].Style.ForeColor = Color.Yellow; } if (!Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.NiTabLength, ref zone.BufferDatas[index].Data.NiTabLength, StdErr)) { dataGridView1.Rows[DT.Rows.Count - 1].Cells[colNiTabLen.Caption].Style.BackColor = Color.Red; dataGridView1.Rows[DT.Rows.Count - 1].Cells[colNiTabLen.Caption].Style.ForeColor = Color.Yellow; } if (!Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.TabDistance, ref zone.BufferDatas[index].Data.TabDistance, StdErr)) { dataGridView1.Rows[DT.Rows.Count - 1].Cells[colTabDist.Caption].Style.BackColor = Color.Red; dataGridView1.Rows[DT.Rows.Count - 1].Cells[colTabDist.Caption].Style.ForeColor = Color.Yellow; } if (!Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.AlSealantHeight, ref zone.BufferDatas[index].Data.AlSealantHeight, StdErr)) { dataGridView1.Rows[DT.Rows.Count - 1].Cells[colAlSealantHi.Caption].Style.BackColor = Color.Red; dataGridView1.Rows[DT.Rows.Count - 1].Cells[colAlSealantHi.Caption].Style.ForeColor = Color.Yellow; } if (!Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.NiSealantHeight, ref zone.BufferDatas[index].Data.NiSealantHeight, StdErr)) { dataGridView1.Rows[DT.Rows.Count - 1].Cells[colNiSealantHi.Caption].Style.BackColor = Color.Red; dataGridView1.Rows[DT.Rows.Count - 1].Cells[colNiSealantHi.Caption].Style.ForeColor = Color.Yellow; } if (!Cst.Struct_DataInfo.CheckData(comboBoxStdType.Text, _ProdCellDataSpec.ShoulderWidth, ref zone.BufferDatas[index].Data.ShoulderWidth, StdErr)) { dataGridView1.Rows[DT.Rows.Count - 1].Cells[colShoulderWidth.Caption].Style.BackColor = Color.Red; dataGridView1.Rows[DT.Rows.Count - 1].Cells[colShoulderWidth.Caption].Style.ForeColor = Color.Yellow; } } //zone.CCDMeasDataStations[stdindex].CellData = null; //zone.CellVacuums[stdindex].SetOutPortStatus(false); }
public ErrorInfoWithPause ActionCylinderTest() { ErrorInfoWithPause res = null; isCylinderTest = !isCylinderTest; for (int i = 0; i < CELLCOUNT; i++) { if (TopAlignDataStations[i].CellData == null) { TopAlignDataStations[i].CellData = ClassDataInfo.NewCellData(); } } double zoffset = 0; if (ClassCommonSetting.SysParam.CurrentProductParam.BackSideUp) { zoffset = ClassCommonSetting.SysParam.CurrentProductParam.TopHeight; } if (!AxisTopAlignZClamp.MoveTo(EnumPointAlign.Clamp, true, zoffset)) { while (!AxisTopAlignZClamp.MoveTo(EnumPointAlign.Clamp)) //return DispMotionError(AxisTopAlignZClamp, EnumPointAlign.Clamp); { res = DispMotionError(AxisTopAlignZClamp, EnumPointAlign.Clamp); if (res != null) { return(res); } } } while (isCylinderTest) { res = AllCyDown(); if (res != null) { isCylinderTest = false; break; } if (!isCylinderTest) { break; } TimeClass.Delay(ClassCommonSetting.SysParam.ThicknessMeasDelayTime); if (!isCylinderTest) { break; } res = AllCyUp(); if (res != null) { isCylinderTest = false; break; } if (!isCylinderTest) { break; } TimeClass.Delay(ClassCommonSetting.SysParam.ThicknessMeasDelayTime); if (!isCylinderTest) { break; } } while (!AxisTopAlignZClamp.MoveTo(EnumPointAlign.Release)) //return DispMotionError(AxisTopAlignZClamp, EnumPointAlign.Release); { res = DispMotionError(AxisTopAlignZClamp, EnumPointAlign.Release); if (res != null) { return(res); } } return(res); }