How to configure and read data on two channels?
How to configure and read data on two channels?
To configure and read the data on two channels, user should:
1) Configure two channels.
For instance:
//configure channel1
driver.Channels["Channel1"].Configure(range, offset, coupling, true);
//configure channel2
driver.Channels["Channel2"].Configure(range_ch2, offset_ch2, coupling,
true);
2) Readout both channels.
For instance:
// Fetch acquired data.
// Giving a null pointer as data array to the fetch function means the
driver will allocate the proper amount of memory during
// the fetch call.
Ivi.Digitizer.IWaveformCollection<Int16> waveformsCh1 = null;
Ivi.Digitizer.IWaveformCollection<Int16> waveformsCh2 = null;
waveformsCh1 = driver.Channels
["Channel1"].MultiRecordMeasurement.FetchMultiRecordWaveform(firstRecord,
numRecords,
offsetWithinRecord,
numPointsPerRecord,
waveformsCh1
);
//fetch the data on channel 2
waveformsCh2 = driver.Channels
["Channel2"].MultiRecordMeasurement.FetchMultiRecordWaveform(firstRecord,
numRecords,
offsetWithinRecord,
numPointsPerRecord,
waveformsCh2
);
62
U5309A User's Manual