public KonicaCa310() { objCa200 = new Ca200(); objCa200.AutoConnect(); objCa = objCa200.SingleCa; objProbe = objCa.SingleProbe; }
private void ZeroCalBtn_Click(object sender, EventArgs e) { try { if (isCa210Connected == true) { Ca210.AutoConnect(); LogListBox.Items.Add("Connect"); Ca210.SingleCa.CalZero(); LogListBox.Items.Add("Cal Zero"); Ca210.SingleCa.SyncMode = 3; Ca210.SingleCa.AveragingMode = 2; Ca210.SingleCa.SetAnalogRange(Convert.ToSingle(2.5), Convert.ToSingle(2.5)); Ca210.SingleCa.DisplayMode = 0; Ca210.SingleCa.Memory.ChannelNO = 0; } else if (isCa410Connected == true) { GetErrorMessage(Ca410.AutoConnect()); GetErrorMessage(Ca410.get_SingleCa(ref objCa)); GetErrorMessage(objCa.get_Memory(ref objMemory)); GetErrorMessage(objCa.get_SingleProbe(ref objProbe)); // default setting int freqmode = 4; // SyncMode : INT double freq = 60.0; //frequency = 60.0Hz int speed = 1; //Measurement speed : FAST int Lvmode = 1; //Lv : cd/m2 GetErrorMessage(objCa.CalZero()); //Zero-Calibration GetErrorMessage(objCa.put_DisplayProbe("P1")); //Set display probe to P1 GetErrorMessage(objCa.put_SyncMode(freqmode, freq)); //Set sync mode and frequency GetErrorMessage(objCa.put_AveragingMode(speed)); //Set measurement speed GetErrorMessage(objCa.put_BrightnessUnit(Lvmode)); //SetBrightness unit string PID = ""; string dispprobe = ""; int syncmode = 0; double syncfreq = 0.0; int measspeed = 0; //Get settings GetErrorMessage(objCa.get_PortID(ref PID)); //Get connection interface LogListBox.Items.Add("PortID:" + PID); GetErrorMessage(objCa.get_DisplayProbe(ref dispprobe)); //Get display probe LogListBox.Items.Add("DisplayProbe:" + dispprobe); GetErrorMessage(objCa.get_SyncMode(ref syncmode, ref syncfreq)); //Get sync mode and frequency LogListBox.Items.Add("SyncMode:" + syncmode + ",Syncfreq:" + syncfreq); GetErrorMessage(objCa.get_AveragingMode(ref measspeed)); //Get measurement speed LogListBox.Items.Add("MeasurementSpeed:" + measspeed); } } catch (Exception ex) { LogListBox.Items.Add(ex.Message); } }
private void ZeroCalBtn_Click(object sender, EventArgs e) { try { objCa200.AutoConnect(); Logbox.Items.Add("Connect"); objCa200.SingleCa.CalZero(); Logbox.Items.Add("zeroCal"); objCa200.SingleCa.SyncMode = 3; objCa200.SingleCa.AveragingMode = 2; objCa200.SingleCa.SetAnalogRange(Convert.ToSingle(2.5), Convert.ToSingle(2.5)); objCa200.SingleCa.DisplayMode = 0; objCa200.SingleCa.Memory.ChannelNO = 0; isColorAnalyzerOpened = true; } catch (Exception ex) { Logbox.Items.Add(ex.Message); } }