Upload
others
View
14
Download
0
Embed Size (px)
Citation preview
DAQmxAddGlobalChansToTaskint32DAQmxAddGlobalChansToTask(TaskHandletaskHandle,constchar
channelNames[]);
PurposeAddsglobalvirtualchannelsfromMAXtothegiventask.
ParametersInput
Name Type Description
taskHandle TaskHandle ThetasktowhichtoaddthechannelsfromMAX.
channelNames constchar[] Thechannelstoaddtothetask.Youcanspecifyalistorrangeofchannels.ThesechannelsmustbevalidchannelsavailablefromMAX.Ifyoupassaninvalidchannel,NI-DAQmxreturnsanerror.Thisvalueisignoredifitisempty.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxClearTaskint32DAQmxClearTask(TaskHandletaskHandle);
PurposeClearsthetask.Beforeclearing,thisfunctionstopsthetask,ifnecessary,andreleasesanyresourcesreservedbythetask.Youcannotuseataskonceyouclearthetaskwithoutrecreatingorreloadingthetask.IfyouusetheDAQmxCreateTaskfunctionoranyoftheNI-DAQmxCreateChannelfunctionswithinaloop,usethisfunctionwithintheloopafteryoufinishwiththetasktoavoidallocatingunnecessarymemory.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoclear.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTaskint32DAQmxCreateTask(constchartaskName[],TaskHandle*taskHandle);
PurposeCreatesatask.Ifyouusethisfunctiontocreateatask,youmustuseDAQmxClearTasktodestroyit.Ifyouusethisfunctionwithinaloop,NI-DAQmxcreatesanewtaskineachiterationoftheloop.UsetheDAQmxClearTaskfunctionwithintheloopafteryoufinishwiththetasktoavoidallocatingunnecessarymemory.
ParametersInput
Name Type Description
taskName constchar[] Nameassignedtothetask.
NoteThisnamemaybechangedinternally.IfyouareusingtheCAPI,callDAQmxGetTaskNametoverifywhetherthenamewaschangedduringcreation.IfyouareusingtheCVIAPI,callDAQmxGetTaskAttributewithattributeIDDAQmx_Task_Nametoverifythenamechange.
Output
Name Type Description
taskHandle TaskHandle* Areferencetothetaskcreatedinthisfunction.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxIsTaskDoneint32DAQmxIsTaskDone(TaskHandletaskHandle,bool32*isTaskDone);
PurposeQueriesthestatusofthetaskandindicatesifitcompletedexecution.Usethisfunctiontoensurethatthespecifiedoperationiscompletebeforeyoustopthetask.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
Output
Name Type Description
isTaskDone bool32* Indicateswhetherthemeasurementorgenerationcompleted.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxLoadTaskint32DAQmxLoadTask(constchartaskName[],TaskHandle*taskHandle);
PurposeLoadsanexistingnamedtaskfromMeasurement&AutomationExplorer(MAX).Ifyouusethisfunctiontoloadatask,youmustuseDAQmxClearTasktodestroyit.
ParametersInput
Name Type Description
taskName constchar[] AnamedtaskinMAX.
Output
Name Type Description
taskHandle TaskHandle* Areferencetothetaskreturnedbythisfunction.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxStartTaskint32DAQmxStartTask(TaskHandletaskHandle);
PurposeTransitionsthetaskfromthecommittedstatetotherunningstate,whichbeginsmeasurementorgeneration.Usingthisfunctionisrequiredforsomeapplicationsandoptionalforothers.Ifyoudonotusethisfunction,ameasurementtaskstartsautomaticallywhenareadoperationbegins.TheautoStartparameteroftheNI-DAQmxWritefunctionsdeterminesifagenerationtaskstartsautomaticallywhenyouuseanNI-DAQmxWritefunction.IfyoudonotcallDAQmxStartTaskandDAQmxStopTaskwhenyoucallNI-DAQmxReadfunctionsorNI-DAQmxWritefunctionsmultipletimes,suchasinaloop,thetaskstartsandstopsrepeatedly.Startingandstoppingataskrepeatedlyreducestheperformanceoftheapplication.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktostart.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxStopTaskint32DAQmxStopTask(TaskHandletaskHandle);
PurposeStopsthetaskandreturnsittothestateitwasinbeforeyoucalledDAQmxStartTaskorcalledanNI-DAQmxWritefunctionwithautoStartsettoTRUE.IfyoudonotcallDAQmxStartTaskandDAQmxStopTaskwhenyoucallNI-DAQmxReadfunctionsorNI-DAQmxWritefunctionsmultipletimes,suchasinaloop,thetaskstartsandstopsrepeatedly.Startingandstoppingataskrepeatedlyreducestheperformanceoftheapplication.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktostop.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxRegisterDoneEventint32DAQmxRegisterDoneEvent(TaskHandletaskHandle,uInt32options,
DAQmxDoneEventCallbackPtrcallbackFunction,void*callbackData);
PurposeRegistersacallbackfunctiontoreceiveaneventwhenataskstopsduetoanerrororwhenafiniteacquisitiontaskorfinitegenerationtaskcompletesexecution.ADoneeventdoesnotoccurwhenataskisstoppedexplicitly,suchasbycallingDAQmxStopTask.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
options uInt32 Usethisparametertosetcertainoptions.Youcancombineflagswiththebitwise-ORoperator('|')tosetmultipleoptions.Passavalueofzeroifnooptionsneedtobeset.
Value0
DAQmx_Val_SynchronousEventCallbacks
NoteIfyouarereceivingsynchronouseventsfasterthanyouareprocessingthem,thentheuserinterfaceofyourapplicationmightbecomeunresponsive.
callbackFunction DAQmxDoneEventCallbackPtr ThefunctionthatyouwantDAQmxtocallwhentheeventoccurs.Thefunctionpassinthisparametermusthavethefollowingprototype:int32CVICALLBACKCallback(TaskHandletaskHandle,int32
*callbackData);Uponentrytothecallback,thetaskHandleparametercontainsonwhichtheeventoccurred.Thestatusparametercontainsthestatusofthetaskwhentheeventoccurred.Ifthestatusvalueisnegative,itindicatesanerror.statusvalueiszero,itindicatesnoerror.Ifthestatusvalueispositive,itindicatesawarning.ThecallbackDataparametercontainsthevalueyoupassedinthecallbackDataparameterofthisfunction.
callbackData void* AvaluethatyouwantDAQmxtopasstothecallbackfunctionasthefunctiondataparameter.Donotpasstheaddressofalocalvariableoranyothervariablethatmightnotbevalidwhenthefunctionisexecuted.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxRegisterEveryNSamplesEventint32DAQmxRegisterEveryNSamplesEvent(TaskHandletaskHandle,int32
everyNsamplesEventType,uInt32nSamples,uInt32options,DAQmxEveryNSamplesEventCallbackPtrcallbackFunction,void*callbackData);
PurposeRegistersacallbackfunctiontoreceiveaneventwhenthespecifiednumberofsamplesiswrittenfromthedevicetothebufferorfromthebuffertothedevice.Thisfunctiononlyworkswithdevicesthatsupportbufferedtasks.Whenyoustopataskexplicitlyanypendingeventsarediscarded.Forexample,ifyoucallDAQmxStopTaskthenyoudonotreceiveanypendingevents.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
everyNsamplesEventType int32 Thetypeofeventyouwanttoreceive.
ValueDAQmx_Val_Acquired_Into_Buffer
DAQmx_Val_Transferred_From_Buffer
nSamples uInt32 Thenumberofsamplesafterwhicheacheventshouldoccur.
options uInt32 Usethisparametertosetcertainoptions.Youcancombineflagswiththebitwise-ORoperator('|')tosetmultipleoptions.Passavalueofzeroifnooptionsneedtobeset.
Value0
DAQmx_Val_SynchronousEventCallbacks
NoteIfyouarereceivingsynchronouseventsfasterthanyouareprocessingthem,thentheuserinterfaceofyourapplicationmightbecomeunresponsive.
callbackFunction DAQmxEveryNSamplesEventCallbackPtr ThefunctionthatyouwantDAQmxtocallwhentheeventoccurs.Thefunctionpassinthisparametermusthavethefollowingprototype:int32CVICALLBACKCallback(TaskHandletaskHandle,int32everyNsamplesEventType,uInt32nSamples,void*callbackData);Uponentrytothecallback,thetaskHandleonwhichtheeventoccurred.TheeveryNSamplesEventTypevalueyoupassedintheeveryNSamplesEventTypenSamplesparametercontainsthevalueyoupassedinthethisfunction.ThecallbackDataparametercontainsthevalueyoupassedinthecallbackDataparameterofthisfunction.
callbackData void* AvaluethatyouwantDAQmxtopasstothecallbackfunctionasthefunctiondataparameter.Donotpasstheaddressofalocalvariableoranyothervariablethatmightnotbevalidwhenthefunctionisexecuted.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxRegisterSignalEventint32DAQmxRegisterSignalEvent(TaskHandletaskHandle,int32signalID,
uInt32options,DAQmxSignalEventCallbackPtrcallbackFunction,void*callbackData);
PurposeRegistersacallbackfunctiontoreceiveaneventwhenthespecifiedhardwareeventoccurs.Whenyoustopataskexplicitlyanypendingeventsarediscarded.Forexample,ifyoucallDAQmxStopTaskthenyoudonotreceiveanypendingevents.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
signalID int32 Thesignalforwhichyouwanttoreceiveresults.
ValueDAQmx_Val_SampleClockDAQmx_Val_SampleCompleteEvent
DAQmx_Val_ChangeDetectionEvent
DAQmx_Val_CounterOutputEvent
options uInt32 Usethisparametertosetcertainoptions.Youcancombineflagswiththebitwise-ORoperator('|')tosetmultipleoptions.Passavalueofzeroifnooptionsneedtobeset.
Value0
DAQmx_Val_SynchronousEventCallbacks
NoteIfyouarereceivingsynchronouseventsfasterthanyouareprocessingthem,thentheuserinterfaceofyourapplicationmightbecomeunresponsive.
callbackFunction DAQmxSignalEventCallbackPtr ThefunctionthatyouwantDAQmxtocallwhentheeventoccurs.Thefunctionpassinthisparametermusthavethefollowingprototype:int32CVICALLBACKCallback(TaskHandletaskHandle,int32*callbackData);Uponentrytothecallback,thetaskHandleparametercontainsonwhichtheeventoccurred.ThesignalIDparametercontainsthevalueyoupassedinthesignalIDparameterofthisfunction.ThecallbackDatavalueyoupassedinthecallbackDataparameterofthisfunction.
callbackData void* AvaluethatyouwantDAQmxtopasstothecallbackfunctionasthefunctiondataparameter.Donotpasstheaddressofalocalvariableoranyothervariablethatmightnotbevalidwhenthefunctionisexecuted.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxGetNthTaskChannelint32DAQmxGetNthTaskChannel(TaskHandletaskHandle,uInt32index,char
buffer[],int32bufferSize);
PurposeReturnstheNthchannel.ThisfunctiontakesthetaskHandle,index,andbufferSizeyouspecifyandreturnstheNthchannel.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
index uInt32 TheNthchannelyouwanttoreturn.Theindexstartsat1.
bufferSize int32 Thesize,inbytes,ofbuffer.Ifyoupass0,thisfunctionreturnsthenumberofbytesneededtoallocate.
Output
buffer char[] TheNthchannelintheindex.IfyoupassNULL,thisfunctionreturnsthenumberofbytesneededtoallocate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.Forthisfunction,ifyoupassNULLforthebufferor0forthebuffersize,thisfunctionreturnsthenumberofbytesneededtoallocate.
DAQmxGetNthTaskDeviceint32DAQmxGetNthTaskDevice(TaskHandletaskHandle,uInt32index,char
buffer[],int32bufferSize);
PurposeReturnstheNthdevice.ThisfunctiontakesthetaskHandle,index,andbufferSizeyouspecifyandreturnstheNthdevice.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
index uInt32 TheNthdeviceyouwanttoreturn.Theindexstartsat1.
bufferSize int32 Thesize,inbytes,ofbuffer.Ifyoupass0,thisfunctionreturnsthenumberofbytesneededtoallocate.
Output
buffer char[] TheNthdeviceintheindex.IfyoupassNULL,thisfunctionreturnsthenumberofbytesneededtoallocate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.Forthisfunction,ifyoupassNULLforthebufferor0forthebuffersize,thisfunctionreturnsthenumberofbytesneededtoallocate.
DAQmxTaskControlint32DAQmxTaskControl(TaskHandletaskHandle,int32action);
PurposeAltersthestateofataskaccordingtotheactionyouspecify.Tominimizethetimerequiredtostartatask,forexample,DAQmxTaskControlcancommitthetaskpriortostarting.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
action int32 Specifieshowtoalterthetaskstate.
Value DescriptionDAQmx_Val_Task_Start Startsexecutionofthe
task.DAQmx_Val_Task_Stop Stopsexecutionofthe
task.DAQmx_Val_Task_Verify Verifiesthatalltask
parametersarevalidforthehardware.
DAQmx_Val_Task_Commit Programsthehardwareasmuchaspossibleaccordingtothetaskconfiguration.
DAQmx_Val_Task_Reserve Reservesthehardwareresourcesneededforthetask.Noothertaskscanreservethesesameresources.
DAQmx_Val_Task_Unreserve Releasesallpreviouslyreservedresources.
DAQmx_Val_Task_Abort Abortisusedtostopanoperation,suchasReadorWrite,thatiscurrentlyactive.Abortputsthetaskintoanunstablebutrecoverablestate.Torecoverthetask,callStarttorestartthetask
orcallStoptoresetthetaskwithoutstartingit.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIAccelChanint32DAQmxCreateAIAccelChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,float64sensitivity,int32sensitivityUnits,int32currentExcitSource,float64currentExcitVal,constcharcustomScaleName[]);
PurposeCreateschannel(s)thatuseanaccelerometertomeasureaccelerationandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
terminalConfig int32 Theinputterminalconfigurationforthechannel.
Value DescriptionDAQmx_Val_Cfg_Default(-1)
Atruntime,NI-DAQmxchoosesthedefaultterminalconfigurationforthechannel.
DAQmx_Val_RSE Referencedsingle-endedmode
DAQmx_Val_NRSE Nonreferencedsingle-endedmode
DAQmx_Val_Diff Differentialmode
DAQmx_Val_PseudoDiff Pseudodifferentialmode
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnaccelerationmeasurementsfromthechannel.
Name DescriptionDAQmx_Val_AccelUnit_g G.1gis
approximatelyequalto9.81m/s
DAQmx_Val_FromCustomScale Unitsspecifiedbyacustomscale.UsecustomScaleNametospecifyacustom
scale.
sensitivity float64 Thesensitivityofthesensor.ThisvalueisintheunitsyouspecifywithsensitivityUnits.Refertothesensordocumentationtodeterminethisvalue.
sensitivityUnits int32 Theunitsofsensitivity.
Name DescriptionDAQmx_Val_mVoltsPerG mVolts/g.DAQmx_Val_VoltsPerG Volts/g.
currentExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitation
sourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
currentExcitVal float64 Theamountofexcitation,inamperes,thatthesensorrequires.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAICurrentChanint32DAQmxCreateAICurrentChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,int32shuntResistorLoc,float64extShuntResistorVal,constcharcustomScaleName[]);
PurposeCreateschannel(s)forcurrentmeasurementandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
terminalConfig int32 Theinputterminalconfigurationforthechannel.
Value DescriptionDAQmx_Val_Cfg_Default(-1)
Atruntime,NI-DAQmxchoosesthedefaultterminal
configurationforthechannel.
DAQmx_Val_RSE Referencedsingle-endedmode
DAQmx_Val_NRSE Nonreferencedsingle-endedmode
DAQmx_Val_Diff Differentialmode
DAQmx_Val_PseudoDiff Pseudodifferentialmode
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Value DescriptionDAQmx_Val_Amps amperesDAQmx_Val_FromCustomScale Unitsacustom
scale
specifies.Ifyouselectthisvalue,
youmustspecifyacustomscalename.
shuntResistorLoc int32 Thelocationoftheshuntresistor.
Value DescriptionDAQmx_Val_Default Atruntime,NI-
DAQmxchoosesthedefaultshuntresistorlocationforthechannel.
DAQmx_Val_Internal Usethebuilt-inshuntresistorofthedevice.
DAQmx_Val_External Useashuntresistorexternaltothedevice.YoumustspecifythevalueoftheshuntresistorinextShuntResistorVal.
extShuntResistorVal float64 Thevalue,inohms,ofanexternalshuntresistor.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitstoDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAICurrentRMSChanint32DAQmxCreateAICurrentRMSChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,int32shuntResistorLoc,float64extShuntResistorVal,constcharcustomScaleName[]);
PurposeCreateschannel(s)forRMScurrentmeasurementandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
terminalConfig int32 Theinputterminalconfigurationforthechannel.
Value DescriptionDAQmx_Val_Cfg_Default(-1)
Atruntime,NI-DAQmxchoosesthedefaultterminal
configurationforthechannel.
DAQmx_Val_RSE Referencedsingle-endedmode
DAQmx_Val_NRSE Nonreferencedsingle-endedmode
DAQmx_Val_Diff Differentialmode
DAQmx_Val_PseudoDiff Pseudodifferentialmode
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Value DescriptionDAQmx_Val_Amps amperesDAQmx_Val_FromCustomScale Unitsacustom
scale
specifies.Ifyouselectthisvalue,
youmustspecifyacustomscalename.
shuntResistorLoc int32 Thelocationoftheshuntresistor.
Value DescriptionDAQmx_Val_Default Atruntime,NI-
DAQmxchoosesthedefaultshuntresistorlocationforthechannel.
DAQmx_Val_Internal Usethebuilt-inshuntresistorofthedevice.
DAQmx_Val_External Useashuntresistorexternaltothedevice.YoumustspecifythevalueoftheshuntresistorinextShuntResistorVal.
extShuntResistorVal float64 Thevalue,inohms,ofanexternalshuntresistor.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitstoDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIFreqVoltageChanint32DAQmxCreateAIFreqVoltageChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,float64thresholdLevel,float64hysteresis,constcharcustomScaleName[]);
PurposeCreateschannel(s)thatuseafrequency-to-voltageconvertertomeasurefrequencyandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_Hz hertzDAQmx_Val_FromCustomScale Unitsspecifiedby
acustomscale.UsecustomScaleNametospecifyacustomscale.
thresholdLevel float64 Thevoltagelevelatwhichtorecognizewaveformrepetitions.
hysteresis float64 SpecifiesinvoltsawindowbelowthresholdLevel.TheinputvoltagemustpassbelowthresholdLevelminushysteresisbeforeNI-DAQmxrecognizesawaveformrepetition.Hysteresiscanimprovemeasurementaccuracywhenthesignalcontainsnoiseorjitter.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIMicrophoneChanint32DAQmxCreateAIMicrophoneChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,int32units,float64micSensitivity,float64maxSndPressLevel,int32currentExcitSource,float64currentExcitVal,constcharcustomScaleName[]);
PurposeCreateschannel(s)thatuseamicrophonetomeasuresoundpressureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
terminalConfig int32 Theinputterminalconfigurationforthechannel.
Value DescriptionDAQmx_Val_Cfg_Default(-1)
Atruntime,NI-DAQmxchoosesthedefaultterminalconfigurationforthechannel.
DAQmx_Val_RSE Referencedsingle-endedmode
DAQmx_Val_NRSE Nonreferencedsingle-endedmode
DAQmx_Val_Diff Differentialmode
DAQmx_Val_PseudoDiff Pseudodifferentialmode
units int32 Theunitstousetoreturnsoundpressuremeasurements.
Name DescriptionDAQmx_Val_Pascals pascalsDAQmx_Val_FromCustomScale Unitsspecifiedby
acustomscale.UsecustomScaleNametospecifyacustomscale.
micSensitivity float64 Thesensitivityofthemicrophone.Specifythisvalueinmillivoltsperpascal.
maxSndPressLevel float64 Themaximuminstantaneoussoundpressurelevelyouexpecttomeasure.Thisvalueisindecibels,referencedto20micropascals.
currentExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitation
sourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
currentExcitVal float64 Theamountofexcitation,inamperes,thatthesensorrequires.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIResistanceChanint32DAQmxCreateAIResistanceChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32currentExcitSource,float64currentExcitVal,constcharcustomScaleName[]);
PurposeCreatechannel(s)tomeasureresistanceandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_Ohms ohmsDAQmx_Val_FromCustomScale Unitsspecifiedby
acustomscale.UsecustomScaleNametospecifyacustomscale.
resistanceConfig int32 Theconfigurationforresistancemeasurements.
Value DescriptionDAQmx_Val_2Wire 2-wiremode.DAQmx_Val_3Wire 3-wiremode.DAQmx_Val_4Wire 4-wiremode.
currentExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitation
sourceofthedevice.YoumustusecurrentExcitValtospecifytheamountof
excitation.DAQmx_Val_External Useanexcitationsource
otherthanthebuilt-inexcitationsourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
currentExcitVal float64 Theamountofexcitation,inamperes,thatthesensorrequires.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIRTDChanint32DAQmxCreateAIRTDChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32rtdType,int32resistanceConfig,int32currentExcitSource,float64currentExcitVal,float64r0);
PurposeCreateschannel(s)thatuseanRTDtomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegF degreesFahrenheitDAQmx_Val_Kelvins kelvinsDAQmx_Val_DegR degreesRankine
rtdType int32 ThetypeofRTDconnectedtothechannel.
Value DescriptionDAQmx_Val_Pt3750 Pt3750DAQmx_Val_Pt3851 Pt3851DAQmx_Val_Pt3911 Pt3911DAQmx_Val_Pt3916 Pt3916DAQmx_Val_Pt3920 Pt3920DAQmx_Val_Pt3928 Pt3928DAQmx_Val_Custom Youmustspecifythe
'A','B',and'C'constantsfortheCallendar-VanDusenequation
resistanceConfig int32 Theconfigurationforresistancemeasurements.
Value DescriptionDAQmx_Val_2Wire 2-wiremode.DAQmx_Val_3Wire 3-wiremode.DAQmx_Val_4Wire 4-wiremode.
currentExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-in
excitationsourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
currentExcitVal float64 Theamountofexcitation,inamperes,thatthesensorrequires.
r0 float64 Thesensorresistanceinohmsat0degCfortheCallendar-VanDusenequationRefertothesensordocumentationtodeterminethisvalue.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIStrainGageChanint32DAQmxCreateAIStrainGageChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32strainConfig,int32voltageExcitSource,float64voltageExcitVal,float64gageFactor,float64initialBridgeVoltage,float64nominalGageResistance,float64poissonRatio,float64leadWireResistance,constcharcustomScaleName[]);
PurposeCreateschannel(s)tomeasurestrainandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_Strain StrainDAQmx_Val_FromCustomScale Unitsspecifiedby
acustomscale.UsecustomScaleNametospecifyacustomscale.
strainConfig int32 Thestraingagebridgeconfiguration.
Value DescriptionDAQmx_Val_FullBridgeI Fouractivegages
withtwopairssubjectedtoequalandoppositestrains.
DAQmx_Val_FullBridgeII FouractivegageswithtwoalignedwithmaximumprincipalstrainandtwoPoissongages
inadjacentarms.DAQmx_Val_FullBridgeIII Fouractivegages
withtwoalignedwithmaximumprincipalstrainandtwoPoissongagesinoppositearms.
DAQmx_Val_HalfBridgeI TwoactivegageswithonealignedwithmaximumprincipalstrainandonePoissongage.
DAQmx_Val_HalfBridgeII Twoactivegageswithequalandoppositestrains.
DAQmx_Val_QuarterBridgeI Singleactivegage.DAQmx_Val_QuarterBridgeII Singleactivegage
andonedummygage.
voltageExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitation
sourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensor
requiresexcitation.
voltageExcitVal float64 Theamountofexcitation,involts,thatthesensorrequires.
gageFactor float64 Thesensitivityofthestraingagesandrelatesthechangeinelectricalresistancetothechangeinstrain.Eachgageinthebridgemusthavethesamegagefactor.Refertothesensordocumentationtodeterminethisvalue.
initialBridgeVoltage float64 Thebridgeoutputvoltageintheunloadedcondition.NI-DAQmxsubtractsthisvaluefromanymeasurementsbeforeapplyingscalingequations.Performavoltagemeasurementonthebridgewithnostrainappliedtodeterminethisvalue.
nominalGageResistance float64 Theresistance,inohms,ofthegagesinanunstrainedposition.Eachgageinthebridgemusthavethesamenominalgageresistance.Theresistanceacrossarmsofthebridgethatdonothavestraingagesmustalsobethesameasthenominalgageresistance.Refertothesensordocumentationtodeterminethisvalue.
poissonRatio float64 Theratiooflateralstraintoaxialstraininthematerialinwhichyoumeasurestrain.
leadWireResistance float64 Theamount,inohms,ofresistanceintheleadwires.Ideally,thisvalueisthesameforallleads.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAITempBuiltInSensorChanint32DAQmxCreateAITempBuiltInSensorChan(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],int32units);
PurposeCreateschannel(s)tomeasuretemperaturewithabuilt-insensorofaterminalblockordeviceandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.OnSCXImodules,forexample,thiscouldbetheCJCsensor.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegF degreesFahrenheitDAQmx_Val_Kelvins kelvinsDAQmx_Val_DegR degreesRankine
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIThrmcplChanint32DAQmxCreateAIThrmcplChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32thermocoupleType,int32cjcSource,float64cjcVal,constcharcjcChannel[]);
PurposeCreateschannel(s)thatuseathermocoupletomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegF degreesFahrenheitDAQmx_Val_Kelvins kelvinsDAQmx_Val_DegR degreesRankine
thermocoupleType int32 Thetypeofthermocoupleconnectedtothechannel.
Value DescriptionDAQmx_Val_J_Type_TC J-type
thermocouple.DAQmx_Val_K_Type_TC K-type
thermocouple.DAQmx_Val_N_Type_TC N-type
thermocouple.DAQmx_Val_R_Type_TC R-type
thermocouple.DAQmx_Val_S_Type_TC S-type
thermocouple.
DAQmx_Val_T_Type_TC T-typethermocouple.
DAQmx_Val_B_Type_TC B-typethermocouple.
DAQmx_Val_E_Type_TC E-typethermocouple.
cjcSource int32 Thesourceofcoldjunctioncompensation.
Value DescriptionDAQmx_Val_BuiltIn Useacold-
junctioncompensationchannelbuiltintotheterminalblock.
DAQmx_Val_ConstVal Youmustspecifythecold-junctiontemperature.
DAQmx_Val_Chan Useachannelforcold-junctioncompensation.
cjcVal float64 ThetemperatureofthecoldjunctionofthethermocoupleifyousetcjcSourcetoDAQmx_Val_ConstVal.
cjcChannel constchar[] Thechannelthatacquiresthetemperatureofthethermocouplecold-junctionifyousetcjcSourcetoDAQmx_Val_Chan.Youcanuseaglobalchanneloranothervirtualchannelalreadyinthetask.Ifthechannelisatemperaturechannel,NI-DAQmxacquiresthetemperatureinthecorrectunits.Otherchanneltypes,suchasaresistancechannelwithacustomsensor,mustuseacustomscaletoscalevaluestodegreesCelsius.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIThrmstrChanIexint32DAQmxCreateAIThrmstrChanIex(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32currentExcitSource,float64currentExcitVal,float64a,float64b,float64c);
PurposeCreateschannel(s)thatuseathermistortomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Usethisfunctionwhenthethermistorrequirescurrentexcitation.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegF degreesFahrenheitDAQmx_Val_Kelvins kelvinsDAQmx_Val_DegR degreesRankine
resistanceConfig int32 Theconfigurationforresistancemeasurements.
Value DescriptionDAQmx_Val_2Wire 2-wiremode.DAQmx_Val_3Wire 3-wiremode.DAQmx_Val_4Wire 4-wiremode.
currentExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-in
excitationsourceofthedevice.YoumustusecurrentExcitVal
tospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
currentExcitVal float64 Theamountofexcitation,inamperes,thatthesensorrequires.
a float64 TheAconstantfromtheSteinhart-Hartthermistorequation.
b float64 TheBconstantfromtheSteinhart-Hartthermistorequation.
c float64 TheCconstantfromtheSteinhart-Hartthermistorequation.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIThrmstrChanVexint32DAQmxCreateAIThrmstrChanVex(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32voltageExcitSource,float64voltageExcitVal,float64a,float64b,float64c,float64r1);
PurposeCreateschannel(s)thatuseathermistortomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Usethisfunctionwhenthethermistorrequiresvoltageexcitation.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegF degreesFahrenheitDAQmx_Val_Kelvins kelvinsDAQmx_Val_DegR degreesRankine
resistanceConfig int32 Theconfigurationforresistancemeasurements.
Value DescriptionDAQmx_Val_2Wire 2-wiremode.DAQmx_Val_3Wire 3-wiremode.DAQmx_Val_4Wire 4-wiremode.
voltageExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-in
excitationsourceofthedevice.YoumustusevoltageExcitValto
specifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
voltageExcitVal float64 Theamountofexcitation,involts,thatthesensorrequires.
a float64 TheAconstantfromtheSteinhart-Hartthermistorequation.
b float64 TheBconstantfromtheSteinhart-Hartthermistorequation.
c float64 TheCconstantfromtheSteinhart-Hartthermistorequation.
r1 float64 Thevalue,inohms,ofthereferenceresistor.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIVoltageChanint32DAQmxCreateAIVoltageChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,constcharcustomScaleName[]);
PurposeCreateschannel(s)tomeasurevoltageandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Ifyourmeasurementrequirestheuseofinternalexcitationoryouneedthevoltagetobescaledbyexcitation,callDAQmxCreateAIVoltageChanWithExcit.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
terminalConfig int32 Theinputterminalconfigurationforthechannel.
Value DescriptionDAQmx_Val_Cfg_Default(-1)
Atruntime,NI-DAQmxchoosesthedefaultterminalconfigurationforthechannel.
DAQmx_Val_RSE Referencedsingle-endedmode
DAQmx_Val_NRSE Nonreferencedsingle-endedmode
DAQmx_Val_Diff Differentialmode
DAQmx_Val_PseudoDiff Pseudodifferentialmode
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthevoltagemeasurements.
Name DescriptionDAQmx_Val_Volts voltsDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.Ifyoudonotsetunits
DAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIVoltageRMSChanint32DAQmxCreateAIVoltageRMSChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,constcharcustomScaleName[]);
PurposeCreateschannel(s)tomeasureRMSvoltageandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Ifyourmeasurementrequirestheuseofinternalexcitationoryouneedthevoltagetobescaledbyexcitation,callDAQmxCreateAIVoltageChanWithExcit.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
terminalConfig int32 Theinputterminalconfigurationforthechannel.
Value DescriptionDAQmx_Val_Cfg_Default(-1)
Atruntime,NI-DAQmxchoosesthedefaultterminalconfigurationforthechannel.
DAQmx_Val_RSE Referencedsingle-endedmode
DAQmx_Val_NRSE Nonreferencedsingle-endedmode
DAQmx_Val_Diff Differentialmode
DAQmx_Val_PseudoDiff Pseudodifferentialmode
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthevoltagemeasurements.
Name DescriptionDAQmx_Val_Volts voltsDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.Ifyoudonotsetunits
DAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIVoltageChanWithExcitint32DAQmxCreateAIVoltageChanWithExcit(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,int32bridgeConfig,int32voltageExcitSource,float64voltageExcitVal,bool32useExcitForScaling,constcharcustomScaleName[]);
PurposeCreateschannel(s)tomeasurevoltageandaddsthechannelstothetaskyouspecifywithtaskHandle.Usethisinstanceforcustomsensorsthatrequireexcitation.Youcanchoosetousetheexcitationtoscalethemeasurement.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
terminalConfig int32 Theinputterminalconfigurationforthechannel.
Value DescriptionDAQmx_Val_Cfg_Default(-1)
Atruntime,NI-DAQmxchoosesthedefaultterminalconfigurationforthechannel.
DAQmx_Val_RSE Referencedsingle-endedmode
DAQmx_Val_NRSE Nonreferencedsingle-endedmode
DAQmx_Val_Diff Differentialmode
DAQmx_Val_PseudoDiff Pseudodifferentialmode
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthevoltagemeasurements.
Name DescriptionDAQmx_Val_Volts voltsDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
bridgeConfig int32 ThetypeofWheatstonebridgethesensoris.
Value DescriptionDAQmx_Val_FullBridge Sensorisafull
bridge.IfyousetuseExcitForScalingtoTRUE,NI-DAQmxdividesthemeasurementbytheexcitationvalue.Manysensorsscaledatatonativeunitsusingscalingofvoltsperexcitation.
DAQmx_Val_HalfBridge Sensorisahalfbridge.IfyousetuseExcitForScalingtoTRUE,NI-DAQmxdividesthemeasurementbytheexcitationvalue.Manysensorsscaledatatonativeunitsusingscalingofvoltsperexcitation.
DAQmx_Val_QuarterBridge Sensorisaquarterbridge.IfyousetuseExcitForScalingtoTRUE,NI-DAQmxdividesthemeasurementbytheexcitationvalue.Manysensorsscaledatatonativeunitsusingscalingofvoltsperexcitation.
DAQmx_Val_NoBridge SensorisnotaWheatstonebridge.
voltageExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitation
sourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
voltageExcitVal float64 Theamountofexcitation,involts,thatthesensorrequires.
useExcitForScaling bool32 SpecifieswhetherNI-DAQmxdividesthemeasurementbytheexcitation.YoushouldtypicallysetuseExcitForScalingtoTRUEforratiometrictransducers.IfyousetuseExcitForScalingtoTRUE,setmaxValandminValtoreflectthescaling.Forexample,ifyouexpecttoacquireavoltagebetween-5and5,andyouuseanexcitationof.10voltstoscalethemeasurement,setminValto-50andsetmaxValto50.IfyousetbridgeConfigtoDAQmx_Val_NoBridge,useExcitForScalinghasnoeffectonthemeasurement.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIPosLVDTChanint32DAQmxCreateAIPosLVDTChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,float64sensitivity,int32sensitivityUnits,int32voltageExcitSource,float64voltageExcitVal,float64voltageExcitFreq,int32ACExcitWireMode,constcharcustomScaleName[]);
PurposeCreateschannel(s)thatuseanLVDTtomeasurelinearpositionandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyarangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnlinearpositionmeasurementsfromthechannel.
Name DescriptionDAQmx_Val_Meters MetersDAQmx_Val_Inches InchesDAQmx_Val_FromCustomScale Unitsacustomscale
specifies.UsecustomScaleNamespecifyacustomscale.
sensitivity float64 Thesensitivityofthesensor.ThisvalueisintheunitsyouspecifywithsensitivityUnitstothesensordocumentationtodeterminethisvalue.
sensitivityUnits int32 Theunitsofsensitivity.
Name DescriptionDAQmx_Val_mVoltsPerVoltPerMillimeter mvolts/volt/mmeterDAQmx_Val_mVoltsPerVoltPerMilliInch mvolts/volt/0.001
inch
voltageExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitationsourceof
thedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
voltageExcitVal float64 Theamountofexcitation,involts,thatthesensorrequires.
voltageExcitFreq float64 Theexcitationfrequency,inhertz,thatthesensorrequires.Refertothesensordocumentationtodeterminethisvalue.
ACExcitWireMode int32 Thenumberofleadsonthesensor.Somesensorsmayrequireyoutotieleadstogethertocreatea4-wireor5-wiresensor.Refertothedocumentationforyoursensorformoreinformation.
Value DescriptionDAQmx_Val_4Wire 4-wire.DAQmx_Val_5Wire 5-wire.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetDAQmx_Val_FromCustomScale.IfyoudonotsetunitstoDAQmx_Val_FromCustomScaleyoumustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAIPosRVDTChanint32DAQmxCreateAIPosRVDTChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,float64sensitivity,int32sensitivityUnits,int32voltageExcitSource,float64voltageExcitVal,float64voltageExcitFreq,int32ACExcitWireMode,constcharcustomScaleName[]);
PurposeCreateschannel(s)thatuseanRVDTtomeasureangularpositionandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnangularpositionmeasurementsfromthechannel.
Name DescriptionDAQmx_Val_Degrees DegreesDAQmx_Val_Radians RadiansDAQmx_Val_FromCustomScale Unitsspecifiedbya
customscale.UsecustomScaleNamespecifyacustomscale.
sensitivity float64 Thesensitivityofthesensor.ThisvalueisintheunitsyouspecifywithsensitivityUnitsRefertothesensordocumentationtodeterminethisvalue.
sensitivityUnits int32 Theunitsofsensitivity.
Name DescriptionDAQmx_Val_mVoltsPerVoltPerDegree mvolts/volt/degreeDAQmx_Val_mVoltsPerVoltPerRadian mvolts/volt/radian
voltageExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitation
sourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
voltageExcitVal float64 Theamountofexcitation,involts,thatthesensorrequires.
voltageExcitFreq float64 Theexcitationfrequency,inhertz,thatthesensorrequires.Refertothesensordocumentationtodeterminethisvalue.
ACExcitWireMode int32 Thenumberofleadsonthesensor.Somesensorsmayrequireyoutotieleadstogethertocreatea4-wireor5-wiresensor.Refertothedocumentationforyoursensorformoreinformation.
Value DescriptionDAQmx_Val_4Wire 4-wire.DAQmx_Val_5Wire 5-wire.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitstoDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
ObsoleteThisfunctionisobsolete.UseDAQmxCreateAITempBuiltInSensorChaninstead.
DAQmxCreateAIDeviceTempChanint32DAQmxCreateAIDeviceTempChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32units);
PurposeCreateschannel(s)thatuseasensorbuiltintoaterminalblockordevicetomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.OnSCXImodules,forexample,thiscouldbetheCJCsensor.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegF degreesFahrenheitDAQmx_Val_Kelvins kelvinsDAQmx_Val_DegR degreesRankine
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTEDSAIAccelChanint32DAQmxCreateTEDSAIAccelChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,int32currentExcitSource,float64currentExcitVal,constcharcustomScaleName[]);
PurposeCreateschannel(s)thatuseanaccelerometertomeasureaccelerationandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
terminalConfig int32 Theinputterminalconfigurationforthechannel.
Value DescriptionDAQmx_Val_Cfg_Default(-1)
Atruntime,NI-DAQmxchoosesthedefaultterminalconfigurationforthechannel.
DAQmx_Val_RSE Referencedsingle-endedmode
DAQmx_Val_NRSE Nonreferencedsingle-endedmode
DAQmx_Val_Diff Differentialmode
DAQmx_Val_PseudoDiff Pseudodifferentialmode
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnaccelerationmeasurementsfromthechannel.
Name DescriptionDAQmx_Val_AccelUnit_g G.1gis
approximatelyequalto9.81m/s
DAQmx_Val_FromCustomScale Unitsspecifiedbyacustomscale.UsecustomScaleNametospecifyacustom
scale.
currentExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitation
sourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
currentExcitVal float64 Theamountofexcitation,inamperes,thatthesensorrequires.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTEDSAICurrentChanint32DAQmxCreateTEDSAICurrentChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,int32shuntResistorLoc,float64externalShuntResistorValue,constcharcustomScaleName[]);
PurposeCreateschannel(s)tomeasurecurrentandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
terminalConfig int32 Theinputterminalconfigurationforthechannel.
Value DescriptionDAQmx_Val_Cfg_Default(-1)
Atruntime,NI-DAQmxchoosesthedefaultterminalconfigurationforthechannel.
DAQmx_Val_RSE Referencedsingle-endedmode
DAQmx_Val_NRSE Nonreferencedsingle-endedmode
DAQmx_Val_Diff Differentialmode
DAQmx_Val_PseudoDiff Pseudodifferentialmode
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnmeasurements.
Name DescriptionDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
DAQmx_Val_FromTEDS UnitsdefinedbyTEDSinformationassociatedwiththe
channel.
shuntResistorLoc int32 Thelocationoftheshuntresistor.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inshunt
resistorofthedevice.DAQmx_Val_External Useashuntresistor
externaltothedevice.YoumustspecifythevalueoftheshuntresistorinextShuntResistorVal
extShuntResistorVal float64 Thevalue,inohms,ofanexternalshuntresistor.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTEDSAIMicrophoneChanint32DAQmxCreateTEDSAIMicrophoneChan(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,int32units,float64maxSndPressLevel,int32currentExcitSource,float64currentExcitVal,constcharcustomScaleName[]);
PurposeCreateschannel(s)thatuseamicrophonetomeasuresoundpressureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
terminalConfig int32 Theinputterminalconfigurationforthechannel.
Value DescriptionDAQmx_Val_Cfg_Default(-1)
Atruntime,NI-DAQmxchoosesthedefaultterminalconfigurationforthechannel.
DAQmx_Val_RSE Referencedsingle-endedmode
DAQmx_Val_NRSE Nonreferencedsingle-endedmode
DAQmx_Val_Diff Differentialmode
DAQmx_Val_PseudoDiff Pseudodifferentialmode
units int32 Theunitstousetoreturnsoundpressuremeasurements.
Name DescriptionDAQmx_Val_Pascals pascalsDAQmx_Val_FromCustomScale Unitsspecifiedby
acustomscale.UsecustomScaleNametospecifyacustomscale.
maxSndPressLevel float64 Themaximuminstantaneoussoundpressurelevelyouexpecttomeasure.Thisvalueisindecibels,referencedto20micropascals.
currentExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitation
sourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
currentExcitVal float64 Theamountofexcitation,inamperes,thatthesensorrequires.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTEDSAIResistanceChanint32DAQmxCreateTEDSAIResistanceChan(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32currentExcitSource,float64currentExcitVal,constcharcustomScaleName[]);
PurposeCreateschannel(s)tomeasureresistanceandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnmeasurements.
Name DescriptionDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
DAQmx_Val_FromTEDS UnitsdefinedbyTEDSinformationassociatedwiththechannel.
resistanceConfig int32 Theconfigurationforresistancemeasurements.
Value DescriptionDAQmx_Val_2Wire 2-wiremode.DAQmx_Val_3Wire 3-wiremode.DAQmx_Val_4Wire 4-wiremode.
currentExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitation
sourceofthedevice.You
mustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
currentExcitVal float64 Theamountofexcitation,inamperes,thatthesensorrequires.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTEDSAIRTDChanint32DAQmxCreateTEDSAIRTDChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32currentExcitSource,float64currentExcitVal);
PurposeCreateschannel(s)thatuseanRTDtomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegF degreesFahrenheitDAQmx_Val_Kelvins kelvinsDAQmx_Val_DegR degreesRankine
resistanceConfig int32 Theconfigurationforresistancemeasurements.
Value DescriptionDAQmx_Val_2Wire 2-wiremode.DAQmx_Val_3Wire 3-wiremode.DAQmx_Val_4Wire 4-wiremode.
currentExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-in
excitationsourceofthedevice.YoumustusecurrentExcitVal
tospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
currentExcitVal float64 Theamountofexcitation,inamperes,thatthesensorrequires.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTEDSAIStrainGageChanint32DAQmxCreateTEDSAIStrainGageChan(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32voltageExcitSource,float64voltageExcitVal,float64initialBridgeVoltage,float64leadWireResistance,constcharcustomScaleName[]);
PurposeCreateschannel(s)tomeasurestrainandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_Strain StrainDAQmx_Val_FromCustomScale Unitsspecifiedby
acustomscale.UsecustomScaleNametospecifyacustomscale.
voltageExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitation
sourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusevoltageExcitValtospecify
theamountofexcitation.DAQmx_Val_None Supplynoexcitationtothe
channel.Youcannotusethisvalueifthesensorrequiresexcitation.
voltageExcitVal float64 Theamountofexcitation,involts,thatthesensorrequires.
initialBridgeVoltage float64 Thebridgeoutputvoltageintheunloadedcondition.NI-DAQmxsubtractsthisvaluefromanymeasurementsbeforeapplyingscalingequations.Performavoltagemeasurementonthebridgewithnostrainappliedtodeterminethisvalue.
leadWireResistance float64 Theamount,inohms,ofresistanceintheleadwires.Ideally,thisvalueisthesameforallleads.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTEDSAIThrmcplChanint32DAQmxCreateTEDSAIThrmcplChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32cjcSource,float64cjcVal,constcharcjcChannel[]);
PurposeCreateschannel(s)thatuseathermocoupletomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegF degreesFahrenheitDAQmx_Val_Kelvins kelvinsDAQmx_Val_DegR degreesRankine
cjcSource int32 Thesourceofcoldjunctioncompensation.
Value DescriptionDAQmx_Val_BuiltIn Useacold-
junctioncompensationchannelbuiltintotheterminalblock.
DAQmx_Val_ConstVal Youmustspecifythecold-junctiontemperature.
DAQmx_Val_Chan Useachannelforcold-junction
compensation.
cjcVal float64 ThetemperatureofthecoldjunctionofthethermocoupleifyousetcjcSourcetoDAQmx_Val_ConstVal.
cjcChannel constchar[] Thechannelthatacquiresthetemperatureofthethermocouplecold-junctionifyousetcjcSourcetoDAQmx_Val_Chan.Youcanuseaglobalchanneloranothervirtualchannelalreadyinthetask.Ifthechannelisatemperaturechannel,NI-DAQmxacquiresthetemperatureinthecorrectunits.Otherchanneltypes,suchasaresistancechannelwithacustomsensor,mustuseacustomscaletoscalevaluestodegreesCelsius.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTEDSAIThrmstrChanIexint32DAQmxCreateTEDSAIThrmstrChanIex(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32currentExcitSource,float64currentExcitVal);
PurposeCreateschannel(s)thatuseathermistortomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Usethisinstancewhenthethermistorrequirescurrentexcitation.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegF degreesFahrenheitDAQmx_Val_Kelvins kelvinsDAQmx_Val_DegR degreesRankine
resistanceConfig int32 Theconfigurationforresistancemeasurements.
Value DescriptionDAQmx_Val_2Wire 2-wiremode.DAQmx_Val_3Wire 3-wiremode.DAQmx_Val_4Wire 4-wiremode.
currentExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-in
excitationsourceofthedevice.YoumustusecurrentExcitVal
tospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
currentExcitVal float64 Theamountofexcitation,inamperes,thatthesensorrequires.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTEDSAIThrmstrChanVexint32DAQmxCreateTEDSAIThrmstrChanVex(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32voltageExcitSource,float64voltageExcitVal,float64r1);
PurposeCreateschannel(s)thatuseathermistortomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Usethisinstancewhenthethermistorrequiresvoltageexcitation.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegF degreesFahrenheitDAQmx_Val_Kelvins kelvinsDAQmx_Val_DegR degreesRankine
resistanceConfig int32 Theconfigurationforresistancemeasurements.
Value DescriptionDAQmx_Val_2Wire 2-wiremode.DAQmx_Val_3Wire 3-wiremode.DAQmx_Val_4Wire 4-wiremode.
voltageExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-in
excitationsourceofthedevice.YoumustusevoltageExcitValto
specifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
voltageExcitVal float64 Theamountofexcitation,involts,thatthesensorrequires.
r1 float64 Thevalue,inohms,ofthereferenceresistor.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTEDSAIVoltageChanint32DAQmxCreateTEDSAIVoltageChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,constcharcustomScaleName[]);
PurposeCreateschannel(s)tomeasurevoltageandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.Ifyourmeasurementrequirestheuseofinternalexcitationoryouneedthevoltagetobescaledbytheexcitation,usetheDAQmxCreateTEDSAIVoltageChanWithExcitfunction.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
terminalConfig int32 Theinputterminalconfigurationforthechannel.
Value DescriptionDAQmx_Val_Cfg_Default(-1)
Atruntime,NI-DAQmxchoosesthedefaultterminalconfigurationforthechannel.
DAQmx_Val_RSE Referencedsingle-endedmode
DAQmx_Val_NRSE Nonreferencedsingle-endedmode
DAQmx_Val_Diff Differentialmode
DAQmx_Val_PseudoDiff Pseudodifferentialmode
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnmeasurements.
Name DescriptionDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
DAQmx_Val_FromTEDS UnitsdefinedbyTEDSinformationassociatedwiththe
channel.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTEDSAIVoltageChanWithExcitint32DAQmxCreateTEDSAIVoltageChanWithExcit(TaskHandletaskHandle,
constcharphysicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,int32voltageExcitSource,float64voltageExcitVal,constcharcustomScaleName[]);
PurposeCreateschannel(s)tomeasurevoltageandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Usethisinstanceforcustomsensorsthatrequireexcitation.Youcanusetheexcitationtoscalethemeasurement.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
terminalConfig int32 Theinputterminalconfigurationforthechannel.
Value DescriptionDAQmx_Val_Cfg_Default(-1)
Atruntime,NI-DAQmxchoosesthedefaultterminalconfigurationforthechannel.
DAQmx_Val_RSE Referencedsingle-endedmode
DAQmx_Val_NRSE Nonreferencedsingle-endedmode
DAQmx_Val_Diff Differentialmode
DAQmx_Val_PseudoDiff Pseudodifferentialmode
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnmeasurements.
Name DescriptionDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
DAQmx_Val_FromTEDS UnitsdefinedbyTEDSinformationassociatedwiththe
channel.
voltageExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitation
sourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
voltageExcitVal float64 Theamountofexcitation,involts,thatthesensorrequires.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTEDSAIPosLVDTChanint32DAQmxCreateTEDSAIPosLVDTChan(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32voltageExcitSource,float64voltageExcitVal,float64voltageExcitFreq,int32ACExcitWireMode,constcharcustomScaleName[]);
PurposeCreateschannel(s)thatuseanLVDTtomeasurelinearpositionandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnlinearpositionmeasurementsfromthechannel.
Name DescriptionDAQmx_Val_Meters MetersDAQmx_Val_Inches InchesDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
voltageExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitation
sourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusevoltageExcitValtospecify
theamountofexcitation.DAQmx_Val_None Supplynoexcitationtothe
channel.Youcannotusethisvalueifthesensorrequiresexcitation.
voltageExcitVal float64 Theamountofexcitation,involts,thatthesensorrequires.
voltageExcitFreq float64 Theexcitationfrequency,inhertz,thatthesensorrequires.Refertothesensordocumentationtodeterminethisvalue.
ACExcitWireMode int32 Thenumberofleadsonthesensor.Somesensorsmayrequireyoutotieleadstogethertocreatea4-wireor5-wiresensor.Refertothedocumentationforyoursensorformoreinformation.
Value DescriptionDAQmx_Val_4Wire 4-wire.DAQmx_Val_5Wire 5-wire.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTEDSAIPosRVDTChanint32DAQmxCreateTEDSAIPosRVDTChan(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32voltageExcitSource,float64voltageExcitVal,float64voltageExcitFreq,int32ACExcitWireMode,constcharcustomScaleName[]);
PurposeCreateschannel(s)thatuseanRVDTtomeasureangularpositionandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnangularpositionmeasurementsfromthechannel.
Name DescriptionDAQmx_Val_Degrees DegreesDAQmx_Val_Radians RadiansDAQmx_Val_FromCustomScale Unitsspecifiedby
acustomscale.UsecustomScaleNametospecifyacustomscale.
voltageExcitSource int32 Thesourceofexcitation.
Value DescriptionDAQmx_Val_Internal Usethebuilt-inexcitation
sourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.Youmustuse
voltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
voltageExcitVal float64 Theamountofexcitation,involts,thatthesensorrequires.
voltageExcitFreq float64 Theexcitationfrequency,inhertz,thatthesensorrequires.Refertothesensordocumentationtodeterminethisvalue.
ACExcitWireMode int32 Thenumberofleadsonthesensor.Somesensorsmayrequireyoutotieleadstogethertocreatea4-wireor5-wiresensor.Refertothedocumentationforyoursensorformoreinformation.
Value DescriptionDAQmx_Val_4Wire 4-wire.DAQmx_Val_5Wire 5-wire.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAOCurrentChanint32DAQmxCreateAOCurrentChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,constcharcustomScaleName[]);
PurposeCreateschannel(s)togeneratecurrentandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttogenerate.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttogenerate.
units int32 Theunitsinwhichtogeneratecurrent.
Value DescriptionDAQmx_Val_Amps amperesDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAOFuncGenChanint32DAQmxCreateAOFuncGenChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32type,float64frequency,float64amplitude,float64offset);
PurposeCreatesachannelforcontinuallygeneratingawaveformontheselectedphysicalchannel.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
type int32 Specifiesthekindofwaveformtogenerate.
Value DescriptionDAQmx_Val_Sine SinewaveDAQmx_Val_Triangle TrianglewaveDAQmx_Val_Square SawtoothwaveDAQmx_Val_Sawtooth Squarewave
frequency float64 Thefrequencyofthewaveformtogenerateinhertz.
amplitude float64 Thezero-to-peakamplitudeofthewaveformtogenerateinvolts.Zeroandnegativevaluesarevalid.
offset float64 Thevoltageoffsetofthewaveformtogenerate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateAOVoltageChanint32DAQmxCreateAOVoltageChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,constcharcustomScaleName[]);
PurposeCreateschannel(s)togeneratevoltageandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
physicalChannel constchar[] Thenamesofthephysicalchannelstousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttogenerate.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttogenerate.
units int32 Theunitsinwhichtogeneratevoltage.
Name DescriptionDAQmx_Val_Volts voltsDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateDIChanint32DAQmxCreateDIChan(TaskHandletaskHandle,constcharlines[],const
charnameToAssignToLines[],int32lineGrouping);
PurposeCreateschannel(s)tomeasuredigitalsignalsandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youcangroupdigitallinesintoonedigitalchannelorseparatethemintomultipledigitalchannels.Ifyouspecifyoneormoreentireportsinlinesbyusingportphysicalchannelnames,youcannotseparatetheportsintomultiplechannels.Toseparateportsintomultiplechannels,usethisfunctionmultipletimeswithadifferentporteachtime.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
lines constchar[] Thenamesofthedigitallinesusedtocreateavirtualchannel.Youcanspecifyalistorrangeoflines.
nameToAssignToLines constchar[] Thenameofthecreatedvirtualchannel(s).Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToLines,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.
lineGrouping int32 Specifieswhethertogroupdigitallinesintooneormorevirtualchannels.Ifyouspecifyoneormoreentireportsinlines,youmustsetlineGroupingtoDAQmx_Val_ChanForAllLines.
Value DescriptionDAQmx_Val_ChanPerLine Onechannel
foreachlineDAQmx_Val_ChanForAllLines Onechannel
foralllines
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateDOChanint32DAQmxCreateDOChan(TaskHandletaskHandle,constcharlines[],const
charnameToAssignToLines[],int32lineGrouping);
PurposeCreateschannel(s)togeneratedigitalsignalsandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youcangroupdigitallinesintoonedigitalchannelorseparatethemintomultipledigitalchannels.Ifyouspecifyoneormoreentireportsinlinesbyusingportphysicalchannelnames,youcannotseparatetheportsintomultiplechannels.Toseparateportsintomultiplechannels,usethisfunctionmultipletimeswithadifferentporteachtime.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
lines constchar[] Thenamesofthedigitallinesusedtocreateavirtualchannel.Youcanspecifyalistorrangeoflines.
nameToAssignToLines constchar[] Thenameofthecreatedvirtualchannel(s).Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToLines,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.
lineGrouping int32 Specifieswhethertogroupdigitallinesintooneormorevirtualchannels.Ifyouspecifyoneormoreentireportsinlines,youmustsetlineGroupingtoDAQmx_Val_ChanForAllLines.
Value DescriptionDAQmx_Val_ChanPerLine Onechannel
foreachlineDAQmx_Val_ChanForAllLines Onechannel
foralllines
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateCICountEdgesChanint32DAQmxCreateCICountEdgesChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],int32edge,uInt32initialCount,int32countDirection);
PurposeCreatesachanneltocountthenumberofrisingorfallingedgesofadigitalsignalandaddsthechanneltothetaskyouspecifywithtaskHandle.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignaltothedefaultinputterminalofthecounterunlessyouselectadifferentinputterminal.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
counter constchar[] Thenameofthecountertousetocreatevirtualchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
edge int32 Specifiesonwhichedgesoftheinputsignaltoincrementordecrementthecount.
Value DescriptionDAQmx_Val_Rising Risingedge(s).DAQmx_Val_Falling Fallingedge(s).
initialCount uInt32 Thevaluefromwhichtostartcounting.
countDirection int32 Specifieswhethertoincrementordecrementthecounteroneachedge.
Value DescriptionDAQmx_Val_CountUp Increment
thecountregisteroneachedge.
DAQmx_Val_CountDown Decrementthecountregisteroneachedge.
DAQmx_Val_ExtControlled Thestateofadigitallinecontrolsthecountdirection.Eachcounterhasadefaultcount
directionterminal.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateCIFreqChanint32DAQmxCreateCIFreqChan(TaskHandletaskHandle,constcharcounter[],
constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32edge,int32measMethod,float64measTime,uInt32divisor,constcharcustomScaleName[]);
PurposeCreatesachanneltomeasurethefrequencyofadigitalsignalandaddsthechanneltothetaskyouspecifywithtaskHandle.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignaltothedefaultinputterminalofthecounterunlessyouselectadifferentinputterminal.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
counter constchar[] Thenameofthecountertousetocreatevirtualchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Name DescriptionDAQmx_Val_Hz hertzDAQmx_Val_Ticks TimebaseticksDAQmx_Val_FromCustomScale Unitsbyacustom
scale.UsecustomScaleNametospecifyacustomscale.
edge int32 Specifiesbetweenwhichedgestomeasurethefrequencyorperiodofthesignal.
Value DescriptionDAQmx_Val_Rising Risingedge(s).DAQmx_Val_Falling Fallingedge(s).
measMethod int32 Themethodusedtocalculatetheperiodorfrequencyofthesignal.
Value DescriptionDAQmx_Val_LowFreq1Ctr Useonecounterthat
usesaconstanttimebasetomeasuretheinputsignal.
DAQmx_Val_HighFreq2Ctr Usetwocounters,
oneofwhichcountspulsesofthesignaltomeasureduringthespecifiedmeasurementtime.
DAQmx_Val_LargeRng2Ctr Useonecountertodividethefrequencyoftheinputsignaltocreatealower-frequencysignalthatthesecondcountercanmoreeasilymeasure.
measTime float64 Thelengthoftimetomeasurethefrequencyorperiodofadigitalsignal,whenmeasMethodisDAQmx_Val_HighFreq2Ctr.Measurementaccuracyincreaseswithincreasedmeasurementtimeandwithincreasedsignalfrequency.
CautionIfyoumeasureahigh-frequencysignalfortoolongatime,thecountregistercouldrollover,resultinginanincorrectmeasurement.
divisor uInt32 Thevaluebywhichtodividetheinputsignal,whenmeasMethodisDAQmx_Val_LargeRng2Ctr.Thelargerthisvalue,themoreaccuratethemeasurement,buttoolargeavaluecancausethecountregistertorollover,resultinginanincorrectmeasurement.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateCIPeriodChanint32DAQmxCreateCIPeriodChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32edge,int32measMethod,float64measTime,uInt32divisor,constcharcustomScaleName[]);
PurposeCreatesachanneltomeasuretheperiodofadigitalsignalandaddsthechanneltothetaskyouspecifywithtaskHandle.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignaltothedefaultinputterminalofthecounterunlessyouselectadifferentinputterminal.
NoteWhenmeasMethodissettoDAQmx_Val_LowFreq1Ctr,youmustpassthevalues0.000001formeasTimeand4fordivisor.Thesevalueswillbeignoredbythefunction,butiftheyarenotpassed,thefunctionreturnsanerror.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
counter constchar[] Thenameofthecountertousetocreatevirtualchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Value DescriptionDAQmx_Val_Seconds secondsDAQmx_Val_Ticks TimebaseticksDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
edge int32 Specifiesbetweenwhichedgestomeasurethefrequencyorperiodofthesignal.
Value DescriptionDAQmx_Val_Rising Risingedge(s).DAQmx_Val_Falling Fallingedge(s).
measMethod int32 Specifiesthemethodusedtocalculatethefrequencyorperiodofthesignal.
Value DescriptionDAQmx_Val_LowFreq1Ctr Useonecounterthat
usesaconstanttimebasetomeasuretheinputsignal.
DAQmx_Val_HighFreq2Ctr Usetwocounters,
oneofwhichcountspulsesofthesignaltomeasureduringthespecifiedmeasurementtime.
DAQmx_Val_LargeRng2Ctr Useonecountertodividethefrequencyoftheinputsignaltocreatealower-frequencysignalthatthesecondcountercanmoreeasilymeasure.
measTime float64 Thelengthoftimetomeasurethefrequencyorperiodofadigitalsignal,whenmeasMethodisDAQmx_Val_HighFreq2Ctr.Measurementaccuracyincreaseswithincreasedmeasurementtimeandwithincreasedsignalfrequency.
CautionIfyoumeasureahigh-frequencysignalfortoolongatime,thecountregistercouldrollover,resultinginanincorrectmeasurement.
divisor uInt32 Thevaluebywhichtodividetheinputsignal,whenmeasMethodisDAQmx_Val_LargeRng2Ctr.Thelargerthisvalue,themoreaccuratethemeasurement,buttoolargeavaluecancausethecountregistertorollover,resultinginanincorrectmeasurement.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateCIPulseWidthChanint32DAQmxCreateCIPulseWidthChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32startingEdge,constcharcustomScaleName[]);
PurposeCreatesachanneltomeasurethewidthofadigitalpulseandaddsthechanneltothetaskyouspecifywithtaskHandle.startingEdgedetermineswhethertomeasureahighpulseoralowpulse.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignaltothedefaultinputterminalofthecounterunlessyouselectadifferentinputterminal.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
counter constchar[] Thenameofthecountertousetocreatevirtualchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Value DescriptionDAQmx_Val_Seconds secondsDAQmx_Val_Ticks TimebaseticksDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
startingEdge int32 Specifiesonwhichedgetobeginmeasuringpulsewidth.
Value DescriptionDAQmx_Val_Rising Risingedge(s).DAQmx_Val_Falling Fallingedge(s).
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateCISemiPeriodChanint32DAQmxCreateCISemiPeriodChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,constcharcustomScaleName[]);
PurposeCreatesachanneltomeasurethetimebetweenstatetransitionsofadigitalsignalandaddsthechanneltothetaskyouspecifywithtaskHandle.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignaltothedefaultinputterminalofthecounterunlessyouselectadifferentinputterminal.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
counter constchar[] Thenameofthecountertousetocreatevirtualchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Value DescriptionDAQmx_Val_Seconds secondsDAQmx_Val_Ticks TimebaseticksDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateCITwoEdgeSepChanDAQmxCreateCITwoEdgeSepChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32firstEdge,int32secondEdge,constcharcustomScaleName[]);
PurposeCreatesachannelthatmeasurestheamountoftimebetweentherisingorfallingedgeofonedigitalsignalandtherisingorfallingedgeofanotherdigitalsignal.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignalstothedefaultinputterminalsofthecounterunlessyouselectdifferentinputterminals.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
counter constchar[] Thenameofthecountertousetocreatevirtualchannels.
nameToAssignToChannel constchar[] Thenametoassigntothecreatedvirtualchannel.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
minVal float64 Theminimumvalue,inunits,thatyouexpecttomeasure.
maxVal float64 Themaximumvalue,inunits,thatyouexpecttomeasure.
units int32 Theunitstousetoreturnthemeasurement.
Value DescriptionDAQmx_Val_Seconds secondsDAQmx_Val_Ticks TimebaseticksDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
firstEdge int32 Specifiesonwhichedgeofthefirstsignaltostarteachmeasurement.
Name DescriptionDAQmx_Val_Rising Starteachmeasurementon
therisingedgeofthefirstsignal.
DAQmx_Val_Falling Starteachmeasurementonthefallingedgeofthefirstsignal.
secondEdge int32 Specifiesonwhichedgeofthefirstsignaltostopeachmeasurement.
Name DescriptionDAQmx_Val_Rising Stopeachmeasurementon
therisingedgeofthe
secondsignal.DAQmx_Val_Falling Stopeachmeasurementon
thefallingedgeofthesecondsignal.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateCILinEncoderChanint32DAQmxCreateCILinEncoderChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],int32decodingType,bool32ZidxEnable,float64ZidxVal,int32ZidxPhase,int32units,float64distPerPulse,float64initialPos,constcharcustomScaleName[]);
PurposeCreatesachannelthatusesalinearencodertomeasurelinearposition.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignalstothedefaultinputterminalsofthecounterunlessyouselectdifferentinputterminals.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
counter constchar[] Thenameofthecountertousetocreatevirtualchannels.
nameToAssignToChannel constchar[] Thenametoassigntothecreatedvirtualchannel.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
decodingType int32 SpecifieshowtocountandinterpretthepulsesthattheencodergeneratesonsignalAandsignalB.DAQmx_Val_X1,DAQmx_Val_X2,andDAQmx_Val_X4arevalidforquadratureencodersonly.DAQmx_Val_TwoPulseCountingisvalidonlyfortwo-pulseencoders.DAQmx_Val_X2andDAQmx_Val_X4decodingaremoresensitivetosmallerchangesinpositionthanDAQmx_Val_X1encoding,withDAQmx_Val_X4beingthemostsensitive.However,moresensitivedecodingismorelikelytoproduceerroneousmeasurementsifthereisvibrationintheencoderorothernoiseinthesignals.
Value DescriptionDAQmx_Val_X1 IfsignalAleads
signalB,counttherisingedgesofsignalA.IfsignalBleadssignalA,countthefallingedgesofsignalA.
DAQmx_Val_X2 CounttherisingandfallingedgesofsignalA.
DAQmx_Val_X4 CounttherisingandfallingedgesofbothsignalAandsignalB.
DAQmx_Val_TwoPulseCounting IncrementthecountonrisingedgesofsignalA.DecrementthecountonrisingpulsesofsignalB.
ZidxEnable bool32 Specifieswhethertoenablezindexingforthemeasurement.
ZidxVal float64 Thevalue,inunits,towhichtoresetthemeasurementwhensignalZishighandsignalAandsignalBareatthestatesyouspecifywithZidxPhase.
ZidxPhase int32 ThestatesatwhichsignalAandsignalBmustbewhilesignalZishighforNI-DAQmxtoresetthemeasurement.IfsignalZisneverhighwhilethesignalAandsignalBarehigh,forexample,youmustchooseaphaseotherthanDAQmx_Val_AHighBHigh.WhensignalZgoeshighandhowlongitstayshighvariesfromencodertoencoder.RefertothedocumentationfortheencodertodeterminethetimingofsignalZwithrespecttosignalAandsignalB.
Value DescriptionDAQmx_Val_AHighBHigh Resetthe
measurementwhenbothsignalAandsignalBareathighlogic.
DAQmx_Val_AHighBLow ResetthemeasurementwhensignalAisathighlogicandsignalBisatlowlogic.
DAQmx_Val_ALowBHigh ResetthemeasurementwhensignalAisatlowlogicandsignalBisathighlogic.
DAQmx_Val_ALowBLow ResetthemeasurementwhenbothsignalAandsignalBareatlowlogic.
units int32 Theunitstousetoreturnlinearpositionmeasurementsfromthechannel.
Name DescriptionDAQmx_Val_Meters Meters.DAQmx_Val_Inches Inches.DAQmx_Val_Ticks TimebaseTicks.DAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
distPerPulse float64 Thedistancemeasuredforeachpulsetheencodergenerates.Specifythisvalueinunits.
initialPos float64 Thepositionoftheencoderwhenthemeasurementbegins.Thisvalueisinunits.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateCIAngEncoderChanint32DAQmxCreateCIAngEncoderChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],int32decodingType,bool32ZidxEnable,float64ZidxVal,int32ZidxPhase,int32units,uInt32pulsesPerRev,float64initialAngle,constcharcustomScaleName[]);
PurposeCreatesachannelthatusesanangularencodertomeasureangularposition.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignalstothedefaultinputterminalsofthecounterunlessyouselectdifferentinputterminals.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
counter constchar[] Thenameofthecountertousetocreatevirtualchannels.
nameToAssignToChannel constchar[] Thenametoassigntothecreatedvirtualchannel.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamesthevirtualchannels.
decodingType int32 SpecifieshowtocountandinterpretthepulsesthattheencodergeneratesonsignalAandsignalB.DAQmx_Val_X1,DAQmx_Val_X2,andDAQmx_Val_X4arevalidforquadratureencodersonly.DAQmx_Val_TwoPulseCountingisvalidonlyfortwo-pulseencoders.DAQmx_Val_X2andDAQmx_Val_X4decodingaremoresensitivetosmallerchangesinpositionthanDAQmx_Val_X1encoding,withDAQmx_Val_X4beingthemostsensitive.However,moresensitivedecodingismorelikelytoproduceerroneousmeasurementsifthereisvibrationintheencoderorothernoiseinthesignals.
Value DescriptionDAQmx_Val_X1 IfsignalAleads
signalB,counttherisingedgesofsignalA.IfsignalBleadssignalA,countthefallingedgesofsignalA.
DAQmx_Val_X2 CounttherisingandfallingedgesofsignalA.
DAQmx_Val_X4 CounttherisingandfallingedgesofbothsignalAandsignalB.
DAQmx_Val_TwoPulseCounting IncrementthecountonrisingedgesofsignalA.DecrementthecountonrisingpulsesofsignalB.
ZidxEnable bool32 Specifieswhethertoenablezindexingforthemeasurement.
ZidxVal float64 Thevalue,inunits,towhichtoresetthemeasurementwhensignalZishighandsignalAandsignalBareatthestatesyouspecifywithZidxPhase.
ZidxPhase int32 ThestatesatwhichsignalAandsignalBmustbewhilesignalZishighforNI-DAQmxtoresetthemeasurement.IfsignalZisneverhighwhilethesignalAandsignalBarehigh,forexample,youmustchooseaphaseotherthanDAQmx_Val_AHighBHigh.WhensignalZgoeshighandhowlongitstayshighvariesfromencodertoencoder.RefertothedocumentationfortheencodertodeterminethetimingofsignalZwithrespecttosignalAandsignalB.
Value DescriptionDAQmx_Val_AHighBHigh Resetthe
measurementwhenbothsignalAandsignalBareathighlogic.
DAQmx_Val_AHighBLow ResetthemeasurementwhensignalAisathighlogicandsignalBisatlowlogic.
DAQmx_Val_ALowBHigh ResetthemeasurementwhensignalAisatlowlogicandsignalBisathighlogic.
DAQmx_Val_ALowBLow ResetthemeasurementwhenbothsignalAandsignalBareatlowlogic.
units int32 Theunitstousetoreturnangularpositionmeasurementsfromthechannel.
Value DescriptionDAQmx_Val_Degrees DegreesDAQmx_Val_Radians RadiansDAQmx_Val_Ticks TimebaseticksDAQmx_Val_FromCustomScale Unitsacustom
scalespecifies.UsecustomScaleNametospecifyacustomscale.
pulsesPerRev uInt32 Thenumberofpulsestheencodergeneratesperrevolution.ThisvalueisthenumberofpulsesononeofeitherAsignalorBsignal,notthetotalnumberofpulsesonbothsignalAandsignalB.
initialAngle float64 Thestartingangleoftheencoderwhenthemeasurementbegins.Specifythisvalueinunits.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateCIGPSTimestampChanint32DAQmxCreateCIGPSTimestampChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],int32units,int32gpsSyncMethod,constcharcustScaleName[]);
PurposeCreatesachannelthatusesaspecial-purposecountertotakeatimestampandsynchronizesthatcountertoaGPSreceiver.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
counter constchar[] Thenameofthecountertousetocreatevirtualchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
units int32 Theunitstousetoreturnthetimestamp.
Value DescriptionDAQmx_Val_Seconds SecondsDAQmx_Val_FromCustomScale From
customscale
gpsSyncMethod int32 ThemethodtousetosynchronizethecountertoaGPSreceiver.
Value DescriptionDAQmx_Val_IRIGB IRIG-BDAQmx_Val_PPS PPSDAQmx_Val_None None
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitstoDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateCOPulseChanFreqint32DAQmxCreateCOPulseChanFreq(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],int32units,int32idleState,float64initialDelay,float64freq,float64dutyCycle);
PurposeCreateschannel(s)togeneratedigitalpulsesthatfreqanddutyCycledefineandaddsthechanneltothetaskyouspecifywithtaskHandle.Thepulsesappearonthedefaultoutputterminalofthecounterunlessyouselectadifferentoutputterminal.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
counter constchar[] Thenameofthecountertousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
units int32 Theunitsinwhichtospecifyfreq.
Name DescriptionDAQmx_Val_Hz hertz
idleState int32 Therestingstateoftheoutputterminal.
Value DescriptionDAQmx_Val_High Highstate.DAQmx_Val_Low Lowstate.
initialDelay float64 Theamountoftimeinsecondstowaitbeforegeneratingthefirstpulse.
freq float64 Thefrequencyatwhichtogeneratepulses.
dutyCycle float64 Thewidthofthepulsedividedbythepulseperiod.NI-DAQmxusesthisratio,combinedwithfrequency,todeterminepulsewidthandtheintervalbetweenpulses.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateCOPulseChanTicksint32DAQmxCreateCOPulseChanTicks(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],constcharsourceTerminal[],int32idleState,int32initialDelay,int32lowTicks,int32highTicks);
PurposeCreateschannel(s)togeneratedigitalpulsesdefinedbythenumberoftimebaseticksthatthepulseisatahighstateandthenumberoftimebaseticksthatthepulseisatalowstateandalsoaddsthechanneltothetaskyouspecifywithtaskHandle.Thepulsesappearonthedefaultoutputterminalofthecounterunlessyouselectadifferentoutputterminal.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
counter constchar[] Thenameofthecountertousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
sourceTerminal constchar[] Theterminaltowhichyouconnectanexternaltimebase.Youalsocanspecifyasourceterminalbyusingaterminalname.
idleState int32 Therestingstateoftheoutputterminal.
Value DescriptionDAQmx_Val_High Highstate.DAQmx_Val_Low Lowstate.
initialDelay int32 Thenumberoftimebasetickstowaitbeforegeneratingthefirstpulse.
lowTicks int32 Thenumberoftimebaseticksthatthepulseislow.
highTicks int32 Thenumberoftimebaseticksthatthepulseishigh.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateCOPulseChanTimeint32DAQmxCreateCOPulseChanTime(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],int32units,int32idleState,float64initialDelay,float64lowTime,float64highTime);
PurposeCreateschannel(s)togeneratedigitalpulsesdefinedbytheamountoftimethepulseisatahighstateandtheamountoftimethepulseisatalowstateandaddsthechanneltothetaskyouspecifywithtaskHandle.Thepulsesappearonthedefaultoutputterminalofthecounterunlessyouselectadifferentoutputterminal.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowhichtoaddthechannelsthatthisfunctioncreates.
counter constchar[] Thenameofthecountertousetocreatevirtualchannels.Youcanspecifyalistorrangeofphysicalchannels.
nameToAssignToChannel constchar[] Thename(s)toassigntothecreatedvirtualchannel(s).Ifyoudonotspecifyaname,NI-DAQmxusesthephysicalchannelnameasthevirtualchannelname.IfyouspecifyyourownnamesfornameToAssignToChannel,youmustusethenameswhenyourefertothesechannelsinotherNI-DAQmxfunctions.Ifyoucreatemultiplevirtualchannelswithonecalltothisfunction,youcanspecifyalistofnamesseparatedbycommas.Ifyouprovidefewernamesthanthenumberofvirtualchannelsyoucreate,NI-DAQmxautomaticallyassignsnamestothevirtualchannels.
units int32 Theunitsinwhichtodefinepulsehighandlowtime.
Value DescriptionDAQmx_Val_Seconds Seconds
idleState int32 Therestingstateoftheoutputterminal.
Value DescriptionDAQmx_Val_High Highstate.DAQmx_Val_Low Lowstate.
initialDelay float64 Theamountoftimeinsecondstowaitbeforegeneratingthefirstpulse.
lowTime float64 Theamountoftimethepulseislow,inseconds.
highTime float64 Theamountoftimethepulseishigh,inseconds.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgBurstHandshakingTimingExportClockint32DAQmxCfgBurstHandshakingTimingExportClock(TaskHandle
taskHandle,int32sampleMode,uInt64sampsPerChan,float64sampleClkRate,constcharsampleClkOutpTerm[],int32sampleClkPulsePolarity,int32pauseWhen,int32readyEventActiveLevel);
PurposeConfigureswhentheDAQdevicetransfersdatatoaperipheraldevice,usingtheDAQdevice'sonboardsampleclocktocontrolbursthandshakingtiming.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
sampleMode int32 Specifieswhetherthetaskacquiresorgeneratessamplescontinuouslyorifitacquiresorgeneratesafinitenumberofsamples.
Value DescriptionDAQmx_Val_FiniteSamps Acquireor
generateafinitenumberofsamples.
DAQmx_Val_ContSamps Acquireorgeneratesamplesuntilyoustopthetask.
DAQmx_Val_HWTimedSinglePoint Acquireorgeneratesamplescontinuouslyusinghardwaretimingwithoutabuffer.Hardwaretimedsinglepoint
samplemodeissupportedonlyforthesampleclockandchangedetectiontiming
types.
sampsPerChan uInt64 ThenumberofsamplestoacquirefromeachchannelifsampleModeisDAQmx_Val_FiniteSamps.IfsampleModeisDAQmx_Val_ContSamps,NI-DAQmxusesthisvaluetodeterminethebuffersize.
sampleClkRate float64 Specifiesthesamplingrateinsamplesperchannelpersecond.IfyouuseanexternalsourcefortheSampleClock,setthisinputtothemaximumexpectedrateofthatclock.
sampleClkOutpTerm constchar[]
SpecifiestheterminaltowhichtoroutetheSampleClock.
sampleClkPulsePolarity int32 Specifiesifthepolarityfortheexportedsampleclockisactivehighoractivelow.
pauseWhen int32 Specifieswhetherthetaskpauseswhilethesignalishighorlow.
readyEventActiveLevel int32 SpecifiesthepolarityfortheReadyforTransferevent.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgBurstHandshakingTimingImportClockint32DAQmxCfgBurstHandshakingTimingImportClock(TaskHandle
taskHandle,int32sampleMode,uInt64sampsPerChan,float64sampleClkRate,constcharsampleClkSrc[],int32sampleClkActiveEdge,int32pauseWhen,int32readyEventActiveLevel);
PurposeConfigureswhentheDAQdevicetransfersdatatoaperipheraldevice,usinganimportedsampleclocktocontrolbursthandshakingtiming.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
sampleMode int32 Specifieswhetherthetaskacquiresorgeneratessamplescontinuouslyorifitacquiresorgeneratesafinitenumberofsamples.
Value DescriptionDAQmx_Val_FiniteSamps Acquireor
generateafinitenumberofsamples.
DAQmx_Val_ContSamps Acquireorgeneratesamplesuntilyoustopthetask.
DAQmx_Val_HWTimedSinglePoint Acquireorgeneratesamplescontinuouslyusinghardwaretimingwithoutabuffer.Hardwaretimedsinglepoint
samplemodeissupportedonlyforthesampleclockandchangedetectiontiming
types.
sampsPerChan uInt64 ThenumberofsamplestoacquirefromeachchannelifsampleModeisDAQmx_Val_FiniteSamps.IfsampleModeisDAQmx_Val_ContSamps,NI-DAQmxusesthisvaluetodeterminethebuffersize.
sampleClkRate float64 Specifiesthesamplingrateinsamplesperchannelpersecond.IfyouuseanexternalsourcefortheSampleClock,setthisinputtothemaximumexpectedrateofthatclock.
sampleClkSrc constchar[]
SpecifiestheterminalofthesignaltouseastheSampleClock.
sampleClkActiveEdge int32 Specifiesonwhichedgeofaclockpulsesamplingtakesplace.ThispropertyisusefulprimarilywhenthesignalyouuseastheSampleClockisnotaperiodicclock.
Value DescriptionDAQmx_Val_Rising Acquireorgenerate
samplesontherisingedgesoftheSampleClock.
DAQmx_Val_Falling AcquireorgeneratesamplesonthefallingedgesoftheSampleClock.
pauseWhen int32 Specifieswhetherthetaskpauseswhilethesignalishighorlow.
readyEventActiveLevel int32 SpecifiesthepolarityfortheReadyforTransferevent.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgChangeDetectionTimingint32DAQmxCfgChangeDetectionTiming(TaskHandletaskHandle,constchar
risingEdgeChan[],constcharfallingEdgeChan[],int32sampleMode,uInt64sampsPerChan);
PurposeConfiguresthetasktoacquiresamplesontherisingand/orfallingedgesofthelinesorportsyouspecify.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
risingEdgeChan constchar[]
Thenamesofthedigitallinesorportsonwhichtodetectrisingedges.Youcanspecifyalistorrangeofchannels.
fallingEdgeChan constchar[]
Thenamesofthedigitallinesorportsonwhichtodetectfallingedges.Youcanspecifyalistorrangeofchannels.
sampleMode int32 Specifieswhetherthetaskacquiressamplescontinuouslyorifitacquiresafinitenumberofsamples.
Value DescriptionDAQmx_Val_FiniteSamps Acquireor
generateafinitenumberofsamples.
DAQmx_Val_ContSamps Acquireorgeneratesamplesuntilyoustopthetask.
DAQmx_Val_HWTimedSinglePoint Acquireorgeneratesamplescontinuouslyusinghardwaretimingwithoutabuffer.Hardwaretimedsinglepoint
samplemodeissupportedonlyforthesample
clockandchangedetectiontimingtypes.
sampsPerChan uInt64 ThenumberofsamplestoacquirefromeachchannelifsampleModeisDAQmx_Val_FiniteSamps.IfsampleModeisDAQmx_Val_ContSamps,NI-DAQmxusesthisvaluetodeterminethebuffersize.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgHandshakingTimingint32DAQmxCfgHandshakingTiming(TaskHandletaskHandle,int32
sampleMode,uInt64sampsPerChanToAcquire);
PurposeDeterminesthenumberofdigitalsamplestoacquireorgenerateusingdigitalhandshakingbetweenthedeviceandaperipheraldevice.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
sampleMode int32 Specifieswhetherthetaskacquiresorgeneratessamplescontinuouslyorifitacquiresorgeneratesafinitenumberofsamples.
Value DescriptionDAQmx_Val_FiniteSamps Acquireor
generateafinitenumberofsamples.
DAQmx_Val_ContSamps Acquireorgeneratesamplesuntilyoustopthetask.
DAQmx_Val_HWTimedSinglePoint Acquireorgeneratesamplescontinuouslyusinghardwaretimingwithoutabuffer.Hardwaretimedsinglepoint
samplemodeissupportedonlyforthesampleclockandchangedetectiontiming
types.
sampsPerChanToAcquire uInt64 ThenumberofsamplestoacquireorgenerateforeachchannelinthetaskifsampleModeisDAQmx_Val_FiniteSamps.IfsampleModeisDAQmx_Val_ContSamps,NI-DAQmxusesthisvaluetodeterminethebuffersize.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgImplicitTimingint32DAQmxCfgImplicitTiming(TaskHandletaskHandle,int32sampleMode,
uInt64sampsPerChanToAcquire);
PurposeSetsonlythenumberofsamplestoacquireorgeneratewithoutspecifyingtiming.Typically,youshouldusethisfunctionwhenthetaskdoesnotrequiresampletiming,suchastasksthatusecountersforbufferedfrequencymeasurement,bufferedperiodmeasurement,orpulsetraingeneration.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
sampleMode int32 Specifieswhetherthetaskacquiresorgeneratessamplescontinuouslyorifitacquiresorgeneratesafinitenumberofsamples.
Value DescriptionDAQmx_Val_FiniteSamps Acquireor
generateafinitenumberofsamples.
DAQmx_Val_ContSamps Acquireorgeneratesamplesuntilyoustopthetask.
DAQmx_Val_HWTimedSinglePoint Acquireorgeneratesamplescontinuouslyusinghardwaretimingwithoutabuffer.Hardwaretimedsinglepoint
samplemodeissupportedonlyforthesampleclockandchangedetectiontiming
types.
sampsPerChanToAcquire uInt64 ThenumberofsamplestoacquireorgenerateforeachchannelinthetaskifsampleModeisDAQmx_Val_FiniteSamps.IfsampleModeisDAQmx_Val_ContSamps,NI-DAQmxusesthisvaluetodeterminethebuffersize.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgPipelinedSampClkTimingint32DAQmxCfgPipelinedSampClkTiming(TaskHandletaskHandle,constchar
source[],float64rate,int32activeEdge,int32sampleMode,uInt64samplesPerChannel);
PurposeSetsthesourceoftheSampleClock,therateoftheSampleClock,andthenumberofsamplestoacquireorgenerate.ThedeviceacquiresorgeneratessamplesoneachSampleClockedge,butdoesnotrespondtocertaintriggersuntilafewSampleClockedgeslater.Pipeliningallowshigherdatatransferratesatthecostofincreasedtriggerresponselatency.Refertothedevicedocumentationforinformationaboutwhichtriggerspipeliningaffects.ThistimingtypeallowshandshakingusingthePausetrigger,theReadyforTransferevent,ortheDataActiveevent.Refertothedevicedocumentationformoreinformation.ThistimingtypeissupportedonlybytheNI6536andNI6537.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
source constchar[] ThesourceterminaloftheSampleClock.Tousetheinternalclockofthedevice,useNULLoruseOnboardClock.
rate float64 Thesamplingrateinsamplespersecondperchannel.IfyouuseanexternalsourcefortheSampleClock,setthisvaluetothemaximumexpectedrateofthatclock.
activeEdge int32 Specifiesonwhichedgeoftheclocktoacquireorgeneratesamples.
Value DescriptionDAQmx_Val_Rising Acquireorgenerate
samplesontherisingedgesoftheSampleClock.
DAQmx_Val_Falling AcquireorgeneratesamplesonthefallingedgesoftheSampleClock.
sampleMode int32 Specifieswhetherthetaskacquiresorgeneratessamplescontinuouslyorifitacquiresorgeneratesafinitenumberofsamples.
Value DescriptionDAQmx_Val_FiniteSamps Acquireor
generateafinitenumberofsamples.
DAQmx_Val_ContSamps Acquireorgeneratesamplesuntilyoustopthetask.
DAQmx_Val_HWTimedSinglePoint Acquireorgeneratesamples
continuouslyusinghardwaretimingwithoutabuffer.Hardwaretimedsinglepoint
samplemodeissupportedonlyforthesampleclockandchangedetectiontimingtypes.
sampsPerChanToAcquire uInt64 ThenumberofsamplestoacquireorgenerateforeachchannelinthetaskifsampleModeisDAQmx_Val_FiniteSamps.IfsampleModeisDAQmx_Val_ContSamps,NI-DAQmxusesthisvaluetodeterminethebuffersize.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgSampClkTimingint32DAQmxCfgSampClkTiming(TaskHandletaskHandle,constcharsource[],
float64rate,int32activeEdge,int32sampleMode,uInt64sampsPerChanToAcquire);
PurposeSetsthesourceoftheSampleClock,therateoftheSampleClock,andthenumberofsamplestoacquireorgenerate.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
source constchar[] ThesourceterminaloftheSampleClock.Tousetheinternalclockofthedevice,useNULLoruseOnboardClock.
rate float64 Thesamplingrateinsamplespersecondperchannel.IfyouuseanexternalsourcefortheSampleClock,setthisvaluetothemaximumexpectedrateofthatclock.
activeEdge int32 Specifiesonwhichedgeoftheclocktoacquireorgeneratesamples.
Value DescriptionDAQmx_Val_Rising Acquireorgenerate
samplesontherisingedgesoftheSampleClock.
DAQmx_Val_Falling AcquireorgeneratesamplesonthefallingedgesoftheSampleClock.
sampleMode int32 Specifieswhetherthetaskacquiresorgeneratessamplescontinuouslyorifitacquiresorgeneratesafinitenumberofsamples.
Value DescriptionDAQmx_Val_FiniteSamps Acquireor
generateafinitenumberofsamples.
DAQmx_Val_ContSamps Acquireorgeneratesamplesuntilyoustopthetask.
DAQmx_Val_HWTimedSinglePoint Acquireorgeneratesamples
continuouslyusinghardwaretimingwithoutabuffer.Hardwaretimedsinglepoint
samplemodeissupportedonlyforthesampleclockandchangedetectiontimingtypes.
sampsPerChanToAcquire uInt64 ThenumberofsamplestoacquireorgenerateforeachchannelinthetaskifsampleModeisDAQmx_Val_FiniteSamps.IfsampleModeisDAQmx_Val_ContSamps,NI-DAQmxusesthisvaluetodeterminethebuffersize.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgAnlgEdgeStartTrigint32DAQmxCfgAnlgEdgeStartTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerSlope,float64triggerLevel);
PurposeConfiguresthetasktostartacquiringorgeneratingsampleswhenananalogsignalcrossesthelevelyouspecify.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
triggerSource constchar[] Thenameofachannelorterminalwherethereisananalogsignaltouseasthesourceofthetrigger.ForESeriesdevices,ifyouuseachannelname,thechannelmustbethefirstchannelinthetask.TheonlyterminalyoucanuseforESeriesdevicesisPFI0.
triggerSlope int32 SpecifiesonwhichslopeofthesignaltostartacquiringorgeneratingsampleswhenthesignalcrossestriggerLevel.
Value DescriptionDAQmx_Val_RisingSlope Triggerontherising
slopeofthesignal.DAQmx_Val_FallingSlope Triggeronthefalling
slopeofthesignal.
triggerLevel float64 Thethresholdatwhichtostartacquiringorgeneratingsamples.Specifythisvalueintheunitsofthemeasurementorgeneration.UsetriggerSlopetospecifyonwhichslopetotriggeratthisthreshold.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgAnlgWindowStartTrigint32DAQmxCfgAnlgWindowStartTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerWhen,float64windowTop,float64windowBottom);
PurposeConfiguresthetasktostartacquiringorgeneratingsampleswhenananalogsignalentersorleavesarangeyouspecify.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
triggerSource constchar[]
Thenameofavirtualchannelorterminalwherethereisananalogsignaltouseasthesourceofthetrigger.ForESeriesdevices,ifyouuseavirtualchannel,itmustbethefirstchannelinthetask.TheonlyterminalyoucanuseforESeriesdevicesisPFI0.
triggerWhen int32 Specifieswhetherthetaskstartsmeasuringorgeneratingsampleswhenthesignalentersthewindoworwhenitleavesthewindow.UsewindowBottomandwindowToptospecifythelimitsofthewindow.
Value DescriptionDAQmx_Val_EnteringWin Triggerwhenthe
signalentersthewindow.
DAQmx_Val_LeavingWin Triggerwhenthesignalleavesthewindow.
windowTop float64 Theupperlimitofthewindow.Specifythisvalueintheunitsofthemeasurementorgeneration.
windowBottom float64 Thelowerlimitofthewindow.Specifythisvalueintheunitsofthemeasurementorgeneration.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgDigEdgeStartTrigint32DAQmxCfgDigEdgeStartTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerEdge);
PurposeConfiguresthetasktostartacquiringorgeneratingsamplesonarisingorfallingedgeofadigitalsignal.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
triggerSource constchar[] Thenameofaterminalwherethereisadigitalsignaltouseasthesourceofthetrigger.
triggerEdge int32 Specifiesonwhichedgeofadigitalsignaltostartacquiringorgeneratingsamples.
Value DescriptionDAQmx_Val_Rising Risingedge(s).DAQmx_Val_Falling Fallingedge(s).
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgDigPatternStartTrigint32DAQmxCfgDigPatternStartTrig(TaskHandletaskHandle,constchar
triggerSource[],constchartriggerPattern[],int32triggerWhen);
PurposeConfiguresatasktostartacquiringorgeneratingsampleswhenadigitalpatternismatched.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
triggerSource constchar[] Specifiesthephysicalchannelstouseforpatternmatching.Theorderofthephysicalchannelsdeterminestheorderofthepattern.Ifaportisincluded,theorderofthephysicalchannelswithintheportisinascendingorder.
triggerPattern constchar[] Specifiesthedigitalpatternthatmustbemetforthetriggertooccur.
triggerWhen int32 Specifiestheconditionsunderwhichthetriggeroccurs.
Value DescriptionDAQmx_Val_PatternMatches Pattern
matchesDAQmx_Val_PatternDoesNotMatch Patterndoes
notmatch
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxDisableStartTrigint32DAQmxDisableStartTrig(TaskHandletaskHandle);
PurposeConfiguresthetasktostartacquiringorgeneratingsamplesimmediatelyuponstartingthetask.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgAnlgEdgeRefTrigint32DAQmxCfgAnlgEdgeRefTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerSlope,float64triggerLevel,uInt32pretriggerSamples);
PurposeConfiguresthetasktostoptheacquisitionwhenthedeviceacquiresallpretriggersamples,ananalogsignalreachesthelevelyouspecify,andthedeviceacquiresallpost-triggersamples.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
triggerSource constchar[] Thenameofavirtualchannelorterminalwherethereisananalogsignaltouseasthesourceofthetrigger.ForESeriesdevices,ifyouuseavirtualchannel,itmustbetheonlychannelinthetask.TheonlyterminalyoucanuseforESeriesdevicesisPFI0.
triggerSlope int32 SpecifiesonwhichslopeofthesignaltheReferenceTriggeroccurs.
Value DescriptionDAQmx_Val_RisingSlope Triggeronthe
risingslopeofthesignal.
DAQmx_Val_FallingSlope Triggeronthefallingslopeofthesignal.
triggerLevel float64 Specifiesatwhatthresholdtotrigger.Specifythisvalueintheunitsofthemeasurementorgeneration.UsetriggerSlopetospecifyonwhichslopetotriggeratthisthreshold.
pretriggerSamples uInt32 TheminimumnumberofsamplesperchanneltoacquirebeforerecognizingtheReferenceTrigger.ThenumberofposttriggersamplesperchannelisequaltonumberofsamplesperchannelintheNI-DAQmxTimingfunctionsminuspretriggerSamples.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgAnlgWindowRefTrigint32DAQmxCfgAnlgWindowRefTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerWhen,float64windowTop,float64windowBottom,uInt32pretriggerSamples);
PurposeConfiguresthetasktostoptheacquisitionwhenthedeviceacquiresallpretriggersamples,ananalogsignalentersorleavesarangeyouspecify,andthedeviceacquiresallpost-triggersamples.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
triggerSource constchar[] Thenameofavirtualchannelorterminalwherethereisananalogsignaltouseasthesourceofthetrigger.ForESeriesdevices,ifyouuseavirtualchannel,itmustbetheonlychannelinthetask.TheonlyterminalyoucanuseforESeriesdevicesisPFI0.
triggerWhen int32 SpecifieswhethertheReferenceTriggeroccurswhenthesignalentersthewindoworwhenitleavesthewindow.UsewindowBottomandwindowToptospecifythelimitsofthewindow.
Value DescriptionDAQmx_Val_EnteringWin Triggerwhenthe
signalentersthewindow.
DAQmx_Val_LeavingWin Triggerwhenthesignalleavesthewindow.
windowTop float64 Theupperlimitofthewindow.Specifythisvalueintheunitsofthemeasurementorgeneration.
windowBottom float64 Thelowerlimitofthewindow.Specifythisvalueintheunitsofthemeasurementorgeneration.
pretriggerSamples uInt32 TheminimumnumberofsamplesperchanneltoacquirebeforerecognizingtheReferenceTrigger.ThenumberofposttriggersamplesperchannelisequaltonumberofsamplesperchannelintheNI-DAQmxTimingfunctionsminuspretriggerSamples.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgDigEdgeRefTrigint32DAQmxCfgDigEdgeRefTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerEdge,uInt32pretriggerSamples);
PurposeConfiguresthetasktostoptheacquisitionwhenthedeviceacquiresallpretriggersamples,detectsarisingorfallingedgeofadigitalsignal,andacquiresallposttriggersamples.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
triggerSource constchar[]
Specifiesthenameofaterminalwherethereisadigitalsignaltouseasthesourceofthetrigger.
triggerEdge int32 SpecifiesonwhichedgeofthedigitalsignaltheReferenceTriggeroccurs.
Value DescriptionDAQmx_Val_Rising Risingedge(s).DAQmx_Val_Falling Fallingedge(s).
pretriggerSamples uInt32 TheminimumnumberofsamplesperchanneltoacquirebeforerecognizingtheReferenceTrigger.ThenumberofposttriggersamplesperchannelisequaltonumberofsamplesperchannelintheNI-DAQmxTimingfunctionsminuspretriggerSamples.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgDigPatternRefTrigint32DAQmxCfgDigPatternRefTrig(TaskHandletaskHandle,constchar
triggerSource[],constchartriggerPattern[],int32triggerWhen,uInt32pretriggerSamples);
PurposeConfiguresthetasktostoptheacquisitionwhenthedeviceacquiresallpretriggersamples,matchesordoesnotmatchadigitalpattern,andacquiresallposttriggersamples.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
triggerSource constchar[] Specifiesthephysicalchannelstouseforpatternmatching.Theorderofthephysicalchannelsdeterminestheorderofthepattern.Ifaportisincluded,theorderofthephysicalchannelswithintheportisinascendingorder.
triggerPattern constchar[] Specifiesthedigitalpatternthatmustbemetforthetriggertooccur.
triggerWhen int32 Specifiestheconditionsunderwhichthetriggeroccurs.
Value DescriptionDAQmx_Val_PatternMatches Pattern
matchesDAQmx_Val_PatternDoesNotMatch Patterndoes
notmatch
pretriggerSamples uInt32 TheminimumnumberofsamplesperchanneltoacquirebeforerecognizingtheReferenceTrigger.ThenumberofposttriggersamplesperchannelisequaltonumberofsamplesperchannelintheNI-DAQmxTimingfunctionsminuspretriggerSamples.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxDisableRefTrigint32DAQmxDisableRefTrig(TaskHandletaskHandle);
PurposeDisablesreferencetriggeringforthemeasurementorgeneration.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgDigEdgeAdvTrigint32DAQmxCfgDigEdgeAdvTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerEdge);
PurposeConfiguresaswitchtasktoadvancetothenextentryinascanlistonarisingorfallingedgeofadigitalsignal.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
triggerSource constchar[] Theterminalwherethereisadigitalsignaltouseasthesourceofthetrigger.
triggerEdge int32 Specifiesonwhichedgeofadigitalsignaltoadvancetothenextentryinthescanlist.
Value DescriptionDAQmx_Val_Rising Risingedge(s).DAQmx_Val_Falling Fallingedge(s).
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxDisableAdvTrigint32DAQmxDisableAdvTrig(TaskHandletaskHandle);
PurposeDisablestheadvancetriggeringforthetask.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSendSoftwareTriggerint32DAQmxSendSoftwareTrigger(TaskHandletaskHandle,int32triggerID);
PurposeGeneratesthespecifiedsoftwaretrigger.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
triggerID int32 Specifieswhichsoftwaretriggertogenerate.
Value DescriptionDAQmx_Val_AdvanceTrigger Generatetheadvance
trigger
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadAnalogF64int32DAQmxReadAnalogF64(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,float64readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
PurposeReadsmultiplefloating-pointsamplesfromataskthatcontainsoneormoreanaloginputchannels.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoreadsamplesfrom.
numSampsPerChan int32 Thenumberofsamples,perchannel,toread.Thedefaultvalueof-1(DAQmx_Val_Auto)readsallavailablesamples.IfreadArraydoesnotcontainenoughspace,thisfunctionreturnsasmanysamplesasfitinreadArray.NI-DAQmxdetermineshowmanysamplestoreadbasedonwhetherthetaskacquiressamplescontinuouslyoracquiresafinitenumberofsamples.Ifthetaskacquiressamplescontinuouslyandyousetthisparameterto-1,thisfunctionreadsallthesamplescurrentlyavailableinthebuffer.Ifthetaskacquiresafinitenumberofsamplesandyousetthisparameterto-1,thefunctionwaitsforthetasktoacquireallrequestedsamples,thenreadsthosesamples.IfyousettheReadAllAvailableSamplespropertytoTRUE,thefunctionreadsthesamplescurrentlyavailableinthebufferanddoesnotwaitforthetasktoacquireallrequestedsamples.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
fillMode bool32 Specifieswhetherornotthesamplesareinterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(non-interleaved)
DAQmx_Val_GroupByScanNumber Groupbyscannumber(interleaved)
arraySizeInSamps uInt32 Thesizeofthearray,insamples,intowhichsamplesareread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
readArray float64[] Thearraytoreadsamplesinto,organizedaccordingtofillMode.
sampsPerChanRead int32* Theactualnumberofsamplesreadfromeachchannel.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadAnalogScalarF64int32DAQmxReadAnalogScalarF64(TaskHandletaskHandle,float64timeout,
float64*value,bool32*reserved);
PurposeReadsasinglefloating-pointsamplefromataskthatcontainsasingleanaloginputchannel.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoreadthesamplefrom.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
value float64* Thesamplereadfromthetask.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadBinaryI16int32DAQmxReadBinaryI16(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,int16readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
PurposeReadsmultipleunscaled,signed16-bitintegersamplesfromataskthatcontainsoneormoreanaloginputchannels.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoreadsamplesfrom.
numSampsPerChan int32 Thenumberofsamples,perchannel,toread.Thedefaultvalueof-1(DAQmx_Val_Auto)readsallavailablesamples.IfreadArraydoesnotcontainenoughspace,thisfunctionreturnsasmanysamplesasfitinreadArray.NI-DAQmxdetermineshowmanysamplestoreadbasedonwhetherthetaskacquiressamplescontinuouslyoracquiresafinitenumberofsamples.Ifthetaskacquiressamplescontinuouslyandyousetthisparameterto-1,thisfunctionreadsallthesamplescurrentlyavailableinthebuffer.Ifthetaskacquiresafinitenumberofsamplesandyousetthisparameterto-1,thefunctionwaitsforthetasktoacquireallrequestedsamples,thenreadsthosesamples.IfyousettheReadAllAvailableSamplespropertytoTRUE,thefunctionreadsthesamplescurrentlyavailableinthebufferanddoesnotwaitforthetasktoacquireallrequestedsamples.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
fillMode bool32 Specifieswhetherornotthesamplesareinterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(non-interleaved)
DAQmx_Val_GroupByScanNumber Groupbyscannumber(interleaved)
arraySizeInSamps uInt32 Thesizeofthearray,insamples,intowhichsamplesareread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
readArray int16[] Thearraytoreadsamplesinto,organizedaccordingtofillMode.
sampsPerChanRead int32* Theactualnumberofsamplesreadfromeachchannel.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadBinaryI32int32DAQmxReadBinaryI32(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,int32readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
PurposeReadsoneormoreunscaled32-bitsignedintegersamplesfromataskthatcontainsoneormoreanaloginputchannels.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
numSampsPerChan int32 Thenumberofsamples,perchannel,toread.Thedefaultvalueof-1(DAQmx_Val_Auto)readsallavailablesamples.IfreadArraydoesnotcontainenoughspace,thisfunctionreturnsasmanysamplesasfitinreadArray.NI-DAQmxdetermineshowmanysamplestoreadbasedonwhetherthetaskacquiressamplescontinuouslyoracquiresafinitenumberofsamples.Ifthetaskacquiressamplescontinuouslyandyousetthisparameterto-1,thisfunctionreadsallthesamplescurrentlyavailableinthebuffer.Ifthetaskacquiresafinitenumberofsamplesandyousetthisparameterto-1,thefunctionwaitsforthetasktoacquireallrequestedsamples,thenreadsthosesamples.IfyousettheReadAllAvailableSamplespropertytoTRUE,thefunctionreadsthesamplescurrentlyavailableinthebufferanddoesnotwaitforthetasktoacquireallrequestedsamples.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
fillMode bool32 Specifieswhetherornotthesamplesareinterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(non-interleaved)
DAQmx_Val_GroupByScanNumber Groupbyscannumber(interleaved)
arraySizeInSamps uInt32 Thesizeofthearray,insamples,intowhichsamplesareread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
readArray int32[] Thearraytoreadsamplesinto,organizedaccordingtofillMode.
sampsPerChanRead int32* Theactualnumberofsamplesreadfromeachchannel.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadBinaryU16int32DAQmxReadBinaryU16(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,uInt16readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
PurposeReadsmultipleunscaled,unsigned16-bitintegersamplesfromataskthatcontainsoneormoreanaloginputchannels.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoreadsamplesfrom.
numSampsPerChan int32 Thenumberofsamples,perchannel,toread.Thedefaultvalueof-1(DAQmx_Val_Auto)readsallavailablesamples.IfreadArraydoesnotcontainenoughspace,thisfunctionreturnsasmanysamplesasfitinreadArray.NI-DAQmxdetermineshowmanysamplestoreadbasedonwhetherthetaskacquiressamplescontinuouslyoracquiresafinitenumberofsamples.Ifthetaskacquiressamplescontinuouslyandyousetthisparameterto-1,thisfunctionreadsallthesamplescurrentlyavailableinthebuffer.Ifthetaskacquiresafinitenumberofsamplesandyousetthisparameterto-1,thefunctionwaitsforthetasktoacquireallrequestedsamples,thenreadsthosesamples.IfyousettheReadAllAvailableSamplespropertytoTRUE,thefunctionreadsthesamplescurrentlyavailableinthebufferanddoesnotwaitforthetasktoacquireallrequestedsamples.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
fillMode bool32 Specifieswhetherornotthesamplesareinterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(non-interleaved)
DAQmx_Val_GroupByScanNumber Groupbyscannumber(interleaved)
arraySizeInSamps uInt32 Thesizeofthearray,insamples,intowhichsamplesareread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
readArray uInt16[] Thearraytoreadsamplesinto,organizedaccordingtofillMode.
sampsPerChanRead int32* Theactualnumberofsamplesreadfromeachchannel.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadBinaryU32int32DAQmxReadBinaryU32(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,uInt32readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
PurposeReadsoneormoreunscaled32-bitunsignedintegersamplesfromataskthatcontainsoneormoreanaloginputchannels.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
numSampsPerChan int32 Thenumberofsamples,perchannel,toread.Thedefaultvalueof-1(DAQmx_Val_Auto)readsallavailablesamples.IfreadArraydoesnotcontainenoughspace,thisfunctionreturnsasmanysamplesasfitinreadArray.NI-DAQmxdetermineshowmanysamplestoreadbasedonwhetherthetaskacquiressamplescontinuouslyoracquiresafinitenumberofsamples.Ifthetaskacquiressamplescontinuouslyandyousetthisparameterto-1,thisfunctionreadsallthesamplescurrentlyavailableinthebuffer.Ifthetaskacquiresafinitenumberofsamplesandyousetthisparameterto-1,thefunctionwaitsforthetasktoacquireallrequestedsamples,thenreadsthosesamples.IfyousettheReadAllAvailableSamplespropertytoTRUE,thefunctionreadsthesamplescurrentlyavailableinthebufferanddoesnotwaitforthetasktoacquireallrequestedsamples.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
fillMode bool32 Specifieswhetherornotthesamplesareinterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(non-interleaved)
DAQmx_Val_GroupByScanNumber Groupbyscannumber(interleaved)
arraySizeInSamps uInt32 Thesizeofthearray,insamples,intowhichsamplesareread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
readArray uInt32[] Thearraytoreadsamplesinto,organizedaccordingtofillMode.
sampsPerChanRead int32* Theactualnumberofsamplesreadfromeachchannel.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadCounterF64int32DAQmxReadCounterF64(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,float64readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
PurposeReadsmultiplefloating-pointsamplesfromacountertask.Usethisfunctionwhencountersamplesarescaledtoafloating-pointvalue,suchasforfrequencyandperiodmeasurements.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoreadsamplesfrom.
numSampsPerChan int32 Thenumberofsamples,perchannel,toread.Thedefaultvalueof-1(DAQmx_Val_Auto)readsallavailablesamples.IfreadArraydoesnotcontainenoughspace,thisfunctionreturnsasmanysamplesasfitinreadArray.NI-DAQmxdetermineshowmanysamplestoreadbasedonwhetherthetaskacquiressamplescontinuouslyoracquiresafinitenumberofsamples.Ifthetaskacquiressamplescontinuouslyandyousetthisparameterto-1,thisfunctionreadsallthesamplescurrentlyavailableinthebuffer.Ifthetaskacquiresafinitenumberofsamplesandyousetthisparameterto-1,thefunctionwaitsforthetasktoacquireallrequestedsamples,thenreadsthosesamples.IfyousettheReadAllAvailableSamplespropertytoTRUE,thefunctionreadsthesamplescurrentlyavailableinthebufferanddoesnotwaitforthetasktoacquireallrequestedsamples.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
arraySizeInSamps uInt32 Thesizeofthearray,insamples,intowhichsamplesareread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
readArray float64[] Thearraytoreadsamplesinto.
sampsPerChanRead int32* Theactualnumberofsamplesreadfromeachchannel.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadCounterScalarF64int32DAQmxReadCounterScalarF64(TaskHandletaskHandle,float64timeout,
float64*value,bool32*reserved);
PurposeReadsasinglefloating-pointsamplefromacountertask.Usethisfunctionwhenthecountersampleisscaledtoafloating-pointvalue,suchasforfrequencyandperiodmeasurement.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoreadthesamplefrom.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
value float64* Thesamplereadfromthetask.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadCounterScalarU32int32DAQmxReadCounterScalarU32(TaskHandletaskHandle,float64timeout,
uInt32*value,bool32*reserved);
PurposeReadsa32-bitintegersamplefromacountertask.Usethisfunctionwhenthecountersampleisreturnedunscaled,suchasforedgecounting.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoreadthesamplefrom.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
value uInt32* Thesamplereadfromthetask.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadCounterU32int32DAQmxReadCounterU32(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,uInt32readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
PurposeReadsmultiple32-bitintegersamplesfromacountertask.Usethisfunctionwhencountersamplesarereturnedunscaled,suchasforedgecounting.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoreadsamplesfrom.
numSampsPerChan int32 Thenumberofsamples,perchannel,toread.Thedefaultvalueof-1(DAQmx_Val_Auto)readsallavailablesamples.IfreadArraydoesnotcontainenoughspace,thisfunctionreturnsasmanysamplesasfitinreadArray.NI-DAQmxdetermineshowmanysamplestoreadbasedonwhetherthetaskacquiressamplescontinuouslyoracquiresafinitenumberofsamples.Ifthetaskacquiressamplescontinuouslyandyousetthisparameterto-1,thisfunctionreadsallthesamplescurrentlyavailableinthebuffer.Ifthetaskacquiresafinitenumberofsamplesandyousetthisparameterto-1,thefunctionwaitsforthetasktoacquireallrequestedsamples,thenreadsthosesamples.IfyousettheReadAllAvailableSamplespropertytoTRUE,thefunctionreadsthesamplescurrentlyavailableinthebufferanddoesnotwaitforthetasktoacquireallrequestedsamples.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
arraySizeInSamps uInt32 Thesizeofthearray,insamples,intowhichsamplesareread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
readArray uInt32[] Thearraytoreadsamplesinto.
sampsPerChanRead int32* Theactualnumberofsamplesreadfromeachchannel.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadDigitalLinesint32DAQmxReadDigitalLines(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,uInt8readArray[],uInt32arraySizeInBytes,int32*sampsPerChanRead,int32*numBytesPerSamp,bool32*reserved);
PurposeReadsmultiplesamplesfromeachdigitallineinatask.Eachlineinachannelgetsonebytepersample.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoreadsamplesfrom.
numSampsPerChan int32 Thenumberofsamples,perchannel,toread.Thedefaultvalueof-1(DAQmx_Val_Auto)readsallavailablesamples.IfreadArraydoesnotcontainenoughspace,thisfunctionreturnsasmanysamplesasfitinreadArray.NI-DAQmxdetermineshowmanysamplestoreadbasedonwhetherthetaskacquiressamplescontinuouslyoracquiresafinitenumberofsamples.Ifthetaskacquiressamplescontinuouslyandyousetthisparameterto-1,thisfunctionreadsallthesamplescurrentlyavailableinthebuffer.Ifthetaskacquiresafinitenumberofsamplesandyousetthisparameterto-1,thefunctionwaitsforthetasktoacquireallrequestedsamples,thenreadsthosesamples.IfyousettheReadAllAvailableDatapropertytoTRUE,thefunctionreadsthesamplescurrentlyavailableinthebufferanddoesnotwaitforthetasktoacquireallrequestedsamples.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
fillMode bool32 Specifieswhetherornotthesamplesareinterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(non-interleaved)
DAQmx_Val_GroupByScanNumber Groupbyscannumber(interleaved)
arraySizeInBytes uInt32 Thesizeofthearray,insamples,intowhichsamplesareread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
readArray uInt8[] Thearraytoreadsamplesinto.EachnumBytesPerSampcorrespondstoonesampleperchannel,witheachelementinthatgroupingcorrespondingtoalineinthatchannel,uptothenumberoflinescontainedinthechannel.
sampsPerChanRead int32* Theactualnumberofsamplesreadfromeachchannel.
numBytesPerSamp int32* ThenumberofelementsinreadArraythatconstitutesasampleperchannel.Foreachsampleperchannel,numBytesPerSampisthenumberofbytesthatchannelconsistsof.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadDigitalScalarU32int32DAQmxReadDigitalScalarU32(TaskHandletaskHandle,float64timeout,
uInt32*value,bool32*reserved);
PurposeReadsasingle32-bitintegersamplefromataskthatcontainsasingledigitalinputchannel.Usethisfunctionfordeviceswithupto32linesperport.Thesampleisreturnedinunsignedintegerformat.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoreadthesamplefrom.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsample.Iftheentirerequestedsampleisread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnswhatwasactuallyread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
value uInt32* Thesamplereadfromthetask.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadDigitalU8int32DAQmxReadDigitalU8(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,uInt8readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
PurposeReadsmultiple8-bitintegersamplesfromataskthathasoneormoremultipledigitalinputchannels.Usethisfunctionfordeviceswithupto8linesperport.Thesamplesarereturnedinunsignedbyteformat.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritesamplesto.
numSampsPerChan int32 Thenumberofsamples,perchannel,toread.Thedefaultvalueof-1(DAQmx_Val_Auto)readsallavailablesamples.IfreadArraydoesnotcontainenoughspace,thisfunctionreturnsasmanysamplesasfitinreadArray.NI-DAQmxdetermineshowmanysamplestoreadbasedonwhetherthetaskacquiressamplescontinuouslyoracquiresafinitenumberofsamples.Ifthetaskacquiressamplescontinuouslyandyousetthisparameterto-1,thisfunctionreadsallthesamplescurrentlyavailableinthebuffer.Ifthetaskacquiresafinitenumberofsamplesandyousetthisparameterto-1,thefunctionwaitsforthetasktoacquireallrequestedsamples,thenreadsthosesamples.IfyousettheReadAllAvailableSamplespropertytoTRUE,thefunctionreadsthesamplescurrentlyavailableinthebufferanddoesnotwaitforthetasktoacquireallrequestedsamples.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
fillMode bool32 Specifieswhetherornotthesamplesareinterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(non-interleaved)
DAQmx_Val_GroupByScanNumber Groupbyscannumber(interleaved)
arraySizeInSamps uInt32 Thesizeofthearray,insamples,intowhichsamplesareread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
readArray uInt8[] Thearraytoreadsamplesinto,organizedaccordingtofillMode.
sampsPerChanRead int32* Theactualnumberofsamplesreadfromeachchannel.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadDigitalU16int32DAQmxReadDigitalU16(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,uInt16readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
PurposeReadsmultiple16-bitintegersamplesfromataskthatcontainsoneormoredigitalinputchannels.Usethisfunctionfordeviceswithupto16linesperport.Thesamplesarereturnedinunsignedintegerformat.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoreadsamplesfrom.
numSampsPerChan int32 Thenumberofsamples,perchannel,toread.Thedefaultvalueof-1(DAQmx_Val_Auto)readsallavailablesamples.IfreadArraydoesnotcontainenoughspace,thisfunctionreturnsasmanysamplesasfitinreadArray.NI-DAQmxdetermineshowmanysamplestoreadbasedonwhetherthetaskacquiressamplescontinuouslyoracquiresafinitenumberofsamples.Ifthetaskacquiressamplescontinuouslyandyousetthisparameterto-1,thisfunctionreadsallthesamplescurrentlyavailableinthebuffer.Ifthetaskacquiresafinitenumberofsamplesandyousetthisparameterto-1,thefunctionwaitsforthetasktoacquireallrequestedsamples,thenreadsthosesamples.IfyousettheReadAllAvailableSamplespropertytoTRUE,thefunctionreadsthesamplescurrentlyavailableinthebufferanddoesnotwaitforthetasktoacquireallrequestedsamples.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
fillMode bool32 Specifieswhetherornotthesamplesareinterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(non-interleaved)
DAQmx_Val_GroupByScanNumber Groupbyscannumber(interleaved)
arraySizeInSamps uInt32 Thesizeofthearray,insamples,intowhichsamplesareread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
readArray uInt16[] Thearraytoreadsamplesinto,organizedaccordingtofillMode.
sampsPerChanRead int32* Theactualnumberofsamplesreadfromeachchannel.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxReadDigitalU32int32DAQmxReadDigitalU32(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,uInt32readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
PurposeReadsmultiple32-bitintegersamplesfromataskthatcontainsoneormoredigitalinputchannels.Usethisfunctionfordeviceswithupto32linesperport.Thesamplesarereturnedinunsignedintegerformat.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoreadsamplesfrom.
numSampsPerChan int32 Thenumberofsamples,perchannel,toread.Thedefaultvalueof-1(DAQmx_Val_Auto)readsallavailablesamples.IfreadArraydoesnotcontainenoughspace,thisfunctionreturnsasmanysamplesasfitinreadArray.NI-DAQmxdetermineshowmanysamplestoreadbasedonwhetherthetaskacquiressamplescontinuouslyoracquiresafinitenumberofsamples.Ifthetaskacquiressamplescontinuouslyandyousetthisparameterto-1,thisfunctionreadsallthesamplescurrentlyavailableinthebuffer.Ifthetaskacquiresafinitenumberofsamplesandyousetthisparameterto-1,thefunctionwaitsforthetasktoacquireallrequestedsamples,thenreadsthosesamples.IfyousettheReadAllAvailableSamplespropertytoTRUE,thefunctionreadsthesamplescurrentlyavailableinthebufferanddoesnotwaitforthetasktoacquireallrequestedsamples.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
fillMode bool32 Specifieswhetherornotthesamplesareinterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(non-interleaved)
DAQmx_Val_GroupByScanNumber Groupbyscannumber(interleaved)
arraySizeInSamps uInt32 Thesizeofthearray,insamples,intowhichsamplesareread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
readArray uInt32[] Thearraytoreadsamplesinto,organizedaccordingtofillMode.
sampsPerChanRead int32* Theactualnumberofsamplesreadfromeachchannel.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxGetNthTaskReadChannelint32DAQmxGetNthTaskReadChannel(TaskHandletaskHandle,uInt32index,
charbuffer[],int32bufferSize);
PurposeTakesatask,anindex,andauserdeclaredbufferwithsize.ItfillsoutthebufferwiththeNthchannelasrequestedbytheuserintheindex.Thiscomesfromallthechannelsinthetask.Indexingstartsat1.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
index uInt32 TheNthchanneltoreturn.Theindexstartsat1.
bufferSize int32 Thesize,inbytes,ofbuffer.Ifyoupass0,thisfunctionreturnsthenumberofbytesneededtoallocate.
Output
buffer char[] TheNthchannelintheindex.IfyoupassNULL,thisfunctionreturnsthenumberofbytesneededtoallocate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.Forthisfunction,ifyoupassNULLforthebufferor0forthebuffersize,thisfunctionreturnsthenumberofbytesneededtoallocate.
DAQmxReadRawint32DAQmxReadRaw(TaskHandletaskHandle,int32numSampsPerChan,
float64timeout,void*readArray,uInt32arraySizeInBytes,int32*sampsRead,int32*numBytesPerSamp,bool32*reserved);
PurposeReadsrawsamplesdirectlyfromtheinputlines.Thereisnoscaling,parsing,orseparationofthesamples.Refertothespecificationsforyourdevicetodeterminetheformatoftheincomingsamples.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoreadsamplesfrom.
numSampsPerChan int32 Thenumberofsamples,perchannel,toread.Ifyousetthisparameterto-1(DAQmx_Val_Auto),NI-DAQmxdetermineshowmanysamplestoreadbasedonwhetherthetaskacquiressamplescontinuouslyoracquiresafinitenumberofsamples.Ifthetaskacquiressamplescontinuouslyandyousetthisparameterto-1,thisfunctionreadsallthesamplescurrentlyavailableinthebuffer.IfreadArraydoesnotcontainenoughspace,thisfunctionreturnsasmanysamplesasfitinreadArray.Ifthetaskacquiresafinitenumberofsamplesandyousetthisparameterto-1,thefunctionwaitsforthetasktoacquireallrequestedsamples,thenreadsthosesamples.IfyousettheReadAllAvailableDatapropertytoTRUE,thefunctionreadsthesamplescurrentlyavailableinthebufferanddoesnotwaitforthetasktoacquireallrequestedsamples.
timeout float64 Theamountoftime,inseconds,towaitforthefunctiontoreadthesample(s).Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetoreadtherequestedsamples.Ifalltherequestedsamplesareread,thefunctionissuccessful.Otherwise,thefunctionreturnsatimeouterrorandreturnsthesamplesthatwereactuallyread.
arraySizeInBytes uInt32 Thesizeofthearrayintowhichsamplesareread.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
readArray void* Thearrayintowhichsamplesareread.
sampsRead int32* Theactualnumberofbytesreadintothearrayperscan.
numBytesPerSamp int32* ThenumberofelementsinreadArraythatconstitutesasample.Thisvaluetakesintoaccountallchannelsthatareread.Forexample,fivechannelsgiving12bytesforoneentirescanreturn12bytes.Thevalueisnotdividedalongchannellines.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteAnalogF64int32DAQmxWriteAnalogF64(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,float64writeArray[],int32*sampsPerChanWritten,bool32*reserved);
PurposeWritesmultiplefloating-pointsamplestoataskthatcontainsoneormoreanalogoutputchannels.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeof2samples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritesamplesto.
numSampsPerChan int32 Thenumberofsamples,perchannel,towrite.Youmustpassinavalueof0ormoreinorderforthesampletowrite.Ifyoupassanegativenumber,thisfunctionreturnsanerror.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
dataLayout bool32 Specifieshowthesamplesarearranged,eitherinterleavedornoninterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(noninterleaved)
DAQmx_Val_GroupByScanNumber Groupbysample(interleaved)
writeArray float64[] Thearrayof64-bitsamplestowritetothetask.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
sampsPerChanWritten int32* Theactualnumberofsamplesperchannelsuccessfullywrittentothebuffer.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteAnalogScalarF64int32DAQmxWriteAnalogScalarF64(TaskHandletaskHandle,bool32autoStart,
float64timeout,float64value,bool32*reserved);
PurposeWritesafloating-pointsampletoataskthatcontainsasingleanalogoutputchannel.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritethesampleto.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowritethevalue.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethevalue.Ifthisfunctionsuccessfullywritesthevalue,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterror.
value float64 A64-bitsampletowritetothetask.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteBinaryI16int32DAQmxWriteBinaryI16(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,int16writeArray[],int32*sampsPerChanWritten,bool32*reserved);
PurposeWritesunscaledsignedintegersamplestothetask.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeof2samples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritesamplesto.
numSampsPerChan int32 Thenumberofsamples,perchannel,towrite.Youmustpassinavalueof0ormoreinorderforthesampletowrite.Ifyoupassanegativenumber,thisfunctionreturnsanerror.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
dataLayout bool32 Specifieshowthesamplesarearranged,eitherinterleavedornoninterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(noninterleaved)
DAQmx_Val_GroupByScanNumber Groupbysample(interleaved)
writeArray int16[] Thearrayof16-bitsamplestowritetothetask.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
sampsPerChanWritten int32* Theactualnumberofsamplesperchannelsuccessfullywrittentothebuffer.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteBinaryU16int32DAQmxWriteBinaryU16(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,uInt16writeArray[],int32*sampsPerChanWritten,bool32*reserved);
PurposeWritesunscaled,unsigned16-bitintegersamplestothetask.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeof2samples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritesamplesto.
numSampsPerChan int32 Thenumberofsamples,perchannel,towrite.Youmustpassinavalueof0ormoreinorderforthesampletowrite.Ifyoupassanegativenumber,thisfunctionreturnsanerror.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
dataLayout bool32 Specifieshowthesamplesarearranged,eitherinterleavedornoninterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(noninterleaved)
DAQmx_Val_GroupByScanNumber Groupbysample(interleaved)
writeArray uInt16[] Thearrayof16-bitsamplestowritetothetask.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
sampsPerChanWritten int32* Theactualnumberofsamplesperchannelsuccessfullywrittentothebuffer.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteCtrFreqint32DAQmxWriteCtrFreq(TaskHandletaskHandle,int32numSampsPerChan,
bool32autoStart,float64timeout,bool32dataLayout,float64frequency[],float64dutyCycle[],int32*numSampsPerChanWritten,bool32*reserved);
PurposeWritesanewpulsefrequencyanddutycycletoeachchannelinacontinuouscounteroutputtaskthatcontainsoneormorechannels.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritesamplesto.
numSampsPerChan int32 Thenumberofsamples,perchannel,towrite.Youmustpassinavalueof0ormoreinorderforthesampletowrite.Ifyoupassanegativenumber,thisfunctionreturnsanerror.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
dataLayout bool32 Specifieshowthesamplesarearranged,eitherinterleavedornoninterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(noninterleaved)
DAQmx_Val_GroupByScanNumber Groupbysample(interleaved)
frequency float64[] Specifiesatwhatfrequencytogeneratepulses.
dutyCycle float64[] Thewidthofthepulsedividedbythepulseperiod.NI-DAQmxusesthisratio,combinedwithfrequency,todeterminebothpulsewidthandpulsedelay.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
numSampsPerChanWritten int32* Theactualnumberofsamplesperchannelsuccessfullywrittentothebuffer.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteCtrFreqScalarint32DAQmxWriteCtrFreqScalar(TaskHandletaskHandle,bool32autoStart,
float64timeout,float64frequency,float64dutyCycle,bool32*reserved);
PurposeWritesanewpulsefrequencyanddutycycletoacontinuouscounteroutputtaskthatcontainsasinglechannel.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritethesampleto.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
frequency float64 Specifiesatwhatfrequencytogeneratepulses.
dutyCycle float64 Thewidthofthepulsedividedbythepulseperiod.NI-DAQmxusesthisratio,combinedwithfrequency,todeterminebothpulsewidthandpulsedelay.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteCtrTicksint32DAQmxWriteCtrTicks(TaskHandletaskHandle,int32numSampsPerChan,
bool32autoStart,float64timeout,bool32dataLayout,uInt32highTicks[],uInt32lowTicks[],int32*numSampsPerChanWritten,bool32*reserved);
PurposeWritesnewpulsehightickcountsandlowtickcountstoeachchannelinacontinuouscounteroutputtaskthatcontainsoneormorechannels.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritesamplesto.
numSampsPerChan int32 Thenumberofsamples,perchannel,towrite.Youmustpassinavalueof0ormoreinorderforthesampletowrite.Ifyoupassanegativenumber,thisfunctionreturnsanerror.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
dataLayout bool32 Specifieshowthesamplesarearranged,eitherinterleavedornoninterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(noninterleaved)
DAQmx_Val_GroupByScanNumber Groupbysample(interleaved)
highTicks uInt32[] Thenumberoftimebaseticksthepulseishigh.
lowTicks uInt32[] Thenumberoftimebaseticksthepulseislow.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
numSampsPerChanWritten int32* Theactualnumberofsamplesperchannelsuccessfullywrittentothebuffer.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteCtrTicksScalarint32DAQmxWriteCtrTicksScalar(TaskHandletaskHandle,bool32autoStart,
float64timeout,uInt32highTicks,uInt32lowTicks,bool32*reserved);
PurposeWritesanewpulsehightickcountandlowtickcounttoacontinuouscounteroutputtaskthatcontainsasinglechannel.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritethesampleto.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
highTicks uInt32 Thenumberoftimebaseticksthepulseishigh.
lowTicks uInt32 Thenumberoftimebaseticksthepulseislow.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteCtrTimeint32DAQmxWriteCtrTime(TaskHandletaskHandle,int32numSampsPerChan,
bool32autoStart,float64timeout,bool32dataLayout,float64highTime[],float64lowTime[],int32*numSampsPerChanWritten,bool32*reserved);
PurposeWritesanewpulsehightimeandlowtimetoeachchannelinacontinuouscounteroutputtaskthatcontainsoneormorechannels.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritesamplesto.
numSampsPerChan int32 Thenumberofsamples,perchannel,towrite.Youmustpassinavalueof0ormoreinorderforthesampletowrite.Ifyoupassanegativenumber,thisfunctionreturnsanerror.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
dataLayout bool32 Specifieshowthesamplesarearranged,eitherinterleavedornoninterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(noninterleaved)
DAQmx_Val_GroupByScanNumber Groupbysample(interleaved)
highTime float64[] Theamountoftimethepulseishigh.
lowTime float64[] Theamountoftimethepulseislow.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
numSampsPerChanWritten int32* Theactualnumberofsamplesperchannelsuccessfullywrittentothebuffer.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteCtrTimeScalarint32DAQmxWriteCtrTimeScalar(TaskHandletaskHandle,bool32autoStart,
float64timeout,float64highTime,float64lowTime,bool32*reserved);
PurposeWritesanewpulsehightimeandlowtimetoacontinuouscounteroutputtaskthatcontainsasinglechannel.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritethesampleto.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
highTime float64 Theamountoftimethepulseishigh.
lowTime float64 Theamountoftimethepulseislow.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteDigitalLinesint32DAQmxWriteDigitalLines(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,uInt8writeArray[],int32*sampsPerChanWritten,bool32*reserved);
PurposeWritesmultiplesamplestoeachdigitallineinatask.Whenyoucreateyourwritearray,eachsampleperchannelmustcontainthenumberofbytesreturnedbytheDAQmx_Read_DigitalLines_BytesPerChanproperty.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeof2samples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritesamplesto.
numSampsPerChan int32 Thenumberofsamples,perchannel,towrite.Youmustpassinavalueof0ormoreinorderforthesampletowrite.Ifyoupassanegativenumber,thisfunctionreturnsanerror.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
dataLayout bool32 Specifieshowthesamplesarearranged,eitherinterleavedornoninterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(noninterleaved)
DAQmx_Val_GroupByScanNumber Groupbysample(interleaved)
writeArray uInt8[] Thesamplestowritetothetask.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
sampsPerChanWritten int32* Theactualnumberofsamplesperchannelsuccessfullywrittentothebuffer.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteDigitalScalarU32int32DAQmxWriteDigitalScalarU32(TaskHandletaskHandle,bool32autoStart,
float64timeout,uInt32value,bool32*reserved);
PurposeWritesasingle32-bitunsignedintegersampletoataskthatcontainsasingledigitaloutputchannel.Usethisformatfordeviceswithupto32linesperport.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritethesampleto.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowritethevalue.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethevalue.Ifthisfunctionsuccessfullywritesthevalue,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterror.
value uInt32 A32-bitintegersampletowritetothetask.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteDigitalU8int32DAQmxWriteDigitalU8(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,uInt8writeArray[],int32*sampsPerChanWritten,bool32*reserved);
PurposeWritesmultiple8-bitunsignedintegersamplestoataskthatcontainsoneormoredigitaloutputchannels.Usethisformatfordeviceswithupto8linesperport.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeoftwosamples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritesamplesto.
numSampsPerChan int32 Thenumberofsamples,perchannel,towrite.Youmustpassinavalueof0ormoreinorderforthesampletowrite.Ifyoupassanegativenumber,thisfunctionreturnsanerror.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
dataLayout bool32 Specifieshowthesamplesarearranged,eitherinterleavedornoninterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(noninterleaved)
DAQmx_Val_GroupByScanNumber Groupbysample(interleaved)
writeArray uInt8[] Thearrayof8-bitintegersamplestowritetothetask.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
sampsPerChanWritten int32* Theactualnumberofsamplesperchannelsuccessfullywrittentothebuffer.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteDigitalU16int32DAQmxWriteDigitalU16(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,uInt16writeArray[],int32*sampsPerChanWritten,bool32*reserved);
PurposeWritesmultiple16-bitunsignedintegersamplestoataskthatcontainsoneormoredigitaloutputchannels.Usethisformatfordeviceswithupto16linesperport.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeoftwosamples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritesamplesto.
numSampsPerChan int32 Thenumberofsamples,perchannel,towrite.Youmustpassinavalueof0ormoreinorderforthesampletowrite.Ifyoupassanegativenumber,thisfunctionreturnsanerror.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
dataLayout bool32 Specifieshowthesamplesarearranged,eitherinterleavedornoninterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(noninterleaved)
DAQmx_Val_GroupByScanNumber Groupbysample(interleaved)
writeArray uInt16[] Thearrayof16-bitintegersamplestowritetothetask.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
sampsPerChanWritten int32* Theactualnumberofsamplesperchannelsuccessfullywrittentothebuffer.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteDigitalU32int32DAQmxWriteDigitalU32(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,uInt32writeArray[],int32*sampsPerChanWritten,bool32*reserved);
PurposeWritesmultiple32-bitunsignedintegersamplestoataskthatcontainsoneormoredigitaloutputchannels.Usethisformatfordeviceswithupto32linesperport.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeoftwosamples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritesamplesto.
numSampsPerChan int32 Thenumberofsamples,perchannel,towrite.Youmustpassinavalueof0ormoreinorderforthesampletowrite.Ifyoupassanegativenumber,thisfunctionreturnsanerror.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
dataLayout bool32 Specifieshowthesamplesarearranged,eitherinterleavedornoninterleaved.
Value DescriptionDAQmx_Val_GroupByChannel Groupby
channel(noninterleaved)
DAQmx_Val_GroupByScanNumber Groupbysample(interleaved)
writeArray uInt32[] Thearrayof32-bitintegersamplestowritetothetask.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
sampsPerChanWritten int32* Theactualnumberofsamplesperchannelsuccessfullywrittentothebuffer.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteRawint32DAQmxWriteRaw(TaskHandletaskHandle,int32numSamps,bool32
autoStart,float64timeout,void*writeArray,int32*sampsPerChanWritten,bool32*reserved);
PurposeWritesrawsamplestoatask.Thereisnoscaling,parsing,orseparationofthesamples.Refertothespecificationsforyourinstrumenttodeterminetheformatoftheincomingsamples.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeof2samples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktowritesamplesto.
numSamps int32 Thenumberofsamplesperchanneltowrite.Youmustpassinavalueof0ormoreinorderforthesampletowrite.Ifyoupassanegativenumber,youwillreceiveanerror.
autoStart bool32 Specifieswhetherornotthisfunctionautomaticallystartsthetaskifyoudonotstartit.
timeout float64 Theamountoftime,inseconds,towaitforthisfunctiontowriteallthesamples.Thedefaultvalueis10.0seconds.Tospecifyaninfinitewait,pass-1(DAQmx_Val_WaitInfinitely).Thisfunctionreturnsanerrorifthetimeoutelapses.Avalueof0indicatestotryoncetowritethesubmittedsamples.Ifthisfunctionsuccessfullywritesallsubmittedsamples,itdoesnotreturnanerror.Otherwise,thefunctionreturnsatimeouterrorandreturnsthenumberofsamplesactuallywritten.
writeArray void* Therawsamplestowritetothetask.
reserved bool32* Reservedforfutureuse.PassNULLtothisparameter.
Output
Name Type Description
sampsPerChanWritten int32* Theactualnumberofsamplesperchannelsuccessfullywrittentothebuffer.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxExportSignalint32DAQmxExportSignal(TaskHandletaskHandle,int32signalID,constchar
outputTerminal[]);
PurposeRoutesacontrolsignaltothespecifiedterminal.Theoutputterminalcanresideonthedevicethatgeneratesthecontrolsignaloronadifferentdevice.Usethisfunctiontoshareclocksandtriggersbetweenmultipletasksanddevices.Theroutescreatedbythisfunctionaretask-basedroutes.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
signalID int32 Thenameofthetrigger,clock,oreventtoexport.
Value DescriptionDAQmx_Val_AIConvertClock Clockthat
causesananalog-to-digitalconversiononanESeriesorMSeriesdevice.Oneconversioncorrespondstoasinglesamplefromonechannel.
DAQmx_Val_10MHzRefClock Outputofanoscillatorthatyoucanusetosynchronizemultipledevices.
DAQmx_Val_20MHzTimebaseClock OutputofanoscillatorthatistheonboardsourceoftheMasterTimebase.Othertimebases
arederivedfromthisclock.
DAQmx_Val_SampleClock Clockthedeviceusestotimeeachsample.
DAQmx_Val_AdvanceTrigger Triggerthatmovesaswitchtothenextentryinascanlist.
DAQmx_Val_ReferenceTrigger Triggerthatestablishesthereferencepointbetweenpretriggerandposttriggersamples.
DAQmx_Val_StartTrigger Triggerthatbeginsameasurementorgeneration.
DAQmx_Val_AdvCmpltEvent Signalthataswitchproductgeneratesafteritbothexecutesthecommand(s)inascanlistentryandwaitsforthesettlingtime
toelapse.DAQmx_Val_AIHoldCmpltEvent Signalthat
anESeriesorMSeriesdevicegenerateswhenthedevicelatchesanaloginputdata(theADCenters"hold"mode)anditissafeforanyexternalswitchinghardwaretoremovethesignalandreplaceitwiththenextsignal.Thiseventdoesnotindicatethecompletionoftheactualanalog-to-digitalconversion.
DAQmx_Val_CounterOutputEvent Signalthatacountergenerates.Eachtimethecounterreachesterminal
count,thissignaltogglesorpulses.
DAQmx_Val_ChangeDetectionEvent SignalthatastaticDIOdevicegenerateswhenthedevicedetectsarisingorfallingedgeonanyofthelinesorportsyouselectedwhenyouconfiguredchangedetectiontiming.
DAQmx_Val_WDTExpiredEvent SignalthatastaticDIOdevicegenerateswhenthewatchdogtimerexpires.
outputTerminal constchar[] Thedestinationterminaloftheexportedsignal.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCalculateReversePolyCoeffint32DAQmxCalculateReversePolyCoeff(float64forwardCoeffs[],uInt32
numForwardCoeffsIn,float64minValX,float64maxValX,int32numPointsToCompute,int32reversePolyOrder,float64reverseCoeffs[]);
PurposeComputesasetofcoefficientsforapolynomialthatapproximatestheinverseofthepolynomialwiththecoefficientsyouspecifywithforwardCoeffs.Thefunctiongeneratesatableofxversusyvaluesovertherangeofx.Thefunctionthenfindsapolynomialfit,usingtheleastsquaresmethodtocomputeapolynomialthatcomputesanxgivenay.
ParametersInput
Name Type Description
forwardCoeffs float64[] Thearrayoftheforwardcoefficientsforthepolynomialthatcomputesygivenavalueofx.Eachelementofthearraycorrespondstoatermoftheequation.Forexample,ifindex3ofthearrayis9,thefourthtermoftheequationis9x3.
numForwardCoeffsIn uInt32 ThenumberofelementsinforwardCoeff.
minValX float64 Theminimumvalueofxforwhichyouusethepolynomial.Thisisthesmallestvalueofxforwhichthefunctiongeneratesayvalueinthetable.
maxValX float64 Themaximumvalueofxforwhichyouusethepolynomial.Thisisthelargestvalueofxforwhichthefunctiongeneratesayvalueinthetable.
numPointsToCompute int32 Thenumberofpointsinthetableofxversusyvalues.ThefunctionspacesthevaluesevenlybetweenminValXandmaxValX.
reversePolyOrder int32 Theorderofthereversepolynomialtocompute.Forexample,aninputof3indicatesa3rdorderpolynomial.Aninputof-1indicatestocomputeareversepolynomialofthesameorderastheforwardpolynomial.
Output
reverseCoeffs float64[] Thearrayofthereversecoefficientsofthepolynomial.Eachelementofthearraycorrespondstoatermoftheequation.Forexample,ifindex3ofthearrayis9,thefourthtermoftheequationis9y3.reverseCoeffswillbeonegreaterthanwhatyoupassedforreversePolyOrder.Ifyoupass-1forreversePolyOrder,thearraymustbethesizeofforwardCoeffs.Otherwise,thebehaviorisundefined.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateLinScaleint32DAQmxCreateLinScale(constcharname[],float64slope,float64
yIntercept,int32preScaledUnits,constcharscaledUnits[]);
PurposeCreatesandconfiguresascalethatusestheequationy=mx+b,wherexistheprescaledvalueandyisthescaledvalue.Theequationisidenticalforinputandoutput.Ifyourequationisintheformx=my+b,youmustfirstsolveforyintermsofx.
ParametersInput
Name Type Description
name constchar[] Identifiesthecustomscaleforlateruse,suchaswhenyoucreatechannels.
slope float64 Theslope,m,intheequation.
yIntercept float64 They-intercept,b,intheequation.
preScaledUnits int32 Theunitsofthevaluestoscale.
Value DescriptionDAQmx_Val_Volts voltsDAQmx_Val_Amps amperesDAQmx_Val_DegF degreesFahrenheitDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegR degreesRankineDAQmx_Val_Kelvins kelvinsDAQmx_Val_Strain strainDAQmx_Val_Ohms ohmsDAQmx_Val_Hz hertzDAQmx_Val_Seconds secondsDAQmx_Val_Meters metersDAQmx_Val_Inches inchesDAQmx_Val_Degrees degreesDAQmx_Val_Radians radiansDAQmx_Val_g G.1gisapproximately
equalto9.81m/s2.
DAQmx_Val_Pascals pascalsDAQmx_Val_FromTEDS UnitsdefinedbyTEDS
informationassociatedwiththechannel.
scaledUnits constchar[] Theunitsyouwanttouseforthescaledvalue.Youcanuseanarbitraryvalue.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateMapScaleint32DAQmxCreateMapScale(constcharname[],float64prescaledMin,float64
prescaledMax,float64scaledMin,float64scaledMax,int32preScaledUnits,constcharscaledUnits[]);
PurposeCreatesandconfiguresascalethatscalesvaluesproportionallyfromarangeofprescaledvaluestoarangeofscaledvalues.
ParametersInput
Name Type Description
name constchar[] Identifiesthecustomscaleforlateruse,suchaswhenyoucreatechannels.
prescaledMin float64 Thesmallestvalueintherangeofprescaledvalues.NI-DAQmxmapsthisvaluetoscaledMin.
prescaledMax float64 Thelargestvalueintherangeofprescaledvalues.NI-DAQmxmapsthisvaluetoscaledMax.
scaledMin float64 Thesmallestvalueintherangeofscaledvalues.NI-DAQmxmapsthisvaluetoprescaledMin.Readoperationsclipsamplesthataresmallerthanthisvalue.Writeoperationsgenerateerrorsforsamplesthataresmallerthanthisvalue.
scaledMax float64 Thelargestvalueintherangeofscaledvalues.NI-DAQmxmapsthisvaluetoprescaledMax.Readoperationsclipsamplesthatarelargerthanthisvalue.Writeoperationsgenerateerrorsforsamplesthatarelargerthanthisvalue.
preScaledUnits int32 Theunitsofthevaluestoscale.
Value DescriptionDAQmx_Val_Volts voltsDAQmx_Val_Amps amperesDAQmx_Val_DegF degreesFahrenheitDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegR degreesRankineDAQmx_Val_Kelvins kelvinsDAQmx_Val_Strain strainDAQmx_Val_Ohms ohmsDAQmx_Val_Hz hertzDAQmx_Val_Seconds secondsDAQmx_Val_Meters metersDAQmx_Val_Inches inchesDAQmx_Val_Degrees degreesDAQmx_Val_Radians radiansDAQmx_Val_g G.1gisapproximately
equalto9.81m/s2.
DAQmx_Val_Pascals pascals
DAQmx_Val_FromTEDS UnitsdefinedbyTEDSinformationassociatedwiththechannel.
scaledUnits constchar[] Theunitsyouwanttouseforthescaledvalue.Youcanuseanarbitraryvalue.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreatePolynomialScaleint32DAQmxCreatePolynomialScale(constcharname[],float64
forwardCoeffs[],uInt32numForwardCoeffsIn,float64reverseCoeffs[],uInt32numReverseCoeffsIn,int32preScaledUnits,constcharscaledUnits[]);
PurposeCreatesandconfiguresascalethatusesannthorderpolynomialequation.NI-DAQmxrequiresbothapolynomialtoconvertprescaledvaluestoscaledvalues(forward)andapolynomialtoconvertscaledvaluestoprescaledvalues(reverse).Ifyouknowonlyonesetofcoefficients,useDAQmxCalculateReversePolyCoefftogeneratetheotherset.
ParametersInput
Name Type Description
name constchar[] Identifiesthecustomscaleforlateruse,suchaswhenyoucreatechannels.
forwardCoeffs float64[] Anarrayofcoefficientsforthepolynomialthatconvertsprescaledvaluestoscaledvalues.Eachelementofthearraycorrespondstoatermoftheequation.Forexample,ifindex3ofthearrayis9,thefourthtermoftheequationis9x3.
numForwardCoeffsIn uInt32 ThenumberofelementsinforwardCoeff.
reverseCoeffs float64[] Anarrayofcoefficientsforthepolynomialthatconvertsscaledvaluestoprescaledvalues.Eachelementofthearraycorrespondstoatermoftheequation.Forexample,ifindex3ofthearrayis9,thefourthtermoftheequationis9y3.
numReverseCoeffsIn uInt32 ThenumberofelementsinreverseCoeff.
preScaledUnits int32 Theunitsofthevaluestoscale.
Value DescriptionDAQmx_Val_Volts voltsDAQmx_Val_Amps amperesDAQmx_Val_DegF degrees
FahrenheitDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegR degreesRankineDAQmx_Val_Kelvins kelvinsDAQmx_Val_Strain strainDAQmx_Val_Ohms ohmsDAQmx_Val_Hz hertzDAQmx_Val_Seconds secondsDAQmx_Val_Meters metersDAQmx_Val_Inches inchesDAQmx_Val_Degrees degreesDAQmx_Val_Radians radiansDAQmx_Val_g G.1gis
approximately
equalto9.81m/s2.
DAQmx_Val_Pascals pascalsDAQmx_Val_FromTEDS Unitsdefinedby
TEDSinformationassociatedwiththechannel.
scaledUnits constchar[] Theunitsyouwanttouseforthescaledvalue.Youcanuseanarbitraryvalue.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateTableScaleint32DAQmxCreateTableScale(constcharname[],float64prescaledVals[],
uInt32numPrescaledValsIn,float64scaledVals[],uInt32numScaledValsIn,int32preScaledUnits,constcharscaledUnits[]);
PurposeCreatesandconfiguresascalethatmapsanarrayofprescaledvaluestoanarrayofcorrespondingscaledvalues.NI-DAQmxapplieslinearinterpolationtovaluesthatfallbetweenthevaluesinthetable.Readoperationsclipscaledsamplesthatareoutsidethemaximumandminimumscaledvaluesfoundinthetable.Writeoperationsgenerateerrorsforsamplesthatareoutsidetheminimumandmaximumscaledvaluesfoundinthetable.
ParametersInput
Name Type Description
name constchar[] Identifiesthecustomscaleforlateruse,suchaswhenyoucreatechannels.
prescaledVals float64[] Anarrayofprescaledvalues.ThesevaluesmapdirectlytothevaluesinscaledVals.
numPrescaledValsIn uInt32 ThenumberofelementsinprescaledVals.
scaledVals float64[] Anarrayofscaledvalues.ThesevaluesmapdirectlytothevaluesinprescaledVals.
numScaledValsIn uInt32 ThenumberofelementsinscaledVals.
preScaledUnits int32 Theunitsofthevaluestoscale.
Value DescriptionDAQmx_Val_Volts voltsDAQmx_Val_Amps amperesDAQmx_Val_DegF degreesFahrenheitDAQmx_Val_DegC degreesCelsiusDAQmx_Val_DegR degreesRankineDAQmx_Val_Kelvins kelvinsDAQmx_Val_Strain strainDAQmx_Val_Ohms ohmsDAQmx_Val_Hz hertzDAQmx_Val_Seconds secondsDAQmx_Val_Meters metersDAQmx_Val_Inches inchesDAQmx_Val_Degrees degreesDAQmx_Val_Radians radiansDAQmx_Val_g G.1gis
approximatelyequalto9.81m/s2.
DAQmx_Val_Pascals pascals
DAQmx_Val_FromTEDS Unitsdefinedby
TEDSinformationassociatedwiththechannel.
scaledUnits constchar[] Theunitsyouwanttouseforthescaledvalue.Youcanuseanarbitraryvalue.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgInputBufferint32DAQmxCfgInputBuffer(TaskHandletaskHandle,uInt32
numSampsPerChan);
PurposeOverridestheautomaticinputbufferallocationthatNI-DAQmxperforms.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
numSampsPerChan uInt32 Thenumberofsamplesthebuffercanholdforeachchannelinthetask.Zeroindicatesnobuffershouldbeallocated.Useabuffersizeof0toperformahardware-timedoperationwithoutusingabuffer.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCfgOutputBufferint32DAQmxCfgOutputBuffer(TaskHandletaskHandle,uInt32
numSampsPerChan);
PurposeOverridestheautomaticoutputbufferallocationthatNI-DAQmxperforms.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
numSampsPerChan uInt32 Thenumberofsamplesthebuffercanholdforeachchannelinthetask.Zeroindicatesnobuffershouldbeallocated.Useabuffersizeof0toperformahardware-timedoperationwithoutusingabuffer.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWaitForNextSampleClockint32DAQmxWaitForNextSampleClock(TaskHandletaskHandle,float64
timeout,bool32*isLate);
PurposeWaitsuntilthenextpulseoftheSampleClockoccurs.IfanextraSampleClockpulseoccursbetweencallstothisfunction,thesecondcallreturnsanerrororwarningandwaitsforthenextSampleClockpulse.Usetheget/set/resetfunctionsfortheRealTimeConvLateErrorsToWarningspropertytospecifywhetherthisfunctionreturnserrorsorwarnings.UsethisfunctiontoensureI/OcyclescompletewithinSampleClockperiods.NationalInstrumentsrecommendsyouusethisfunctionforcertainapplicationsonly.UsetheDAQmxReal-Timepropertiestoconfigureerrorreportingandwaitingoptions.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
timeout float64 Themaximumamountoftime,inseconds,towaitforthenextSampleClockpulse.Ifthetimeelapses,thisVIreturnsanerror.Thedefaulttimeoutis10seconds.Ifyousettimeoutto-1,thisVIwaitsindefinitely.
Output
Name Type Description
isLate int32 Avalueof0indicatesthereadorwritefunctionexecutedinrealtime.Avalueof1indicatesthefunctiondidnotexecuteinrealtime.
ReturnValueName Type Description
isLate int32 IndicatesifthisfunctiondetectedanextraSampleClockpulseafterthespecifiednumberofwarmupiterationsexecute.IfyouareusingtheCAPI,useDAQmxSetRealTimeNumOfWarmupIterstospecifythenumberofwarmupiterations.IfyouareusingtheCVIAPI,useDAQmxSetRealTimeAttributetospecifythenumberofiterations.ThisoutputisalwaysFALSEuntilthatnumberofloopiterationsexecute.
DAQmxWaitUntilTaskDoneint32DAQmxWaitUntilTaskDone(TaskHandletaskHandle,float64
timeToWait);
PurposeWaitsforthemeasurementorgenerationtocomplete.Usethisfunctiontoensurethatthespecifiedoperationiscompletebeforeyoustopthetask.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
timeToWait float64 Themaximumamountoftime,inseconds,towaitforthemeasurementorgenerationtocomplete.Thefunctionreturnsanerrorifthetimeelapsesbeforethemeasurementorgenerationiscomplete.Avalueof-1(DAQmx_Val_WaitInfinitely)meanstowaitindefinitely.IfyousettimeToWaitto0,thefunctionchecksonceandreturnsanerrorifthemeasurementorgenerationisnotdone.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
ObsoleteThisfunctionisobsoleteandnowalwaysreturnszero.Theinformationbelownolongerappliesbutisprovidedforreference.
DAQmxIsReadOrWriteLatebool32DAQmxIsReadOrWriteLate(int32errorCode);
PurposeReturnsTRUEifaDAQmxReadfunctionorDAQmxWritefunctiondidnotexecuteinrealtime.
ParametersInput
Name Type Description
errorCode int32 AnerrorcodeorwarningreturnedbyoneoftheNI-DAQmxLibraryReadorWritefunctions.
ReturnValueName Type Description
isLate int32 Avalueof0indicatesthereadorwritefunctionexecutedinrealtime.Avalueof1indicatesthefunctiondidnotexecuteinrealtime.
DAQmxSwitchCloseRelaysint32DAQmxSwitchCloseRelays(constcharrelays[],bool32waitForSettling);
PurposeClosesthespecifiedrelays.IfyousetwaitForSettlingtoTRUE,thisfunctionwaitsonlyafterclosingallrelays.Ifyouwanttowaitforsettlingafterclosingeachrelay,usethisfunctionmultipletimestocloseeachrelayseparately.Whenyouoperaterelaysdirectly,youcircumventtheprotectionthatchannelusagetypesoffer.AvoidusingthisfunctionwhenyouusetheDAQmxSwitchConnectfunctionortheDAQmxSwitchDisconnectfunction.Thisfunctiondoesnotpassthechangesyoumaketothosefunctions.
ParametersInput
Name Type Description
relays constchar[] Asetofrelaystoclose.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSwitchConnectint32DAQmxSwitchConnect(constcharswitchChannel1[],constchar
switchChannel2[],bool32waitForSettling);
PurposeMakesaconnectionbetweentwoswitchchannels.Whenusingthisfunction,specifyonlythetwoconnectionendpointsusingswitchChannel1andswitchChannel2.Thefunctionthenattemptstofindanavailablepathbetweenthetwochannels.
ParametersInput
Name Type Description
switchChannel1 constchar[] Thefirstchanneltoconnect.
switchChannel2 constchar[] Thesecondchanneltoconnect.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSwitchConnectMultiint32DAQmxSwitchConnectMulti(constcharconnectionList[],bool32
waitForSettling);
PurposeMakesoneormoreconnectionsspecifiedbyaconnectionlist.Youcanspecifyonlythetwoendpoints,oryoucanspecifytheexplicitpathbetweentwoendpoints.Thisfunctioncanmakeconnectionsonmultipledevices,buteachconnectionmustresideonasingledevice.Intheeventofanerror,connectingstopsatthepointinthelistwheretheerroroccurred.IfyousetwaitForSettlingtoTRUE,thisfunctionreturnsonlyaftermakingallconnections.Ifyouwanttowaitforsettlingbetweenconnections,usethisfunctionmultipletimestomakeconnectionsseparately.
ParametersInput
Name Type Description
connectionList constchar[] Alistofconnections,usingaspecialsyntax,tomakebetweenswitchchannels.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSwitchCreateScanListint32DAQmxSwitchCreateScanList(constcharscanList[],TaskHandle
*taskHandle);
PurposeCreatesanewswitchscanningtaskthatusesthespecifiedscanlistandappliesittothespecifiedtask.
ParametersInput
Name Type Description
scanList constchar[] Usesaspecialsyntaxtospecifythesequenceofconnectionsanddisconnectionsforthetask.
Output
Name Type Description
taskHandle TaskHandle* Thetaskcreatedbythisfunction.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSwitchDisconnectint32DAQmxSwitchDisconnect(constcharswitchChannel1[],constchar
switchChannel2[],bool32waitForSettling);
PurposeDisconnectstwoswitchchannels.Whenusingthisfunction,specifyonlythetwoconnectionendpointsswitchChannel1andswitchChannel2.
ParametersInput
Name Type Description
switchChannel1 constchar[] Thefirstchanneltodisconnect.
switchChannel2 constchar[] Thesecondchanneltodisconnect.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSwitchDisconnectAllint32DAQmxSwitchDisconnectAll(constchardeviceName[],bool32
waitForSettling);
PurposeTerminatesallactiveconnectionsonthedevice,whichplacestherelaysintothetopologyresetstate.YoucanusethisfunctiontoterminateconnectionsmadebyDAQmxSwitchConnect,DAQmxSwitchOpenRelays,orDAQmxSwitchCloseRelays.Thisfunctiondoesnotalterthesettlingtimeorchannelusagesettings.Toresetthosesettings,useDAQmxResetDeviceorDAQmxSwitchSetTopologyAndReset.IfyousetwaitForSettlingtoTRUE,thisfunctionreturnsonlyafterterminatingallconnections.Ifyouwanttowaitforsettlingbetweendisconnections,usetheDAQmxSwitchDisconnectfunctionmultipletimestoterminateconnectionsseparately.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSwitchDisconnectMultiint32DAQmxSwitchDisconnectMulti(constcharconnectionList[],bool32
waitForSettling);
PurposeTerminatesoneormoreconnectionsspecifiedbyaconnectionlist.Thisfunctioncanterminateconnectionsonmultipledevices.Intheeventofanerror,thefunctionstopsatthepointinthelistwheretheerroroccurred.IfyousetwaitForSettlingtoTRUE,thisfunctionreturnsonlyafterterminatingallconnections.Ifyouwanttowaitforsettlingbetweendisconnections,usethisfunctionmultipletimestoterminateconnectionsseparately.
ParametersInput
Name Type Description
connectionList constchar[] Usesaspecialsyntaxtospecifythelistofswitchconnectionstoterminate.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSwitchFindPathint32DAQmxSwitchFindPath(constcharswitchChannel1[],constchar
switchChannel2[],charpath[],uInt32pathBufferSize,int32*pathStatus);
PurposeReturnsinformationaboutthepathbetweenswitchChannel1andswitchChannel2.Ifthechannelsareconnected,thisfunctionreturnsthepathbywhichtheyareconnected.Ifthechannelsarenotconnected,thefunctionreturnsapathbywhichtheycouldbeconnected,ifoneisavailable.
ParametersInput
Name Type Description
switchChannel1 constchar[] Thefirstchanneltoconnect.
switchChannel2 constchar[] Thesecondchanneltoconnect.
pathBufferSize uInt32 Thesizeofpath.Ifyoupass0,thisfunctionreturnsthesizeofthebufferneededtoallocate.
Output
Name Type Description
path char[] TheexistingpathoranavailablepathbetweenswitchChannel1andswitchChannel2thesamesyntaxasaconnectionordisconnectionlist.IfyoupassNULL,thisfunctionreturnsthesizeofthebufferneededtoallocate.
pathStatus int32* Thestatusoftherequestedpath.Thefollowingvaluescanbereturned:
ValueDAQmx_Val_PathStatus_Available
DAQmx_Val_PathStatus_AlreadyExists
DAQmx_Val_PathStatus_Unsupported
DAQmx_Val_PathStatus_ChannelInUse
DAQmx_Val_PathStatus_SourceChannelConflict
DAQmx_Val_PathStatus_ChannelReservedForRouting
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.Forthisfunction,ifyoupassNULLforthebufferor0forthebuffersize,thisfunctionreturnsthenumberofbytesneededtoallocate.
DAQmxSwitchGetMultiRelayCountint32DAQmxSwitchGetMultiRelayCount(constcharrelayList[],uInt32
count[],uInt32countArraySize,uInt32*numRelayCountsRead);
PurposeReturnsthenumberoftimesasetofrelayshavebeenactuated.Usethisfunctiontotrackrelaylifetimeandusage.YoumustsetthewaitForSettlingparameterofSwitchfunctionstoTRUEtoobtainanaccuraterelaycount.
ParametersInput
Name Type Description
relayList constchar[] Thesetofrelaysyouwanttoquery.
countArraySize uInt32 Thesizeofcount.Ifyoupass0,thisfunctionreturnsthenumberofsamplesneededtoallocate.
Output
Name Type Description
count uInt32[] Numberoftimeseachspecifiedrelayhasbeenactuated.TheorderofthisarraydependsontheorderofrelayList.IfyoupassNULL,thisfunctionreturnsthenumberofsamplesneededtoallocate.
numRelayCountsRead uInt32* Thenumberofrelaycountsreadbythefunction.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.Forthisfunction,ifyoupassNULLforthebufferor0forthebuffersize,thisfunctionreturnsthenumberofsamplesneededtoallocate.Forexample,malloc(n*sizeof(uInt32));
DAQmxSwitchGetMultiRelayPosint32DAQmxSwitchGetMultiRelayPos(constcharrelayList[],uInt32
relayPos[],uInt32relayPosArraySize,uInt32*numRelayPosRead);
PurposeReturnsthecurrentpositionofasetofrelays.
ParametersInput
Name Type Description
relayList constchar[] Thesetofrelaysyouwanttoquery.
relayPosArraySize uInt32 ThesizeofrelayPos.Ifyoupass0,thisfunctionreturnsthenumberofsamplesneededtoallocate.
Output
Name Type Description
relayPos uInt32[] Thepositionofeachspecifiedrelay.TheorderofthisarraycorrespondstotheorderofrelayList.IfyoupassNULL,thisfunctionreturnsthenumberofsamplesneededtoallocate.
Value DescriptionDAQmx_Val_Open Relayisopen.DAQmx_Val_Closed Relayisclosed.
numRelayPosRead uInt32* Thenumberofrelaypositionsreadbythefunction.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.Forthisfunction,ifyoupassNULLforthebufferor0forthebuffersize,thisfunctionreturnsthenumberofsamplesneededtoallocate.Forexample,malloc(n*sizeof(uInt32));
DAQmxSwitchGetSingleRelayCountint32DAQmxSwitchGetSingleRelayCount(constcharrelayName[],uInt32
*count);
PurposeReturnsthenumberoftimesasinglerelayhasbeenactuated.Usethisfunctiontotrackrelaylifetimeandusage.YoumustsetthewaitForSettlingparameterofSwitchfunctionstoTRUEtoobtainanaccuraterelaycount.
ParametersInput
Name Type Description
relayName constchar[] Therelayyouwanttoquery.
Output
Name Type Description
count uInt32* Thenumberoftimestherelayhasbeenactuated.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSwitchGetSingleRelayPosint32DAQmxSwitchGetSingleRelayPos(constcharrelayName[],uInt32
*relayPos);
PurposeReturnsthecurrentpositionofasinglerelay.
ParametersInput
Name Type Description
relayName constchar[] Therelayyouwanttoquery.
Output
Name Type Description
relayPos uInt32* Thepositionoftherelay.
Value DescriptionDAQmx_Val_Open Relayisopen.DAQmx_Val_Closed Relayisclosed.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSwitchOpenRelaysint32DAQmxSwitchOpenRelays(constcharrelays[],bool32waitForSettling);
PurposeOpensthespecifiedrelays.IfyousetwaitForSettlingtoTRUE,thisfunctionwaitsonlyafteropeningallrelays.Ifyouwanttowaitforsettlingafteropeningeachrelay,usethisfunctionmultipletimestoopeneachrelayseparately.Whenyouoperaterelaysdirectly,youcircumventtheprotectionofferedchannelusagetypes.AvoidusingthisfunctionwhenyouuseDAQmxSwitchConnectandDAQmxSwitchDisconnect.Thisfunctiondoesnotpassthechangesyoumaketothosefunctions.
ParametersInput
Name Type Description
relays constchar[] Asetofrelaystoopen.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSwitchSetTopologyAndResetint32DAQmxSwitchSetTopologyAndReset(constchardeviceName[],const
charnewTopology[]);
PurposeResetsaswitchdeviceandsetsitstopologytotheonespecifiedwithnewTopology.Usethisfunctiontoinitializeaswitchdevicebeforescanningormakingconnectionstoensuretheinitialstateofthatswitch.ThisfunctiondiffersfromDAQmxResetDevicebecauseitusestheinputtopologynameratherthantheoneyouspecifyinMAX.ThisfunctiondoesnotmodifythechannelusagedefaultsyouconfigureinMAX.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
newTopology constchar[] Theswitchtopologytouseonthedevice.Thefollowingtablelistsexamples.
ValueDAQmx_Val_Switch_Topology_1127_1_Wire_64x1_Mux
DAQmx_Val_Switch_Topology_1127_2_Wire_32x1_Mux
DAQmx_Val_Switch_Topology_1127_2_Wire_4x8_Matrix
DAQmx_Val_Switch_Topology_1127_4_Wire_16x1_Mux
DAQmx_Val_Switch_Topology_1127_IndependentDAQmx_Val_Switch_Topology_1128_1_Wire_64x1_Mux
DAQmx_Val_Switch_Topology_1128_2_Wire_32x1_Mux
DAQmx_Val_Switch_Topology_1128_2_Wire_4x8_Matrix
DAQmx_Val_Switch_Topology_1128_4_Wire_16x1_Mux
DAQmx_Val_Switch_Topology_1128_IndependentDAQmx_Val_Switch_Topology_1129_2_Wire_16x16_Matrix
DAQmx_Val_Switch_Topology_1129_2_Wire_8x32_Matrix
DAQmx_Val_Switch_Topology_1129_2_Wire_4x64_Matrix
DAQmx_Val_Switch_Topology_1129_2_Wire_Dual_8x16_Matrix
DAQmx_Val_Switch_Topology_1129_2_Wire_Dual_4x32_Matrix
DAQmx_Val_Switch_Topology_1129_2_Wire_Quad_4x16_Matrix
DAQmx_Val_Switch_Topology_1130_1_Wire_256x1_Mux
DAQmx_Val_Switch_Topology_1130_1_Wire_Dual_128x1_Mux
DAQmx_Val_Switch_Topology_1130_2_Wire_128x1_Mux
DAQmx_Val_Switch_Topology_1130_4_Wire_64x1_Mux
DAQmx_Val_Switch_Topology_1130_1_Wire_4x64_Matrix
DAQmx_Val_Switch_Topology_1130_1_Wire_8x32_Matrix
DAQmx_Val_Switch_Topology_1130_1_Wire_Octal_32x1_Mux
DAQmx_Val_Switch_Topology_1130_1_Wire_Quad_64x1_Mux
DAQmx_Val_Switch_Topology_1130_1_Wire_Sixteen_16x1_Mux
DAQmx_Val_Switch_Topology_1130_2_Wire_4x32_Matrix
DAQmx_Val_Switch_Topology_1130_2_Wire_Octal_16x1_Mux
DAQmx_Val_Switch_Topology_1130_2_Wire_Quad_32x1_Mux
DAQmx_Val_Switch_Topology_1130_4_Wire_Quad_16x1_Mux
DAQmx_Val_Switch_Topology_1130_Independent
DAQmx_Val_Switch_Topology_1160_16_SPDTDAQmx_Val_Switch_Topology_1161_8_SPDTDAQmx_Val_Switch_Topology_1163R_Octal_4x1_Mux
DAQmx_Val_Switch_Topology_1166_32_SPDTDAQmx_Val_Switch_Topology_1167_IndependentDAQmx_Val_Switch_Topology_1169_100_SPSTDAQmx_Val_Switch_Topology_1175_1_Wire_196x1_Mux
DAQmx_Val_Switch_Topology_1175_2_Wire_98x1_Mux
DAQmx_Val_Switch_Topology_1175_2_Wire_95x1_Mux
DAQmx_Val_Switch_Topology_1190_Quad_4x1_Mux
DAQmx_Val_Switch_Topology_1191_Quad_4x1_Mux
DAQmx_Val_Switch_Topology_1192_8_SPDTDAQmx_Val_Switch_Topology_1193_32x1_MuxDAQmx_Val_Switch_Topology_1193_Dual_16x1_Mux
DAQmx_Val_Switch_Topology_1193_Quad_8x1_Mux
DAQmx_Val_Switch_Topology_1193_16x1_Terminated_Mux
DAQmx_Val_Switch_Topology_1193_Dual_8x1_Terminated_Mux
DAQmx_Val_Switch_Topology_1193_Quad_4x1_Terminated_Mux
DAQmx_Val_Switch_Topology_1193_IndependentDAQmx_Val_Switch_Topology_1194_Quad_4x1_Mux
DAQmx_Val_Switch_Topology_1195_Quad_4x1_Mux
DAQmx_Val_Switch_Topology_2501_1_Wire_48x1_Mux
DAQmx_Val_Switch_Topology_2501_1_Wire_48x1_Amplified_Mux
DAQmx_Val_Switch_Topology_2501_2_Wire_24x1_Mux
DAQmx_Val_Switch_Topology_2501_2_Wire_24x1_Amplified_Mux
DAQmx_Val_Switch_Topology_2501_2_Wire_Dual_12x1_Mux
DAQmx_Val_Switch_Topology_2501_2_Wire_Quad_6x1_Mux
DAQmx_Val_Switch_Topology_2501_2_Wire_4x6_Matrix
DAQmx_Val_Switch_Topology_2501_4_Wire_12x1_Mux
DAQmx_Val_Switch_Topology_2503_1_Wire_48x1_Mux
DAQmx_Val_Switch_Topology_2503_2_Wire_24x1_Mux
DAQmx_Val_Switch_Topology_2503_2_Wire_Dual_12x1_Mux
DAQmx_Val_Switch_Topology_2503_2_Wire_Quad_6x1_Mux
DAQmx_Val_Switch_Topology_2503_2_Wire_4x6_Matrix
DAQmx_Val_Switch_Topology_2503_4_Wire_12x1_Mux
DAQmx_Val_Switch_Topology_2527_1_Wire_64x1_Mux
DAQmx_Val_Switch_Topology_2527_1_Wire_Dual_32x1_Mux
DAQmx_Val_Switch_Topology_2527_2_Wire_32x1_Mux
DAQmx_Val_Switch_Topology_2527_2_Wire_Dual_16x1_Mux
DAQmx_Val_Switch_Topology_2527_4_Wire_16x1_Mux
DAQmx_Val_Switch_Topology_2527_IndependentDAQmx_Val_Switch_Topology_2529_2_Wire_8x16_Matrix
DAQmx_Val_Switch_Topology_2529_2_Wire_4x32_Matrix
DAQmx_Val_Switch_Topology_2529_2_Wire_Dual_4x16_Matrix
DAQmx_Val_Switch_Topology_2530_1_Wire_128x1_Mux
DAQmx_Val_Switch_Topology_2530_1_Wire_Dual_64x1_Mux
DAQmx_Val_Switch_Topology_2530_2_Wire_64x1_Mux
DAQmx_Val_Switch_Topology_2530_4_Wire_32x1_Mux
DAQmx_Val_Switch_Topology_2530_1_Wire_4x32_Matrix
DAQmx_Val_Switch_Topology_2530_1_Wire_8x16_Matrix
DAQmx_Val_Switch_Topology_2530_1_Wire_Octal_16x1_Mux
DAQmx_Val_Switch_Topology_2530_1_Wire_Quad_32x1_Mux
DAQmx_Val_Switch_Topology_2530_2_Wire_4x16_Matrix
DAQmx_Val_Switch_Topology_2530_2_Wire_Dual_32x1_Mux
DAQmx_Val_Switch_Topology_2530_2_Wire_Quad_16x1_Mux
DAQmx_Val_Switch_Topology_2530_4_Wire_Dual_16x1_Mux
DAQmx_Val_Switch_Topology_2530_IndependentDAQmx_Val_Switch_Topology_2532_1_Wire_16x32_Matrix
DAQmx_Val_Switch_Topology_2532_1_Wire_4x128_Matrix
DAQmx_Val_Switch_Topology_2532_1_Wire_8x64_Matrix
DAQmx_Val_Switch_Topology_2532_1_Wire_Dual_16x16_Matrix
DAQmx_Val_Switch_Topology_2532_1_Wire_Dual_4x64_Matrix
DAQmx_Val_Switch_Topology_2532_1_Wire_Dual_8x32_Matrix
DAQmx_Val_Switch_Topology_2532_1_Wire_Sixteen_2x16_Matrix
DAQmx_Val_Switch_Topology_2532_2_Wire_16x16_Matrix
DAQmx_Val_Switch_Topology_2532_2_Wire_4x64_Matrix
DAQmx_Val_Switch_Topology_2532_2_Wire_8x32_Matrix
DAQmx_Val_Switch_Topology_2564_16_SPSTDAQmx_Val_Switch_Topology_2565_16_SPSTDAQmx_Val_Switch_Topology_2566_16_SPDT
DAQmx_Val_Switch_Topology_2567_IndependentDAQmx_Val_Switch_Topology_2568_31_SPSTDAQmx_Val_Switch_Topology_2569_100_SPSTDAQmx_Val_Switch_Topology_2570_40_SPDTDAQmx_Val_Switch_Topology_2575_1_Wire_196x1_Mux
DAQmx_Val_Switch_Topology_2575_2_Wire_98x1_Mux
DAQmx_Val_Switch_Topology_2575_2_Wire_95x1_Mux
DAQmx_Val_Switch_Topology_2576_2_Wire_64x1_Mux
DAQmx_Val_Switch_Topology_2576_2_Wire_Dual_32x1_Mux
DAQmx_Val_Switch_Topology_2576_2_Wire_Octal_8x1_Mux
DAQmx_Val_Switch_Topology_2576_2_Wire_Quad_16x1_Mux
DAQmx_Val_Switch_Topology_2576_2_Wire_Sixteen_4x1_Mux
DAQmx_Val_Switch_Topology_2576_IndependentDAQmx_Val_Switch_Topology_2585_1_Wire_10x1_Mux
DAQmx_Val_Switch_Topology_2586_10_SPSTDAQmx_Val_Switch_Topology_2590_4x1_MuxDAQmx_Val_Switch_Topology_2591_4x1_MuxDAQmx_Val_Switch_Topology_2593_16x1_MuxDAQmx_Val_Switch_Topology_2593_Dual_8x1_Mux
DAQmx_Val_Switch_Topology_2593_8x1_Terminated_Mux
DAQmx_Val_Switch_Topology_2593_Dual_4x1_Terminated_Mux
DAQmx_Val_Switch_Topology_2593_IndependentDAQmx_Val_Switch_Topology_2594_4x1_MuxDAQmx_Val_Switch_Topology_2595_4x1_MuxDAQmx_Val_Switch_Topology_2596_Dual_6x1_Mux
DAQmx_Val_Switch_Topology_2597_6x1_Terminated_Mux
DAQmx_Val_Switch_Topology_2598_Dual_Transfer
DAQmx_Val_Switch_Topology_2599_2_SPDT
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSwitchWaitForSettlingint32DAQmxSwitchWaitForSettling(constchardeviceName[]);
PurposeWaitsforthesettlingtimeonthedevicetoexpire.Thedeviceresetsthistimeandbeginscountingdownagainwhenthedeviceperformsanoperation.Thisfunctioncanreturnimmediatelyifnooperationhappenedrecently.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxConnectTermsint32DAQmxConnectTerms(constcharsourceTerminal[],constchar
destinationTerminal[],int32signalModifiers);
PurposeCreatesaroutebetweenasourceanddestinationterminal.Theroutecancarryavarietyofdigitalsignals,suchastriggers,clocks,andhardwareevents.Thesesourceanddestinationterminalscanbeondifferentdevicesaslongasaconnectingpublicbus,suchasRTSIorthePXIbackplane,isavailable.DAQmxConnectTermsdoesnotmodifyatask.WhenDAQmxConnectTermsruns,therouteisimmediatelyreservedandcommittedtohardware.Thistypeofroutingiscalledimmediaterouting.
ParametersInput
Name Type Description
sourceTerminal constchar[] Theoriginatingterminaloftheroute.Youcanspecifyaterminalname.
destinationTerminal constchar[] Thereceivingterminaloftheroute.Youcanspecifyaterminalname.
signalModifiers int32 SpecifieswhetherornottoinvertthesignalroutedfromthesourceTerminaltothedestinationTerminal.Ifthedeviceisnotcapableofsignalinversionorifapreviousroutereservedtheinversioncircuitryinanincompatibleconfiguration,attemptingtoinvertthesignalcausesanerror.
Value DescriptionDAQmx_Val_DoNotInvertPolarity Donot
invertthesignal.
DAQmx_Val_InvertPolarity Invertthesignal.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxDisconnectTermsint32DAQmxDisconnectTerms(constcharsourceTerminal[],constchar
destinationTerminal[]);
PurposeRemovessignalroutespreviouslycreatedusingDAQmxConnectTerms.DAQmxDisconnectTermscannotremovetask-basedroutes,suchasthosecreatedthroughtimingandtriggeringconfiguration.Whenthisfunctionexecutes,therouteisunreservedimmediately.Forthisreason,thistypeofroutingiscalledimmediaterouting.
ParametersInput
Name Type Description
sourceTerminal constchar[] Theoriginatingterminaloftheroute.Youcanspecifyaterminalname.
destinationTerminal constchar[] Thereceivingterminaloftheroute.Youcanspecifyaterminalname.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxTristateOutputTermint32DAQmxTristateOutputTerm(constcharoutputTerminal[]);
PurposeSetsaterminaltohigh-impedancestate.IfyouconnectanexternalsignaltoaterminalontheI/Oconnector,theterminalmustbeinhigh-impedancestate.Otherwise,thedevicecoulddouble-drivetheterminalanddamagethehardware.Ifyouusethisfunctiononaterminalinanactiveroute,thefunctionfailsandreturnsanerror.DAQmxResetDevicesetsallterminalsontheI/Oconnectortohigh-impedancestatebutabortsanyrunningtasksassociatedwiththedevice.
ParametersInput
Name Type Description
outputTerminal constchar[] TheterminalontheI/Oconnectortosettohigh-impedancestate.Youcanspecifyaterminalname.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxResetDeviceint32DAQmxResetDevice(constchardeviceName[]);
PurposeImmediatelyabortsalltasksassociatedwithadeviceandreturnsthedevicetoaninitializedstate.Abortingataskstopsandreleasesanyresourcesthetaskreserved.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxControlWatchdogTaskint32DAQmxControlWatchdogTask(TaskHandletaskHandle,int32action);
PurposeControlsthewatchdogtaskaccordingtotheactionyouspecify.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
action int32 Specifieshowtocontrolthewatchdogtask.
Value DescriptionDAQmx_Val_ResetTimer Resetstheinternal
timerto0.Youmustcontinuallyresettheinternaltimertopreventitfromtimingoutandlockingoutthedevice.
DAQmx_Val_ClearExpiration Unlocksadevicewhosewatchdogexpired.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCreateWatchdogTimerTaskint32DAQmxCreateWatchdogTimerTask(constchardeviceName[],constchar
taskName[],TaskHandle*taskHandle,float64timeout,constcharchannelName[],int32expState,...);
PurposeCreatesandconfiguresataskthatcontrolsthewatchdogtimerofadevice.Thetimeractivateswhenyoustartthetask.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
taskName constchar[] Thenametoassigntothetask.Ifyouusethisfunctioninaloopandspecifyanameforthetask,youmustuseDAQmxClearTaskwithintheloopafteryouarefinishedwiththetask.Otherwise,NI-DAQmxattemptstocreatemultipletaskswiththesamename,whichresultsinanerror.
timeout float64 Thetime,inseconds,untilthewatchdogtimerexpires.AvalueofDAQmx_Val_WaitInfinitelyindicatesthattheinternaltimerneverexpires.UseDAQmx_Val_WaitInfinitelywhenyouuseatriggertosignalanexpirationofthetimer.Ifthistimeelapses,thedevicesetsthephysicalchannelstothestatesyouspecifyinexpState.UseDAQmxControlWatchdogTaskwithactionsettoDAQmx_Val_ResetTimertopreventthewatchdogtimerfromexpiring.
channelName constchar[] Thedigitallineorporttomodify.Youcannotmodifydedicateddigitalinputlines.Youcanspecifyalistorrangeofphysicalchannels
expState int32 Thestatetowhichtosetthedigitalphysicalchannelwhenthewatchdogtimerexpires.
Value DescriptionDAQmx_Val_High HighlogicDAQmx_Val_Low LowlogicDAQmx_Val_Tristate High-
impedancestate.Youcanselectthisstateonlyondeviceswithbidirectionalports,andyoucanselectitonlyforentireports.Youcannotselectthisstatefordedicateddigitaloutputlines.
DAQmx_Val_NoChange Expirationdoesnotaffecttheport.Donotchangethestateofanylinesintheport,anddonotlocktheport.Forexample,ifalineishighwhenthetimerexpires,thatlinestayshigh,andyoucanwritenewvaluestotheline.Youcanselectthisvalueonlyforentireports.
moreChannelsAndStates anytype(passedbyvalue)
Pairsofadditionalchannelsandthestatestosetthechannelstowhenthedevicepowersuporwhenthedeviceisreset.YoumustpassNULLattheendoftheargumentlist.Ifyoudonotwanttopassadditionalchannelsandstates,thefunctioncallcanbesimilartothefollowingexample:DAQmxCreateWatchdogTimerTask("Dev1","myTask",*taskHandle,DAQmx_Val_WaitInfinitely,"Dev1/do0",DAQmx_Val_High,NULL);Ifyoupassadditionalchannelsandstates,thefunctioncallcanbesimilartothefollowingexample:DAQmxCreateWatchdogTimerTask("Dev1","myTask",*taskHandle,DAQmx_Val_WaitInfinitely,"Dev1/do0",DAQmx_Val_High,"Dev1/do1",DAQmx_Val_Tristate,NULL);
Output
taskHandle TaskHandle* Areferencetothenewtask.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAOSeriesCalAdjustDAQmxAOSeriesCalAdjust(uInt32calHandle,float64referenceVoltage);
PurposeAdjuststheexternalcalibrationconstantsonanAOSeriesdevice.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithreferenceVoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.Thisvoltageshouldbebetween+6.000Vand+9.999V.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxESeriesCalAdjustint32DAQmxESeriesCalAdjust(uInt32calHandle,float64referenceVoltage);
PurposeAdjuststheexternalcalibrationconstantsonanE-Seriesdevice.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithreferenceVoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.Thisvoltageshouldbebetween+6.000Vand+9.999V.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxGetAIChanCalCalDateint32DAQmxGetAIChanCalCalDate(TaskHandletaskHandle,constchar
channelName[],uInt32*year,uInt32*month,uInt32*day,uInt32*hour,uInt32*minute);
PurposeIndicatesthelastdateandtimethatthechannelunderwentachannelcalibration.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
channelName constchar[]
Nameofthelocalorglobalchanneltoquerycalibrationfor.
Output
Name Type Description
year uInt32* Thelastyearthatthechannelunderwentachannelcalibration.
month uInt32* Thelastmonththatthechannelunderwentachannelcalibration.
day uInt32* Thelastdaythatthechannelunderwentachannelcalibration.
hour uInt32* Thelasthour,ona24-hourclock,thatthechannelunderwentachannelcalibration.
minute uInt32* Thelastminutethatthechannelunderwentachannelcalibration.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxGetAIChanCalExpDateint32DAQmxGetAIChanCalExpDate(TaskHandletaskHandle,constchar
channelName[],uInt32*year,uInt32*month,uInt32*day,uInt32*hour,uInt32*minute);
PurposeIndicatesthelastdateandtimethatthechannelunderwentanexternalchannelcalibration.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
channelName constchar[]
Nameofthelocalorglobalchanneltoquerycalibrationfor.
Output
Name Type Description
year uInt32* Thelastyearthatthechannelunderwentanexternalchannelcalibration.
month uInt32* Thelastmonththatthechannelunderwentanexternalchannelcalibration.
day uInt32* Thelastdaythatthechannelunderwentanexternalchannelcalibration.
hour uInt32* Thelasthour,ona24-hourclock,thatthechannelunderwentanexternalchannelcalibration.
minute uInt32* Thelastminutethatthechannelunderwentanexternalchannelcalibration.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxGetExtCalLastDateAndTimeint32DAQmxGetExtCalLastDateAndTime(constchardeviceName[],uInt32
*year,uInt32*month,uInt32*day,uInt32*hour,uInt32*minute);
PurposeIndicatesthelastdateandtimethatthedeviceunderwentanexternalcalibration.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
Output
Name Type Description
year uInt32* Thelastyearthatthedeviceunderwentanexternalcalibration.
month uInt32* Thelastmonththatthedeviceunderwentanexternalcalibration.
day uInt32* Thelastdaythatthedeviceunderwentanexternalcalibration.
hour uInt32* Thelasthour,ona24-hourclock,thatthedeviceunderwentanexternalcalibration.
minute uInt32* Thelastminutethatthedeviceunderwentanexternalcalibration.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxGetSelfCalLastDateAndTimeint32DAQmxGetSelfCalLastDateAndTime(constchardeviceName[],uInt32
*year,uInt32*month,uInt32*day,uInt32*hour,uInt32*minute);
PurposeIndicatesthelastdateandtimethatthedeviceunderwentaselfcalibration.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
Output
Name Type Description
year uInt32* Thelastyearthatthedeviceunderwentaself-calibration.
month uInt32* Thelastmonththatthedeviceunderwentaself-calibration.
day uInt32* Thelastdaythatthedeviceunderwentaself-calibration.
hour uInt32* Thelasthour,ona24-hourclock,thatthedeviceunderwentaself-calibration.
minute uInt32* Thelastminutethatthedeviceunderwentaself-calibration.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxMSeriesCalAdjustint32DAQmxMSeriesCalAdjust(uInt32calHandle,float64referenceVoltage);
PurposeAdjuststheexternalcalibrationconstantsforanMSeriesdevice.YoumustconnectaknownvoltagetothedeviceandspecifythatvoltagewithreferenceVoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.Thisvoltageshouldbebetween+6.000Vand+9.999V.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxPerformBridgeOffsetNullingCalint32DAQmxPerformBridgeOffsetNullingCal(TaskHandletaskHandle,const
charchannel[])
PurposePerformsabridgeoffsetnullingcalibrationonthechannelsinthetask.Ifthetaskmeasuresbothbridge-basedsensorsandnon-bridge-basedsensors,specifythenamesofthechannelsthatmeasurebridge-basedsensorsinthechannelparameter.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
channel constchar[] Asubsetofvirtualchannelsinthetaskthatyouwanttocalibrate.Usethisparameterifyoudonotwanttocalibrateallthechannelsinthetaskorifsomechannelsinthetaskmeasurenon-bridge-basedsensors.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxPerformBridgeOffsetNullingCalExint32DAQmxPerformBridgeOffsetNullingCalEx(TaskHandletaskHandle,const
charchannel[],bool32skipUnsupportedChannels)
PurposePerformsabridgeoffsetnullingcalibrationonthechannelsinthetask.Ifthetaskmeasuresbothbridge-basedsensorsandnon-bridge-basedsensors,specifythenamesofthechannelsthatmeasurebridge-basedsensorsinthechannelparameter.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
channel constchar[] Asubsetofvirtualchannelsinthetaskthatyouwanttocalibrate.Usethisparameterifyoudonotwanttocalibrateallthechannelsinthetaskorifsomechannelsinthetaskmeasurenon-bridge-basedsensors.
skipUnsupportedChannels bool32 Specifieswhetherornottoskipchannelsthatdonotsupportcalibration.IfskipUnsupportedChannelsisTRUE,calibrationwillbeperformedonlyonsupportedchannels.IfFALSE,calibrationwillbeperformedonchannelsspecifiedbychannel.ThedefaultisFALSE.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxPerformBridgeShuntCalint32DAQmxPerformBridgeShuntCal(TaskHandletaskHandle,constchar
channel[],float64shuntResistorValue,int32shuntResistorLocation,float64bridgeResistance,bool32skipUnsupportedChannels);
PurposePerformsshuntcalibrationforthespecifiedchannelsusingabridgesensor.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
channel constchar[]
Asubsetofvirtualchannelsinthetaskthatyouwanttocalibrate.Usethisparameterifyoudonotwanttocalibrateallthechannelsinthetaskorifsomechannelsinthetaskmeasurenon-bridge-basedsensors.Iftheinputisempty,thefunctionwillattempttoperformshuntcalibrationonallthechannelsinthetask.
shuntResistorValue float64 Theresistance,inohms,oftheshuntresistor.
shuntResistorLocation int32 Thelocationoftheshuntresistor.RefertotheNI-DAQmxHelpformoreinformationonbridgeconfigurations.
Value DescriptionDAQmx_Val_R1(12465) R1DAQmx_Val_R2(12466) R2DAQmx_Val_R3(12467) R3DAQmx_Val_R4(14813) R4
bridgeResistance float64 Theresistance,inohms,ofthebridgesensor.
skipUnsupportedChannels bool32 Specifieswhetherornottoskipchannelsthatdonotsupportshuntcalibration.IfskipUnsupportedChannelsisTRUE,shuntcalibrationwillbeperformedonlyonsupportedchannels.IfFALSE,shuntcalibrationwillbeperformedonchannelsspecifiedbychannelNames.ThedefaultisFALSE.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxPerformStrainShuntCalint32DAQmxPerformStrainShuntCal(TaskHandletaskHandle,constchar
channel[],float64shuntResistorValue,int32shuntResistorLocation,bool32skipUnsupportedChannels);
PurposePerformsshuntcalibrationforthespecifiedchannelsusingastraingagesensor.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
channel constchar[]
Asubsetofvirtualchannelsinthetaskthatyouwanttocalibrate.Usethisparameterifyoudonotwanttocalibrateallthechannelsinthetaskorifsomechannelsinthetaskmeasurenon-bridge-basedsensors.Iftheinputisempty,thefunctionwillattempttoperformshuntcalibrationonallthechannelsinthetask.
shuntResistorValue float64 Theresistance,inohms,oftheshuntresistor.
shuntResistorLocation int32 Thelocationoftheshuntresistor.RefertotheNI-DAQmxHelpformoreinformationonbridgeconfigurations.
Value DescriptionDAQmx_Val_R1(12465) R1DAQmx_Val_R2(12466) R2DAQmx_Val_R3(12467) R3DAQmx_Val_R4(14813) R4
skipUnsupportedChannels bool32 Specifieswhetherornottoskipchannelsthatdonotsupportshuntcalibration.IfskipUnsupportedChannelsisTRUE,shuntcalibrationwillbeperformedonlyonsupportedchannels.IfFALSE,shuntcalibrationwillbeperformedonchannelsspecifiedbychannelNames.ThedefaultisFALSE.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxRestoreLastExtCalConstint32DAQmxRestoreLastExtCalConst(constchardeviceName[]);
PurposeSetstheselfcalibrationconstantsofthedevicetothethecurrentexternalcalibrationconstants.NationalInstrumentssetstheexternalcalibrationconstantsatthefactory,andthoseconstantsremainineffectuntilyouperformanewexternalcalibrationonthedevice.Thisfunctionnullifiesanyselfcalibrationyouperformonthedevice.Ifyouhaveneverperformedaselfcalibrationonthedevice,thisfunctionhasnoeffect.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSCBaseboardCalAdjustint32DAQmxSCBaseboardCalAdjust(uInt32calHandle,float64
referenceVoltage);
PurposeAdjuststheexternalcalibrationconstantsonforthebaseboardofanSCSeriesdevice.YoumustconnectaknownvoltagetothedeviceandspecifythatvoltagewithreferenceVoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.Thisvoltageshouldbebetween+6.000Vand+9.999V.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSelfCalint32DAQmxSelfCal(constchardeviceName[]);
PurposeMeasurestheonboardreferencevoltageofthedeviceandadjuststheself-calibrationconstantstoaccountforanyerrorscausedbyshort-termfluctuationsintheoperatingenvironment.Whenyouselfcalibrateadevice,noexternalsignalconnectionsarenecessary.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetAIChanCalCalDateint32DAQmxSetAIChanCalCalDate(TaskHandletaskHandle,constchar
channelName[],uInt32*year,uInt32*month,uInt32*day,uInt32*hour,uInt32*minute);
PurposeSetsthedateandtimethatthechannelunderwentachannelcalibration.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
channelName constchar[]
Nameofthelocalorglobalchanneltocalibrate.
year uInt32 Thelastyearthatthechannelunderwentachannelcalibration.
month uInt32 Thelastmonththatthechannelunderwentachannelcalibration.
day uInt32 Thelastdaythatthechannelunderwentachannelcalibration.
hour uInt32 Thelasthour,ona24-hourclock,thatthechannelunderwentachannelcalibration.
minute uInt32 Thelastminutethatthechannelunderwentachannelcalibration.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetAIChanCalExpDateint32DAQmxSetAIChanCalExpDate(TaskHandletaskHandle,constchar
channelName[],uInt32*year,uInt32*month,uInt32*day,uInt32*hour,uInt32*minute);
PurposeSetsthedateandtimethatthechannelunderwentanexternalchannelcalibration.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
channelName constchar[]
Nameofthelocalorglobalchanneltocalibrate.
year uInt32 Thelastyearthatthechannelunderwentanexternalchannelcalibration.
month uInt32 Thelastmonththatthechannelunderwentanexternalchannelcalibration.
day uInt32 Thelastdaythatthechannelunderwentanexternalchannelcalibration.
hour uInt32 Thelasthour,ona24-hourclock,thatthechannelunderwentanexternalchannelcalibration.
minute uInt32 Thelastminutethatthechannelunderwentanexternalchannelcalibration.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSSeriesCalAdjustint32DAQmxSSeriesCalAdjust(uInt32calHandle,float64referenceVoltage);
PurposeAdjuststheexternalcalibrationconstantsforanSSeriesdevice.YoumustconnectaknownvoltagetothedeviceandspecifythatvoltagewithreferenceVoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.Thisvoltageshouldbebetween+6.000Vand+9.999V.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxChangeExtCalPasswordint32DAQmxChangeExtCalPassword(constchardeviceName[],constchar
password[],constcharnewPassword[]);
PurposeChangestheexternalcalibrationpasswordofthedevice.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
password constchar[] Thecurrentcalibrationpasswordforthedevice.Thispasswordiscasesensitive.ThedefaultpasswordforallNIproductsisNI.
newPassword constchar[] Thenewpasswordforthedevice.Thispasswordcanbenolongerthanfourcharacters.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxCloseExtCalint32DAQmxCloseExtCal(uInt32calHandle,int32action);
PurposeClosesanopenexternalcalibrationsession.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
action int32 Specifieshowtoclosethecalibrationsession.
Value DescriptionDAQmx_Val_Action_Commit Savesthecalibration
changesmadeinthesession
DAQmx_Val_Action_Cancel Closesthesessionwithoutsavinganycalibrationchanges
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxInitExtCalint32DAQmxInitExtCal(constchardeviceName[],constcharpassword[],
uInt32*calHandle);
PurposeStartsanexternalcalibrationsessiononadevice.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
password constchar[] Thecurrentcalibrationpasswordforthedevice.Thispasswordiscasesensitive.ThedefaultpasswordforallNIproductsisNI.
Output
Name Type Description
calHandle uInt32* Areferencetothecalibrationsession.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjustDSAAICalint32DAQmxAdjustDSAAICal(uInt32calHandle,float64referenceVoltage);
PurposeAdjuststheexternalcalibrationconstantsfortheanaloginputsectionofaDSAdevice.YoumustconnectaknownvoltagetothedeviceandspecifythatvoltagewiththereferenceVoltageparameter.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.Thisvoltageshouldbebetween+4.9Vand+9.1V.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjustDSAAOCalint32DAQmxAdjustDSAAOCal(uInt32calHandle,uInt32channel,float64
requestedLowVoltage,float64actualLowVoltage,float64requestedHighVoltage,float64actualHighVoltage,float64gainSetting);
PurposeAdjuststheexternalcalibrationconstantsfortheanalogoutputsectionofaDSAdevice.Youmustusethedevicetogenerateahighvoltageandlowvoltageataspecifiedgain,measurethehighandlowvoltages,thenspecifytherequestedhighvoltage,lowvoltage,andgainalongwiththeactualhighvoltageandlowvoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channel uInt32 Thenumberofthechanneltocalibrate.Thisnumberisthenumericportionofthephysicalchannelname,notthefullphysicalchannelname.
requestedLowVoltage float64 Thelowvoltageyouattemptedtogenerateatthegainsettingyouspecified.
actualLowVoltage float64 Theactuallowvoltageasmeasuredbyanexternalsensor.
requestedHighVoltage float64 Thehighvoltageyouattemptedtogenerateatthegainsettingyouspecified.
actualHighVoltage float64 Theactualhighvoltageasmeasuredbyanexternalsensor.
gainSetting float64 Thegainsettingyouusedwhenyouattemptedtogeneratetherequestedhighvoltageandrequestedlowvoltage.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjustDSATimebaseCalint32DAQmxAdjustDSATimebaseCal(uInt32calHandle,float64
referenceFrequency);
PurposeAdjuststheexternalcalibrationconstantforthetimebaseofaDSAdevicewithanadjustableoscillator.YoumustconnectasinusoidalsignalwithaknownfrequencytothedeviceandspecifythatfrequencywithreferenceFrequency.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceFrequency float64 Thefrequency,inhertz,ofthesignaltouseasareferenceforcalibration.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust4204Calint32DAQmxAdjust4204Cal(uInt32calHandle,constcharchannelNames[],
float64lowPassFreq,bool32trackHoldEnabled,float64inputVal);
PurposeAdjuststheinternalandexternalcalibrationconstantsfortheSCMPpodonthePXI-4204device.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithinputVal.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelNames constchar[]
Thephysicalchannel(s)tocalibrate.
lowPassFreq float64 Thelowpasscutofffrequency,inhertz,(6or10000)ontheSCMPpodtocalibrate.
trackHoldEnabled bool32 SpecifieswhethercalibratingfortrackHoldisenabledordisabled.
inputVal float64 Theknownvoltage,involts,touseasareferenceforcalibration.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust4220Calint32DAQmxAdjust4220Cal(uInt32calHandle,constcharchannelNames[],
float64gain,float64inputVal);
PurposeAdjuststheinternalandexternalcalibrationconstantsfortheSCMPpodonthePXI-4220device.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithinputVal.Thisdeviceneedsreferencesignalsof0.0voltsatgainsof1,15,20,and310onaparticularchannelinordertoperformanoffsetcalibrationforthatchannel.Ifthosepointsarenotmanuallysupplied,theywillbeautomaticallymeasuredinternallywithsampleandholdenabled.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelNames constchar[]
Thephysicalchannel(s)tocalibrate.
gain float64 ThegainvalueontheSCMPpodtocalibrate.
inputVal float64 Theknownvoltage,involts,touseasareferenceforcalibration.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust4224Calint32DAQmxAdjust4224Cal(uInt32calHandle,constcharchannelNames[],
float64gain,float64inputVal);
PurposeAdjuststheinternalandexternalcalibrationconstantsfortheSCMPpodonthePXI-4224device.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithinputVal.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelNames constchar[]
Thephysicalchannel(s)tocalibrate.
gain float64 ThegainvalueontheSCMPpodtocalibrate.
inputVal float64 Theknownvoltage,involts,touseasareferenceforcalibration.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1102Calint32DAQmxAdjust1102Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-1102module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1104Calint32DAQmxAdjust1104Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
PurposeAdjuststhecalibrationconstantsfortheSCXI-1104module.YoumustmeasurethevoltagegeneratedbyapreviouscalltotheDAQmxSetup1104Calfunctionandspecifythemeasurementwithmeasuredoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1112Calint32DAQmxAdjust1112Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
PurposeAdjuststhecalibrationconstantsfortheSCXI-1112module.YoumustmeasurethevoltagegeneratedbyapreviouscalltotheDAQmxSetup1112CalfunctionandspecifythemeasurementwithmeasOutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1122Calint32DAQmxAdjust1122Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
PurposeAdjuststhecalibrationconstantsfortheSCXI-1122module.YoumustmeasurethevoltageorcurrentgeneratedbyapreviouscalltotheDAQmxSetup1122CalfunctionandspecifythemeasurementwithmeasOutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 ThevoltageorcurrentmeasuredattheoutputchannelspecifiedinapreviouscalltotheDAQmxSetup1122Calfunction.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1124Calint32DAQmxAdjust1124Cal(uInt32calHandle,float64measOutput);
PurposeAdjuststhecalibrationconstantsfortheSCXI-1124module.YoumustmeasurethevoltageorcurrentgeneratedbyapreviouscalltotheDAQmxSetup1124CalfunctionandspecifythemeasurementwithmeasOutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
measOutput float64 ThevoltageorcurrentmeasuredattheoutputchannelspecifiedinapreviouscalltotheDAQmxSetup1124Calfunction.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1125Calint32DAQmxAdjust1125Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-1125module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1126Calint32DAQmxAdjust1126Cal(uInt32calHandle,float64refFreq,float64
measOutput);
PurposeAdjuststhecalibrationconstantsfortheSCXI-1126module.YoumustmeasurethevoltagegeneratedbyapreviouscalltotheDAQmxSetup1126CalfunctionandspecifythemeasurementwithmeasOutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refFreq float64 Theknownfrequency,inhertz,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1141Calint32DAQmxAdjust1141Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-1141module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1142Calint32DAQmxAdjust1142Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-1142module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1143Calint32DAQmxAdjust1143Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-1143module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1502Calint32DAQmxAdjust1502Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
PurposeAdjuststhecalibrationconstantsfortheSCXI-1502module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1503Calint32DAQmxAdjust1503Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
PurposeAdjuststhecalibrationconstantsfortheSCXI-1503module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1503CurrentCalint32DAQmxAdjust1503CurrentCal(uInt32calHandle,constchar
channelName[],float64measOutput);
PurposeAdjuststhecurrentcalibrationconstantsfortheSCXI-1503module.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
measOutput float64 Thecurrentmeasuredattheoutputofthemodule.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1520Calint32DAQmxAdjust1520Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-1520module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.Thisdeviceneedsreferencesignalsof0.0voltsatgainsof1,15,20,and310onaparticularchannelinordertoperformanoffsetcalibrationforthatchannel.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1521Calint32DAQmxAdjust1521Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
PurposeAdjuststhecalibrationconstantsfortheSCXI-1521module.YoumustmeasurethevoltagegeneratedbyapreviouscalltotheDAQmxSetup1521CalfunctionandspecifythemeasurementwithmeasOutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust153xCalint32DAQmxAdjust153xCal(uInt32calHandle,float64refVoltage,float64
measOutput);
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-153xmodule.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.BothrefVoltageandmeasOutputmustbeofthesamemeasurementtype,eitherRMSvoltageorpeak-to-peakvoltage.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.BothrefVoltageandmeasOutputmustbeofthesamemeasurementtype,eitherRMSvoltageorpeak-to-peakvoltage.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxAdjust1540Calint32DAQmxAdjust1540Cal(uInt32calHandle,float64refVoltage,float64
measOutput,int32inputCalSource);
PurposeAdjuststhecalibrationconstantsfortheSCXI-1540module.YoumustmeasurethevoltagegeneratedbyapreviouscalltotheDAQmxSetup1540CalfunctionandspecifythemeasurementwithmeasOutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 TheexcitationRMSvoltagemeasuredfromthefrontofthemodule.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
inputCalSource int32 Thecalibrationinputsourceselection.
Value DescriptionDAQmx_Val_Loopback0 Loopbacktheinternal
excitationvoltagewith0degreephaseshift.
DAQmx_Val_Loopback180 Loopbacktheinternalexcitationvoltagewith180degreephaseshift.
DAQmx_Val_Ground Connectthechanneltoground.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1102Calint32DAQmxSetup1102Cal(uInt32calHandle,constcharchannelNames[],
float64gain);
PurposeSetstheSCXI-1102moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1102Calfunction.
NoteTheterminalwheremoduleoutputismeasuredwilldependontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0+/-pinsoftherearsignalconnector.Pleaserefertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelNames constchar[]
Thephysicalchannel(s)tocalibrate.
gain float64 Thegainvaluetocalibrate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1104Calint32DAQmxSetup1104Cal(uInt32calHandle,constcharchannel[]);
PurposeSpecifiesthechannelontheSCXI-1104moduleforcalibration.Measurecalibrationinput/outputpointsbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.SpecifyeachofthesepointsusingtheDAQmxAdjust1104Calfunction.
NoteTheterminalwheremoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0+/-pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channel constchar[]
Thephysicalchanneltocalibrate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1112Calint32DAQmxSetup1112Cal(uInt32calHandle,constcharchannel[]);
PurposeSpecifiesthechannelontheSCXI-1112moduleforcalibration.Measurecalibrationinput/outputpointsbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.SpecifyeachofthesepointsusingtheDAQmxAdjust1112Calfunction.
NoteTheterminalwheremoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0+/-pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channel constchar[]
Thephysicalchanneltocalibrate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1122Calint32DAQmxSetup1122Cal(uInt32calHandle,constcharchannel[],float64
gain);
PurposeSetstheSCXI-1122moduletothespecifiedgainvalue.CalibrationI/Opointscanbemeasuredbysupplyingreferencesignalstothedeviceandmeasuringtheoutputs.SpecifyeachofthesepointsusingtheDAQmxAdjust1122Calfunction.
NoteTheterminalwheremoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channel constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1124Calint32DAQmxSetup1124Cal(uInt32calHandle,constcharchannelName[],int32
range,uInt32dacValue);
PurposeWritesthespecifiedbinaryvaluetotheD/Acircuitryonthespecifiedchannelatthespecifiedrange.MeasureandspecifythevoltageorcurrentgeneratedinasubsequentcalltotheDAQmxAdjust1124Calfunction.
NoteSpecifyatleasttwocalibrationpointsforeachchannel/rangebeingcalibrated.Therecommendedbinarydatatouseforvoltagerangesare0and4095.Therecommendedbinarydatatouseforthecurrentrangeis255and4095.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
range int32 Therangetocalibrate.
dacValue uInt32 ThebinarynumbertowritetotheDACcircuitry.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1125Calint32DAQmxSetup1125Cal(uInt32calHandle,constcharchannelNames[],
float64gain);
PurposeSetstheSCXI-1125moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1125Calfunction.
NoteTheterminalwheremoduleoutputismeasuredwilldependontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0+/-pinsoftherearsignalconnector.Pleaserefertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelNames constchar[]
Thephysicalchannel(s)tocalibrate.
gain float64 Thegainvaluetocalibrate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1126Calint32DAQmxSetup1126Cal(uInt32calHandle,constcharchannelName[],
float64upperFreqLimit);
PurposeSpecifiesthechannelandupperfrequencylimitontheSCXI-1126moduleforcalibration.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.SpecifyeachofthesepointsusingtheDAQmxAdjust1126Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
upperFreqLimit float64 Thehighfrequencylimitinhertz,with0Hzasthelowfrequencylimit,whichmostcloselyencapsulatestherangestobecalibrated.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1141Calint32DAQmxSetup1141Cal(uInt32calHandle,constcharchannelName[],
float64gain);
PurposeSetstheSCXI-1141moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1141Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1142Calint32DAQmxSetup1142Cal(uInt32calHandle,constcharchannelName[],
float64gain);
PurposeSetstheSCXI-1142moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1142Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1143Calint32DAQmxSetup1143Cal(uInt32calHandle,constcharchannelName[],
float64gain);
PurposeSetstheSCXI-1143moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1143Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1502Calint32DAQmxSetup1502Cal(uInt32calHandle,constcharchannelName[],
float64gain);
PurposeSetstheSCXI-1502moduletothespecifiedgainvalue.CalibrationI/Opointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.SpecifyeachofthesepointsusingtheDAQmxAdjust1502Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1503Calint32DAQmxSetup1503Cal(uInt32calHandle,constcharchannelName[],
float64gain);
PurposeSetstheSCXI-1503moduletothespecifiedgainvalue.CalibrationI/Opointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.SpecifyeachofthesepointsusingtheDAQmxAdjust1503Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1520Calint32DAQmxSetup1520Cal(uInt32calHandle,constcharchannelNames[],
float64gain);
PurposeSetstheSCXI-1520moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1520Calfunction.Thisfunctionwillalsodisablesampleandholdonthemodulesothattheoutputcanbemeasuredbyexternaldevicesthatcannotsupplytheappropriatesampleandholdtimingsignals.
NoteTheterminalwheremoduleoutputismeasuredwilldependontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0+/-pinsoftherearsignalconnector.Pleaserefertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelNames constchar[]
Thephysicalchannel(s)tocalibrate.
gain float64 Thegainvaluetocalibrate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup153xCalint32DAQmxSetup153xCal(uInt32calHandle,constcharchannelName[],
float64gain);
PurposeSetstheSCXI-153xmoduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust153xCalfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetup1540Calint32DAQmxSetup1540Cal(uInt32calHandle,constcharchannel[],float64
excitationVoltage,float64excitationFreq);
PurposeSetstheSCXI-1540moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1540Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
excitationVoltage float64 TheRMSvalueoftheinternalACexcitationvoltage.
excitationFreq float64 ThefrequencyoftheinternalACexcitationvoltage.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxDeleteSavedGlobalChanint32DAQmxDeleteSavedGlobalChan(constcharchannelName[]);
PurposeDeletesthespecifiedglobalvirtualchannelfromMAX.Thisfunctiondoesnotremovetheglobalvirtualchannelfromtasksthatuseit.
ParametersInput
Name Type Description
channelName constchar[] Nameoftheglobalvirtualchanneltodelete.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxDeleteSavedScaleint32DAQmxDeleteSavedScale(constcharscaleName[]);
PurposeDeletesthespecifiedcustomscalefromMAX.Thisfunctiondoesnotremovethecustomscalefromvirtualchannelsthatuseit.
ParametersInput
Name Type Description
scaleName constchar[] Nameofthecustomscaletodelete.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxDeleteSavedTaskint32DAQmxDeleteSavedTask(constchartaskName[]);
PurposeDeletesthespecifiedtaskfromMAX.Thisfunctiondoesnotclearthecopyofthetaskstoredinmemory.UseDAQmxClearTasktoclearthecopyofthetask.
ParametersInput
Name Type Description
taskName constchar[] Nameofthetasktodelete.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSaveGlobalChanint32DAQmxSaveGlobalChan(TaskHandletaskHandle,constchar
channelName[],constcharsaveAs[],constcharauthor[],uInt32options);
PurposeSavesthespecifiedlocalorglobalvirtualchanneltoMAXasaglobalvirtualchannel.Youmustspecifyboththelocalorglobalvirtualchanneltosaveandataskthatcontainsthatchannel.ProgrammaticallysavedglobalvirtualchannelscannotbeviewedintheDAQAssistantforversionsofNI-DAQearlierthan7.4.ToviewaprogrammaticallysavedglobalvirtualchannelinanearlierversionofNI-DAQ,firstusetheDAQAssistantinNI-DAQ7.4orlatertosavetheglobalvirtualchannel.VisittheDAQmxProfessionalDeveloperToolswebsiteformoreinformationandexamplesofprogrammaticallysavingglobalvirtualchannels.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskthatcontainsthelocalorglobalvirtualchannelyouwanttosave.
channelName constchar[]
Nameofthelocalorglobalvirtualchanneltosave.
saveAs constchar[]
Nametosavetheglobalvirtualchannelas.Ifyoupassanemptystring("")orNULL,thenamecurrentlyassignedtotheglobalvirtualchannelwillbeused.
author constchar[]
Nametostorewiththeglobalvirtualchannel.
options uInt32 Usethisparametertosetcertainoptions.Youcancombineoptionswiththebitwise-ORoperator('|')tosetmultipleoptions.Passavalueofzeroifnooptionsneedtobeset.
Value DescriptionDAQmx_Val_Save_Overwrite Overwritea
globalvirtualchannelofthesamenameifoneisalreadysavedinMAX.IfyoudonotsetthisflagandaglobalvirtualchannelofthesamenameisalreadysavedinMAX,thefunctionreturnsanerror.
DAQmx_Val_Save_AllowInteractiveEditing Allowtheglobalvirtual
channeltobeeditedintheDAQAssistant.Ifyousetthisflag,theDAQAssistantmustsupportallglobalvirtualchannelsettings.
DAQmx_Val_Save_AllowInteractiveDeletion AllowtheglobalvirtualchanneltobedeletedthroughMAX.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSaveScaleint32DAQmxSaveScale(constcharscaleName[],constcharsaveAs[],const
charauthor[],uInt32options);
PurposeSavesthespecifiedcustomscaletoMAX.VisittheDAQmxProfessionalDeveloperToolswebsiteformoreinformationandexamplesofprogrammaticallysavingglobalchannels.
ParametersInput
Name Type Description
scaleName constchar[]
Nameofthecustomscaletosave.
saveAs constchar[]
Nametosavethecustomscaleas.Ifyoupassanemptystring("")orNULL,thenamecurrentlyassignedtothescaleisused.
author constchar[]
Nametostorewiththecustomscale.
options uInt32 Usethisparametertosetcertainoptions.Youcancombineoptionswiththebitwise-ORoperator('|')tosetmultipleoptions.Passavalueofzeroifnooptionsneedtobeset.
Value DescriptionDAQmx_Val_Save_Overwrite Overwritea
customscaleofthesamenameifoneisalreadysavedinMAX.IfyoudonotsetthisflagandacustomscaleofthesamenameisalreadysavedinMAX,thefunctionreturnsanerror.
DAQmx_Val_Save_AllowInteractiveEditing AllowthecustomscaletobeeditedintheDAQAssistant.
DAQmx_Val_Save_AllowInteractiveDeletion AllowthecustomscaletobedeletedthroughMAX.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSaveTaskint32DAQmxSaveTask(TaskHandletaskHandle,constcharsaveAs[],const
charauthor[],uInt32options);
PurposeSavesthespecifiedtaskandanylocalchannelsitcontainstoMAX.Thisfunctiondoesnotsaveglobalchannels.UseDAQmxSaveGlobalChantosaveglobalchannels.ProgrammaticallysavedtaskscannotbeviewedintheDAQAssistantforversionsofNI-DAQearlierthan7.4.ToviewaprogrammaticallysavedtaskinanearlierversionofNI-DAQ,firstusetheDAQAssistantinNI-DAQ7.4orlatertosavethetask.VisittheDAQmxProfessionalDeveloperToolswebsiteformoreinformationandexamplesofprogrammaticallysavingglobalchannels.
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktosave.
saveAs constchar[]
Nametosavethetaskas.Ifyoupassanemptystring("")orNULL,thenamecurrentlyassignedtothetaskwillbeused.
author constchar[]
Nametostorewiththetask.
options uInt32 Usethisparametertosetcertainoptions.Youcancombineoptionswiththebitwise-ORoperator('|')tosetmultipleoptions.Passavalueofzeroifnooptionsneedtobeset.
Value DescriptionDAQmx_Val_Save_Overwrite Overwritea
taskofthesamenameifoneisalreadysavedinMAX.IfyoudonotsetthisflagandataskofthesamenameisalreadysavedinMAX,thefunctionreturnsanerror.
DAQmx_Val_Save_AllowInteractiveEditing AllowthetasktobeeditedintheDAQAssistant.Ifyousetthisflag,theDAQ
Assistantmustsupportalltasksettings.
DAQmx_Val_Save_AllowInteractiveDeletion AllowthetasktobedeletedthroughMAX.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxClearTEDSint32DAQmxClearTEDS(constcharphysicalChannel[]);
PurposeRemovesTEDSinformationfromthephysicalchannelyouspecify.ThisfunctiontemporarilyoverridesanyTEDSconfigurationforthephysicalchannelthatyouperformedinMAX.
ParametersInput
Name Type Description
physicalChannel constchar[] Thenameofthephysicalchannelyouwanttoclear.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxConfigureTEDSint32DAQmxConfigureTEDS(constcharphysicalChannel[],constchar
filePath[]);
PurposeAssociatesTEDSinformationwiththephysicalchannelyouspecify.IfyoudonotspecifythefilenameofadatasheetinthefilePathparameter,thisfunctionattemptstofindaTEDSsensorconnectedtothephysicalchannel.ThisfunctiontemporarilyoverridesanyTEDSconfigurationforthephysicalchannelthatyouperformedinMAX.
ParametersInput
Name Type Description
physicalChannel constchar[]
Thenameofthephysicalchannelyouwanttoconfigure.
filePath constchar[]
ThepathtoaVirtualTEDSdatasheetthatyouwanttoassociatewiththephysicalchannel.Ifyoudonotspecifythefilenameofadatasheet,thisfunctionattemptstofindaTEDSsensorconnectedtothephysicalchannel.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteToTEDSFromArrayint32DAQmxWriteToTEDSFromArray(constcharphysicalChannel[],uInt8
bitstream[],uInt32arraySize,int32basicTEDSOptions);
PurposeWritesTEDSdata,storedasa1Darrayof8-bitunsignedintegers,tothesensorconnectedtothephysicalchannelyouspecify.
ParametersInput
Name Type Description
physicalChannel constchar[]
Thenameofthephysicalchannelyouwanttoconfigure.
bitstream uInt8 RepresentstheTEDSbitstreamtowritetothesensor.ThisbitstreammustbeconstructedaccordingtotheIEEE1451.4specification.
arraySize uInt32 Numberofbytesinthebitstream.
basicTEDSOptions int32 SpecifieshowtohandlebasicTEDSdatainthebitstream.
Value DescriptionDoNotWrite
IgnorebasicTEDSdata.
WritetoEEPROM
WritebasicTEDSdatatotheEEPROM,evenifthesensorincludesaPROM.YoucannotwritebasicTEDSdataifthePROMcontainsdata.
WritetoPROM
WritebasicTEDSdatatothePROM.AnysubsequentattemptstowritebasicTEDSdataresultinanerror.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxWriteToTEDSFromFileint32DAQmxWriteToTEDSFromFile(constcharphysicalChannel[],constchar
filePath[],int32basicTEDSOptions);
PurposeWritesTEDSdatafromavirtualTEDSfiletothesensorconnectedtothephysicalchannelyouspecify.
ParametersInput
Name Type Description
physicalChannel constchar[]
Thenameofthephysicalchannelyouwanttoconfigure.
filePath constchar[]
SpecifiesthefilenameofavirtualTEDSfilethatcontainsthebitstreamtowrite.
basicTEDSOptions int32 SpecifieshowtohandlebasicTEDSdatainthebitstream.
Value DescriptionDoNotWrite
IgnorebasicTEDSdata.
WritetoEEPROM
WritebasicTEDSdatatotheEEPROM,evenifthesensorincludesaPROM.YoucannotwritebasicTEDSdataifthePROMcontainsdata.
WritetoPROM
WritebasicTEDSdatatothePROM.AnysubsequentattemptstowritebasicTEDSdataresultinanerror.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetAnalogPowerUpStatesint32DAQmxSetAnalogPowerUpStates(constchardeviceName[],constchar
channelNames[],float64state,int32channelType,...);
PurposeUpdatesthestatesthatanalogphysicalchannelsonadevicearesettowhenthedevicepowersuporwhenthedeviceisreset.Power-upstatesarestoredinEEPROMsthatyoucanwritetoonlyalimitednumberoftimes.Therefore,youshouldusethisfunctionasinfrequentlyaspossible.ThisfunctionwritestotheEEPROMonlyifasettingyourequestisdifferentfromtheonecurrentlystoredontheEEPROM.Thisfunctionwritespower-upstatesinsequentialorder.Therefore,ifaphysicalchannelhasmultipleentries,thelastentryisused.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
channelNames constchar[] Thephysicalchanneltomodify.Youcanspecifyalistorrangeofchannels.
state float64 Thepower-upstatetosetforthechannel(s)inchannelNames.
channelType int32 Thechanneltypeforthechannel(s)inchannelNames.
Value DescriptionDAQmx_Val_ChannelVoltage Voltage
output.Youcansetvoltagepower-upstatesonlyforphysicalchannelsthatsupportvoltageoutput.
DAQmx_Val_ChannelCurrent Currentoutput.Youcansetcurrentpower-upstatesonlyforphysicalchannelsthatsupportcurrentoutput.
moreChannelsStatesAndTypes anytype(passedbyvalue)
Combinationsofadditionalchannelsandstatesandtypestosetthechannelstowhenthedevicepowersuporwhenthedeviceisreset.YoumustpassNULLattheendoftheargumentlist.Ifyoudonotwanttopassadditionalchannelsandstates,thefunctioncallcanbesimilartothefollowingexample:DAQmxSetAnalogPowerUpStates("Dev1","Dev1/ao0",0.0,
DAQmx_Val_ChannelVoltage,NULL);Ifyoupassadditionalchannelsandstates,thefunctioncallcanbesimilartothefollowingexample:DAQmxSetAnalogPowerUpStates("Dev1","Dev1/ao0",0.0,DAQmx_Val_ChannelVoltage,"Dev1/ao1",1.0,DAQmx_Val_ChannelCurrent,NULL);
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetDigitalLogicFamilyPowerUpStateint32DAQmxSetDigitalLogicFamilyPowerUpState(constchardeviceName[],
int32logicFamily);
PurposeSetsthedigitallogicfamilytousewhenthedevicepowersup.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
logicFamily int32 Specifiesthelogicfamilytosetthedevicetowhenitpowersup.Alogicfamilycorrespondstovoltagethresholdsthatarecompatiblewithagroupofvoltagestandards.Refertodevicedocumentationforinformationonthelogichighandlogiclowvoltagesfortheselogicfamilies.
Value DescriptionDAQmx_Val_2point5V 2.5V(compatiblewith
CMOSsignals)DAQmx_Val_3point3V 3.3V(compatiblewith
LVTTLandLVCMOSsignals)
DAQmx_Val_5V 5V(compatiblewithTTLandCMOSsignals)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxSetDigitalPowerUpStatesint32DAQmxSetDigitalPowerUpStates(constchardeviceName[],constchar
channelNames[],int32state,...);
PurposeUpdatesthestatethatdigitalphysicalchannelsonstaticDIOdevicesaresettowhenthedevicepowersuporwhenthedeviceisreset.Power-upstatesarestoredinEEPROMsthatyoucanwritetoonlyalimitednumberoftimes.Therefore,youshouldusethisfunctionasinfrequentlyaspossible.ThisfunctionwritestotheEEPROMonlyifasettingyourequestisdifferentfromtheonecurrentlystoredontheEEPROM.Thisfunctionwritespower-upstatesinsequentialorder.Therefore,ifaphysicalchannelhasmultipleentries,thelastentryisused.
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
channelNames constchar[] Thedigitallineorporttomodify.Youcannotsetpower-upstatesfordedicateddigitalinputlines.Youcanspecifyalistorrangeofchannels.
state int32 Thepower-upstatetosetforthechannel(s)inchannelNames.
Value DescriptionDAQmx_Val_High HighlogicDAQmx_Val_Low LowlogicDAQmx_Val_Tristate High-impedance
state.Youcanselectthisstateonlyondeviceswithbidirectionalports,andyoucanselectitonlyforentireports.Youcannotselectthisstatefordedicateddigitaloutputlines.
moreChannelsAndStates anytype(passedbyvalue)
Pairsofadditionalchannelsandthestatestosetthechannelstowhenthedevicepowersuporwhenthedeviceisreset.YoumustpassNULLattheendoftheargumentlist.Ifyoudonotwanttopassadditionalchannelsandstates,thefunctioncallcanbesimilartothefollowingexample:DAQmxSetDigitalPowerUpStates("Dev1","Dev1/do0",DAQmx_Val_High,NULL);Ifyoupassadditionalchannelsandstates,thefunctioncallcanbesimilartothefollowingexample:DAQmxSetDigitalPowerUpStates("Dev1","Dev1/do0",DAQmx_Val_High,"Dev1/do1",DAQmx_Val_Tristate,NULL);
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
DAQmxGetErrorStringint32DAQmxGetErrorString(int32errorCode,charerrorString[],uInt32
bufferSize);
PurposeConvertstheerrornumberreturnedbyanNI-DAQmxfunctionintoameaningfulerrormessage.IfyoupassinavalidvalueforerrorStringanditsbufferSize,thisfunctionreturnsasmuchoftheavailabledataaspossible.IfyoupassNULLforerrorStringor0forbufferSize,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
ParametersInput
Name Type Description
errorCode int32 AnerrorcodeorwarningreturnedbyoneoftheNI-DAQmxLibraryfunctions.
bufferSize uInt32 Thesize,inbytes,ofthebufferpassedintheerrorString.Ifyoupass0,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
Output
errorString char[] Themeaningfulerrormessagefortheerrornumber.IfyoupassNULL,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.IfyoupassinavalidvalueforerrorStringanditsbufferSize,thisfunctionreturnsasmuchoftheavailabledataaspossible.IfyoupassNULLforerrorStringor0forbufferSize,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
DAQmxGetExtendedErrorInfoint32DAQmxGetExtendedErrorInfo(charerrorString[],uInt32bufferSize);
PurposeReturnsdynamic,specificerrorinformation.Thisfunctionisvalidonlyforthelastfunctionthatfailed;additionalNI-DAQmxcallsmayinvalidatethisinformation.IfyoupassvalidvaluesforerrorStringandbufferSize,thisfunctionreturnsasmuchoftheavailabledataaspossible.IfyoupassNULLforerrorStringor0forbufferSize,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
ParametersInput
Name Type Description
bufferSize uInt32 Thesize,inbytes,oferrorString.Ifyoupass0,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
Output
Name Type Description
errorString char[] Dynamicerrorinformation.IfyoupassNULL,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.IfyoupassinavalidvalueforerrorStringanditsbufferSize,thisfunctionreturnsasmuchoftheavailabledataaspossible.IfyoupassNULLforerrorStringor0forbufferSize,thisfunctionreturnsthenumberofbytesyouneedtoallocate.