Exemplo n.º 1
0
        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
        }
Exemplo n.º 2
0
 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\";
 }
Exemplo n.º 3
0
        // 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);
        }
Exemplo n.º 4
0
 public LuminanceCalibration(Ca310Pipe pipe, Fixture fixture, Colorimeter colorimeter)
 {
     this.ca310Pipe = pipe;
     this.fixture   = fixture;
     this.camera    = colorimeter;
 }