/** * Called when the logger thread starts * */ public void bw_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker worker = sender as BackgroundWorker; initializeAsync(); while (!worker.CancellationPending) { //Get data from the instrument InstrumentDataset currentData = getInstrumentData(); //save this data into the software data buffer storeData(currentData); //update events updateEvents(); //Update any errors updateErrors(); //update the settings if necessary updateSettings(); Thread.Sleep(500); } e.Cancel = true; }
/** * Stores the data that was just received from the PSU * */ protected override void storeData(InstrumentDataset data) { base.storeData(data); try { dataSet.AddData(data.getLatestData()); } catch (Exception ex) { } }
/** * Stores the data that was just received from the PSU * */ protected override void storeData(InstrumentDataset data) { base.storeData(data); try { InstrumentDatasetEventArgs datEvent = new InstrumentDatasetEventArgs(); datEvent.dataSet = data; if (datEvent.dataSet != null) { OnSaveData(datEvent); } } catch (Exception ex) { } }
/** * Should implement saving the current data from the instrument to the software buffer * */ protected virtual void storeData(InstrumentDataset data) { }
protected override void storeData(InstrumentDataset data) { currentDataset = (PicoTC08InstrumentDataset)data; base.storeData(data); }
//ke2700Driver.SetChannelList("110"); // ke2700Driver.ConfigureMeasurement(KE2700Constants.Temperature, 100, 0.1); //ke2700Driver.SetInt32(KE2700Properties.TempUnit, KE2700Constants.TempCelsius); //ke2700Driver.ConfigureTransducerType(KE2700Constants.Thermocouple); //ke2700Driver.ConfigureThermocouple(KE2700Constants.TempTcK, KE2700Constants.TcRefInternal); //ke2700Driver.ConfigureThermistor(KE2700Constants.TempFrtdPt100); //ke2700Driver.SetChannelList("110,120"); //ke2700Driver.SetInt32(KE2700Properties.BufTimestampType, KE2700Constants.TimestampRtclock); //ke2700Driver.ConfigureApertureTimeInfo(1, KE2700Constants.Seconds); // ke2700Driver.ConfigureMonitorChannel("", 0, KE2700Constants.ScanTriggerImm); // ke2700Driver.SetInt32(KE2700Properties.BufElements, KE2700Constants.Element_Reading | KE2700Constants.Element_Channel | KE2700Constants.Element_Tstamp); //updateKeithleyReadings(); protected override void storeData(InstrumentDataset data) { base.storeData(data); dataSet.AddData(data.getLatestData()); }