Scope
|
Classes | |
class | CDAQmxAnalogInTask |
class | CDAQmxAnalogOutTask |
class | CDAQmxCounterOutTask |
class | CDAQmxDigitalOutTask |
class | CDAQmxTask |
Functions | |
bool | CheckError (const int32 &error) |
double | PredictSampleRate (const double &_desiredrate, const uint32_t &_nochannels, const double &_refclockrate, const int32 &_mode) |
double | CoerceSampleRates (const double &_desiredrate, const uint32_t &_nochannelsin, const uint32_t &_nochannelsout, const double &_refclockrate) |
std::wstring | ClockString (const scope::DaqTimingHelper::Mode &_timing, const std::wstring &_externalclocksource) |
This is basically a C++ wrapper around NI's DAQmx C library.
Contains all DAQmx related stuff.
bool DAQmx::CheckError | ( | const int32 & | error | ) |
Checks return value of NI DAQmx function for error, prints out error information and throws an exception if DAQMX_THROW_EXCEPTION is defined true.
Definition at line 9 of file DAQmxTask.cpp.
double DAQmx::PredictSampleRate | ( | const double & | _desiredrate, |
const uint32_t & | _nochannels, | ||
const double & | _refclockrate, | ||
const int32 & | _mode | ||
) |
Predicts the actual sampling rate.
The real sample rate for analog in and out operations can differ slightly. Read NI Knowledge Base "How Is the Actual Scan Rate Determined When I Specify the Scan Rate for My Data Acquisition?".
see here: http://digital.ni.com/public.nsf/websearch/5782F1B396474BAF86256A1D00572D6E?OpenDocument
and here: http://digital.ni.com/public.nsf/allkb/4BBE1409700F6CE686256E9200652F6B?OpenDocument
for details of the calculations.
Note that the result of this function does not take into account the maximum sample rate of your device, this can only be looked up in the devices data sheet!!!! For NI-6259: 32 bit AI and AO clocks.
[in] | _desiredrate | desired sample rate |
[in] | _nochannels | number of channels |
[in] | _refclockrate | rate of the reference clock |
[in] | _mode | Modes for PredictSampleRate (defined in NIDAQmx.h)
|
Definition at line 23 of file DAQmxTask.cpp.
double DAQmx::CoerceSampleRates | ( | const double & | _desiredrate, |
const uint32_t & | _nochannelsin, | ||
const uint32_t & | _nochannelsout, | ||
const double & | _refclockrate | ||
) |
Calculates a sampling rate which both analog in and out can comply to.
see here: http://digital.ni.com/public.nsf/websearch/5782F1B396474BAF86256A1D00572D6E?OpenDocument
for an explanation why both rates could be different.
Note that the result of this function does not take into account the maximum sample rate of your device, this can only be looked up in the devices data sheet!!!!
[in] | _desiredrate | desired sampling rate (in Hz) |
[in] | _nochannelsin | the number of channels in the input task |
[in] | _nochannelsout | the number of channels in the output task |
[in] | _refclockrate | frequency of the reference clock (in Hz) |
Definition at line 37 of file DAQmxTask.cpp.
std::wstring DAQmx::ClockString | ( | const scope::DaqTimingHelper::Mode & | _timing, |
const std::wstring & | _externalclocksource | ||
) |
Generates a string for the sample clock from daq_timing.
_timing | choosen timing mode (onboard, reference clock, external clock) |
_externalclocksource | source of an external sample clock |
Definition at line 46 of file DAQmxTask.cpp.