DAQ_Success
DAQ_Failed
DAQ_ErrChk
DAQ_GetExtendedErrorInfo
[ value ] = DAQ_Success () [ failed ] = DAQ_Failed ( status ) [] = DAQ_ErrChk ( taskHandle, status ) [ errorString ] = DAQ_GetExtendedErrorInfo ()
integer
boolean
string
DAQ_Success returns a constant value (0), which is returned by NI-DAQmx functions to indicate successful operation.
DAQ_Failed can be used to check the status of an operation. It returns T if the operation failed and F otherwise.
DAQ_ErrChk checks the status of an operation and in case of a failure the associated task specified by taskHandle is stopped and cleared and an apropriate error message is issued (see implementation of DAQ_ErrChk in Examples section below).
DAQ_GetExtendedErrorInfo provides just an interface to DAQmxGetExtendedErrorInfo.
For more detailed information about the interfaced functions, please refer to NI-DAQmx 9.x C Function Reference Help.
// implementation of DAQ_ErrChk function []=DAQ_ErrChk(taskHandle, status) if DAQ_Failed( status ) then errorString = DAQ_GetExtendedErrorInfo(); if taskHandle ~= 0 then DAQ_StopTask( taskHandle ); DAQ_ClearTask( taskHandle ); end error( 'DAQmx Error: ' + string(status) + ': '... + errorString, 10000 ); end endfunction | ![]() | ![]() |
NI-DAQmx 9.x C Function Reference Help