private void InitCa310() { #region Init Ca310 if (flagCa310Mode) { if (ca310Pipe == null) { ca310Pipe = new Ca310Pipe(System.Windows.Forms.Application.StartupPath); args.StatusInfo = "Initilaze Ca310 device."; if (!ca310Pipe.Connect()) { args.StatusInfo = ca310Pipe.ErrorMessage; } else { args.StatusInfo = "Ca310 has Connected."; ca310Pipe.ResetZero(); } } } else { if (ca310Pipe != null) { ca310Pipe.Disconnect(); ca310Pipe = null; } } #endregion }
public ColorCalibration(DUTclass.DUT dut, Ca310Pipe pipe, Fixture fixture, Colorimeter colorimeter) { this.dut = dut; this.ca310Pipe = pipe; this.fixture = fixture; this.camera = colorimeter; this.rgbList = new List <int[]>(); FULLNAME = this.filepath + @"\RGB.txt"; PATH = this.filepath + @"\ColorCalibration\"; }
// Online mode private void RunSequence() { #region Init Ca310 if (m_flagCa310Mode) { if (ca310Pipe == null) { ca310Pipe = new Ca310Pipe(Application.StartupPath); sslStatus.Text = "Initilaze Ca310 device."; if (!ca310Pipe.Connect()) { sslStatus.Text = ca310Pipe.ErrorMessage; } else { MessageBox.Show("Please switch the Ca310 to init."); sslStatus.Text = "Ca310 has Connected."; ca310Pipe.ResetZero(); } } } else { if (ca310Pipe != null) { ca310Pipe.Disconnect(); ca310Pipe = null; } } #endregion do { fixture.CheckDoubleStart(); fixture.HoldIn(); while (!dut.checkDUT()) { sslStatus.Text = "Wait DUT."; Thread.Sleep(100); if (m_flagExit) { break; } } log.WriteUartLog(string.Format("DUT connected, DeviceID: {0}\r\n", dut.DeviceID)); tbox_dut_connect.Text = "DUT connected"; tbox_dut_connect.BackColor = Color.Green; sslStatus.Text = "Please type in 16 digit SN"; Thread.Sleep(500); while (serialNumber == "") { sslStatus.Text = "Wait type SN"; } log.SerialNumber = tbox_sn.Text; log.WriteUartLog(string.Format("Serial number: {0}\r\n", tbox_sn.Text)); if (!checkshopfloor()) { sslStatus.Text = "Shopfloor system is not working"; } else { log.WriteUartLog("Shopfloor has connected.\r\n"); btn_start.Enabled = false; btn_start.BackColor = Color.LightBlue; this.RunTest(); } serialNumber = ""; fixture.IntegratingSphereDown(); fixture.RotateOff(); fixture.HoldOut(); }while (!m_flagExit); }
public LuminanceCalibration(Ca310Pipe pipe, Fixture fixture, Colorimeter colorimeter) { this.ca310Pipe = pipe; this.fixture = fixture; this.camera = colorimeter; }