9 QcepObject(tr(
"extraChannel(%1)").arg(chnum), NULL),
10 m_ChannelNumber(
QcepSettingsSaverPtr(), this,
"channelNumber", chnum,
"Extra Input Channel Number"),
11 m_Enabled(saver, this,
"enabled", 1,
"Enabled?"),
12 m_Plotted(saver, this,
"plotted", 1,
"Plotted?"),
13 m_ChannelName(saver, this,
"channelName",
"",
"NIDAQ name of channel"),
15 m_Mode(saver, this,
"mode", 0,
"Channel Mode (0 = summed, 1 = averaged, 2 = maximum, 3 = minimum)"),
16 m_SaveWave(saver, this,
"saveWave", 0,
"Save entire waveform (0 = no, 1 = yes)"),
17 m_Min(saver, this,
"min", -10.0,
"Minimum Input value for Analog Channel (in Volts)"),
18 m_Max(saver, this,
"max", 10.0,
"Maximum Input Value for Analog Channel (in Volts)"),
19 m_Start(saver, this,
"start", 0.0,
"Start Offset for Channel (in sec after notional exposure start)\n"
20 "i.e. Negative values mean times before start of exposure"),
21 m_End(saver, this,
"end", 0.0,
"End Offset for Channel (in sec before notional exposure end)\n"
22 "i.e. Negative values mean times after end of exposure"),
23 m_TriggerMode(saver, this,
"triggerMode", 0,
"Trigger Mode (0 = None, 1 = +Edge, 2 = -Edge, 3 = +Level, 4 = -Level)"),
24 m_TriggerLevel(saver, this,
"triggerLevel", 0.0,
"Trigger Level (in Volts)"),
25 m_TriggerHysteresis(saver, this,
"triggerHysteresis", 0.0,
"Trigger Hysteresis (in Volts)"),
26 m_PhysicalChannel(
QcepSettingsSaverPtr(), this,
"physicalChannel", 0,
"Physical Channel Number"),
70 return nidaq->readContinuousInputChannel(get_PhysicalChannel());
74 return QVector<double>();
87 int nSamples = nidaq->countContinuousInput();
88 int startOffset = xtra->get_SampleRate()*(0.1 + get_Start());
90 if (startOffset > nSamples) {
92 }
else if (startOffset > 0) {
111 int nSamples = nidaq->countContinuousInput();
112 int endOffset = xtra->get_SampleRate()*(0.1 + xtra->get_ExposureTime() - get_End());
114 if (endOffset > nSamples) {
116 }
else if (endOffset > 0) {
129 int mode = get_Mode();
156 for(
int i=i0; i<i1; i++) {
173 for(
int i=i0; i<i1; i++) {
178 return (n>0 ? sum/n : 0);
190 for(
int i=i0; i<i1; i++) {
214 for(
int i=i0; i<i1; i++) {
231 int trigMode = get_TriggerMode();
264 double level = get_TriggerLevel();
265 double hyst = get_TriggerHysteresis();
271 double tlevel = level*polarity;
272 double lowlevel = tlevel-fabs(hyst);
273 double highlevel = tlevel+fabs(hyst);
278 for(
int i=i0; i<i1; i++) {
279 double v=res[i]*polarity;
281 if (v < lowlevel) nlow += 1;
284 if (nlow && (v > highlevel)) nhigh += 1;
286 if (v > highlevel) nhigh += 1;
294 tres = ((nlow > 0) && (nhigh > 0));
void valueChanged(QString val, int index)
virtual void readSettings(QSettings *set, QString section)
QWeakPointer< QxrdExperiment > QxrdExperimentWPtr
QVector< double > QcepDoubleVector
QSharedPointer< QcepSettingsSaver > QcepSettingsSaverPtr
QSharedPointer< QxrdNIDAQPluginInterface > QxrdNIDAQPluginInterfacePtr
virtual void writeSettings(QSettings *set, QString section)
void valueChanged(double val, int index)
void valueChanged(bool val, int index)
QWeakPointer< QcepSettingsSaver > QcepSettingsSaverWPtr