ni-daqmx c reference help · if you do not call daqmxstarttask and daqmxstoptask when you call...
TRANSCRIPT
![Page 1: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/1.jpg)
DAQmxAddGlobalChansToTaskint32DAQmxAddGlobalChansToTask(TaskHandletaskHandle,constchar
channelNames[]);
![Page 2: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/2.jpg)
PurposeAddsglobalvirtualchannelsfromMAXtothegiventask.
![Page 3: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/3.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle ThetasktowhichtoaddthechannelsfromMAX.
channelNames constchar[] Thechannelstoaddtothetask.Youcanspecifyalistorrangeofchannels.ThesechannelsmustbevalidchannelsavailablefromMAX.Ifyoupassaninvalidchannel,NI-DAQmxreturnsanerror.Thisvalueisignoredifitisempty.
![Page 4: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/4.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 5: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/5.jpg)
DAQmxClearTaskint32DAQmxClearTask(TaskHandletaskHandle);
![Page 6: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/6.jpg)
PurposeClearsthetask.Beforeclearing,thisfunctionstopsthetask,ifnecessary,andreleasesanyresourcesreservedbythetask.Youcannotuseataskonceyouclearthetaskwithoutrecreatingorreloadingthetask.IfyouusetheDAQmxCreateTaskfunctionoranyoftheNI-DAQmxCreateChannelfunctionswithinaloop,usethisfunctionwithintheloopafteryoufinishwiththetasktoavoidallocatingunnecessarymemory.
![Page 7: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/7.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktoclear.
![Page 8: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/8.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 9: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/9.jpg)
DAQmxCreateTaskint32DAQmxCreateTask(constchartaskName[],TaskHandle*taskHandle);
![Page 10: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/10.jpg)
PurposeCreatesatask.Ifyouusethisfunctiontocreateatask,youmustuseDAQmxClearTasktodestroyit.Ifyouusethisfunctionwithinaloop,NI-DAQmxcreatesanewtaskineachiterationoftheloop.UsetheDAQmxClearTaskfunctionwithintheloopafteryoufinishwiththetasktoavoidallocatingunnecessarymemory.
![Page 11: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/11.jpg)
ParametersInput
Name Type Description
taskName constchar[] Nameassignedtothetask.
NoteThisnamemaybechangedinternally.IfyouareusingtheCAPI,callDAQmxGetTaskNametoverifywhetherthenamewaschangedduringcreation.IfyouareusingtheCVIAPI,callDAQmxGetTaskAttributewithattributeIDDAQmx_Task_Nametoverifythenamechange.
Output
Name Type Description
taskHandle TaskHandle* Areferencetothetaskcreatedinthisfunction.
![Page 12: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/12.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 13: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/13.jpg)
DAQmxIsTaskDoneint32DAQmxIsTaskDone(TaskHandletaskHandle,bool32*isTaskDone);
![Page 14: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/14.jpg)
PurposeQueriesthestatusofthetaskandindicatesifitcompletedexecution.Usethisfunctiontoensurethatthespecifiedoperationiscompletebeforeyoustopthetask.
![Page 15: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/15.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
Output
Name Type Description
isTaskDone bool32* Indicateswhetherthemeasurementorgenerationcompleted.
![Page 16: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/16.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 17: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/17.jpg)
DAQmxLoadTaskint32DAQmxLoadTask(constchartaskName[],TaskHandle*taskHandle);
![Page 18: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/18.jpg)
PurposeLoadsanexistingnamedtaskfromMeasurement&AutomationExplorer(MAX).Ifyouusethisfunctiontoloadatask,youmustuseDAQmxClearTasktodestroyit.
![Page 19: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/19.jpg)
ParametersInput
Name Type Description
taskName constchar[] AnamedtaskinMAX.
Output
Name Type Description
taskHandle TaskHandle* Areferencetothetaskreturnedbythisfunction.
![Page 20: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/20.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 21: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/21.jpg)
DAQmxStartTaskint32DAQmxStartTask(TaskHandletaskHandle);
![Page 22: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/22.jpg)
PurposeTransitionsthetaskfromthecommittedstatetotherunningstate,whichbeginsmeasurementorgeneration.Usingthisfunctionisrequiredforsomeapplicationsandoptionalforothers.Ifyoudonotusethisfunction,ameasurementtaskstartsautomaticallywhenareadoperationbegins.TheautoStartparameteroftheNI-DAQmxWritefunctionsdeterminesifagenerationtaskstartsautomaticallywhenyouuseanNI-DAQmxWritefunction.IfyoudonotcallDAQmxStartTaskandDAQmxStopTaskwhenyoucallNI-DAQmxReadfunctionsorNI-DAQmxWritefunctionsmultipletimes,suchasinaloop,thetaskstartsandstopsrepeatedly.Startingandstoppingataskrepeatedlyreducestheperformanceoftheapplication.
![Page 23: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/23.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktostart.
![Page 24: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/24.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 25: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/25.jpg)
DAQmxStopTaskint32DAQmxStopTask(TaskHandletaskHandle);
![Page 26: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/26.jpg)
PurposeStopsthetaskandreturnsittothestateitwasinbeforeyoucalledDAQmxStartTaskorcalledanNI-DAQmxWritefunctionwithautoStartsettoTRUE.IfyoudonotcallDAQmxStartTaskandDAQmxStopTaskwhenyoucallNI-DAQmxReadfunctionsorNI-DAQmxWritefunctionsmultipletimes,suchasinaloop,thetaskstartsandstopsrepeatedly.Startingandstoppingataskrepeatedlyreducestheperformanceoftheapplication.
![Page 27: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/27.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetasktostop.
![Page 28: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/28.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 29: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/29.jpg)
DAQmxRegisterDoneEventint32DAQmxRegisterDoneEvent(TaskHandletaskHandle,uInt32options,
DAQmxDoneEventCallbackPtrcallbackFunction,void*callbackData);
![Page 30: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/30.jpg)
PurposeRegistersacallbackfunctiontoreceiveaneventwhenataskstopsduetoanerrororwhenafiniteacquisitiontaskorfinitegenerationtaskcompletesexecution.ADoneeventdoesnotoccurwhenataskisstoppedexplicitly,suchasbycallingDAQmxStopTask.
![Page 31: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/31.jpg)
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
![Page 32: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/32.jpg)
*callbackData);Uponentrytothecallback,thetaskHandleparametercontainsonwhichtheeventoccurred.Thestatusparametercontainsthestatusofthetaskwhentheeventoccurred.Ifthestatusvalueisnegative,itindicatesanerror.statusvalueiszero,itindicatesnoerror.Ifthestatusvalueispositive,itindicatesawarning.ThecallbackDataparametercontainsthevalueyoupassedinthecallbackDataparameterofthisfunction.
callbackData void* AvaluethatyouwantDAQmxtopasstothecallbackfunctionasthefunctiondataparameter.Donotpasstheaddressofalocalvariableoranyothervariablethatmightnotbevalidwhenthefunctionisexecuted.
![Page 33: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/33.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 34: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/34.jpg)
DAQmxRegisterEveryNSamplesEventint32DAQmxRegisterEveryNSamplesEvent(TaskHandletaskHandle,int32
everyNsamplesEventType,uInt32nSamples,uInt32options,DAQmxEveryNSamplesEventCallbackPtrcallbackFunction,void*callbackData);
![Page 35: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/35.jpg)
PurposeRegistersacallbackfunctiontoreceiveaneventwhenthespecifiednumberofsamplesiswrittenfromthedevicetothebufferorfromthebuffertothedevice.Thisfunctiononlyworkswithdevicesthatsupportbufferedtasks.Whenyoustopataskexplicitlyanypendingeventsarediscarded.Forexample,ifyoucallDAQmxStopTaskthenyoudonotreceiveanypendingevents.
![Page 36: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/36.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
everyNsamplesEventType int32 Thetypeofeventyouwanttoreceive.
ValueDAQmx_Val_Acquired_Into_Buffer
DAQmx_Val_Transferred_From_Buffer
![Page 37: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/37.jpg)
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.
![Page 38: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/38.jpg)
callbackData void* AvaluethatyouwantDAQmxtopasstothecallbackfunctionasthefunctiondataparameter.Donotpasstheaddressofalocalvariableoranyothervariablethatmightnotbevalidwhenthefunctionisexecuted.
![Page 39: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/39.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 40: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/40.jpg)
DAQmxRegisterSignalEventint32DAQmxRegisterSignalEvent(TaskHandletaskHandle,int32signalID,
uInt32options,DAQmxSignalEventCallbackPtrcallbackFunction,void*callbackData);
![Page 41: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/41.jpg)
PurposeRegistersacallbackfunctiontoreceiveaneventwhenthespecifiedhardwareeventoccurs.Whenyoustopataskexplicitlyanypendingeventsarediscarded.Forexample,ifyoucallDAQmxStopTaskthenyoudonotreceiveanypendingevents.
![Page 42: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/42.jpg)
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
![Page 43: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/43.jpg)
NoteIfyouarereceivingsynchronouseventsfasterthanyouareprocessingthem,thentheuserinterfaceofyourapplicationmightbecomeunresponsive.
callbackFunction DAQmxSignalEventCallbackPtr ThefunctionthatyouwantDAQmxtocallwhentheeventoccurs.Thefunctionpassinthisparametermusthavethefollowingprototype:int32CVICALLBACKCallback(TaskHandletaskHandle,int32*callbackData);Uponentrytothecallback,thetaskHandleparametercontainsonwhichtheeventoccurred.ThesignalIDparametercontainsthevalueyoupassedinthesignalIDparameterofthisfunction.ThecallbackDatavalueyoupassedinthecallbackDataparameterofthisfunction.
callbackData void* AvaluethatyouwantDAQmxtopasstothecallbackfunctionasthefunctiondataparameter.Donotpasstheaddressofalocalvariableoranyothervariablethatmightnotbevalidwhenthefunctionisexecuted.
![Page 44: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/44.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 45: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/45.jpg)
DAQmxGetNthTaskChannelint32DAQmxGetNthTaskChannel(TaskHandletaskHandle,uInt32index,char
buffer[],int32bufferSize);
![Page 46: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/46.jpg)
PurposeReturnstheNthchannel.ThisfunctiontakesthetaskHandle,index,andbufferSizeyouspecifyandreturnstheNthchannel.
![Page 47: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/47.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
index uInt32 TheNthchannelyouwanttoreturn.Theindexstartsat1.
bufferSize int32 Thesize,inbytes,ofbuffer.Ifyoupass0,thisfunctionreturnsthenumberofbytesneededtoallocate.
Output
buffer char[] TheNthchannelintheindex.IfyoupassNULL,thisfunctionreturnsthenumberofbytesneededtoallocate.
![Page 48: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/48.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.Forthisfunction,ifyoupassNULLforthebufferor0forthebuffersize,thisfunctionreturnsthenumberofbytesneededtoallocate.
![Page 49: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/49.jpg)
DAQmxGetNthTaskDeviceint32DAQmxGetNthTaskDevice(TaskHandletaskHandle,uInt32index,char
buffer[],int32bufferSize);
![Page 50: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/50.jpg)
PurposeReturnstheNthdevice.ThisfunctiontakesthetaskHandle,index,andbufferSizeyouspecifyandreturnstheNthdevice.
![Page 51: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/51.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
index uInt32 TheNthdeviceyouwanttoreturn.Theindexstartsat1.
bufferSize int32 Thesize,inbytes,ofbuffer.Ifyoupass0,thisfunctionreturnsthenumberofbytesneededtoallocate.
Output
buffer char[] TheNthdeviceintheindex.IfyoupassNULL,thisfunctionreturnsthenumberofbytesneededtoallocate.
![Page 52: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/52.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.Forthisfunction,ifyoupassNULLforthebufferor0forthebuffersize,thisfunctionreturnsthenumberofbytesneededtoallocate.
![Page 53: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/53.jpg)
DAQmxTaskControlint32DAQmxTaskControl(TaskHandletaskHandle,int32action);
![Page 54: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/54.jpg)
PurposeAltersthestateofataskaccordingtotheactionyouspecify.Tominimizethetimerequiredtostartatask,forexample,DAQmxTaskControlcancommitthetaskpriortostarting.
![Page 55: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/55.jpg)
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
![Page 56: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/56.jpg)
orcallStoptoresetthetaskwithoutstartingit.
![Page 57: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/57.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 58: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/58.jpg)
DAQmxCreateAIAccelChanint32DAQmxCreateAIAccelChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,float64sensitivity,int32sensitivityUnits,int32currentExcitSource,float64currentExcitVal,constcharcustomScaleName[]);
![Page 59: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/59.jpg)
PurposeCreateschannel(s)thatuseanaccelerometertomeasureaccelerationandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
![Page 60: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/60.jpg)
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
![Page 61: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/61.jpg)
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.
![Page 62: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/62.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 63: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/63.jpg)
DAQmxCreateAICurrentChanint32DAQmxCreateAICurrentChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,int32shuntResistorLoc,float64extShuntResistorVal,constcharcustomScaleName[]);
![Page 64: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/64.jpg)
PurposeCreateschannel(s)forcurrentmeasurementandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
![Page 65: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/65.jpg)
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,
![Page 66: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/66.jpg)
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.
![Page 67: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/67.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 68: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/68.jpg)
DAQmxCreateAICurrentRMSChanint32DAQmxCreateAICurrentRMSChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,int32shuntResistorLoc,float64extShuntResistorVal,constcharcustomScaleName[]);
![Page 69: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/69.jpg)
PurposeCreateschannel(s)forRMScurrentmeasurementandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
![Page 70: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/70.jpg)
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,
![Page 71: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/71.jpg)
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.
![Page 72: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/72.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 73: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/73.jpg)
DAQmxCreateAIFreqVoltageChanint32DAQmxCreateAIFreqVoltageChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,float64thresholdLevel,float64hysteresis,constcharcustomScaleName[]);
![Page 74: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/74.jpg)
PurposeCreateschannel(s)thatuseafrequency-to-voltageconvertertomeasurefrequencyandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
![Page 75: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/75.jpg)
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.
![Page 76: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/76.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 77: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/77.jpg)
DAQmxCreateAIMicrophoneChanint32DAQmxCreateAIMicrophoneChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,int32units,float64micSensitivity,float64maxSndPressLevel,int32currentExcitSource,float64currentExcitVal,constcharcustomScaleName[]);
![Page 78: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/78.jpg)
PurposeCreateschannel(s)thatuseamicrophonetomeasuresoundpressureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
![Page 79: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/79.jpg)
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.
![Page 80: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/80.jpg)
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.
![Page 81: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/81.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 82: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/82.jpg)
DAQmxCreateAIResistanceChanint32DAQmxCreateAIResistanceChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32currentExcitSource,float64currentExcitVal,constcharcustomScaleName[]);
![Page 83: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/83.jpg)
PurposeCreatechannel(s)tomeasureresistanceandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
![Page 84: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/84.jpg)
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
![Page 85: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/85.jpg)
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.
![Page 86: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/86.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 87: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/87.jpg)
DAQmxCreateAIRTDChanint32DAQmxCreateAIRTDChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32rtdType,int32resistanceConfig,int32currentExcitSource,float64currentExcitVal,float64r0);
![Page 88: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/88.jpg)
PurposeCreateschannel(s)thatuseanRTDtomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
![Page 89: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/89.jpg)
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
![Page 90: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/90.jpg)
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.
![Page 91: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/91.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 92: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/92.jpg)
DAQmxCreateAIStrainGageChanint32DAQmxCreateAIStrainGageChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32strainConfig,int32voltageExcitSource,float64voltageExcitVal,float64gageFactor,float64initialBridgeVoltage,float64nominalGageResistance,float64poissonRatio,float64leadWireResistance,constcharcustomScaleName[]);
![Page 93: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/93.jpg)
PurposeCreateschannel(s)tomeasurestrainandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
![Page 94: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/94.jpg)
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
![Page 95: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/95.jpg)
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
![Page 96: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/96.jpg)
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.
![Page 97: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/97.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 98: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/98.jpg)
DAQmxCreateAITempBuiltInSensorChanint32DAQmxCreateAITempBuiltInSensorChan(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],int32units);
![Page 99: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/99.jpg)
PurposeCreateschannel(s)tomeasuretemperaturewithabuilt-insensorofaterminalblockordeviceandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.OnSCXImodules,forexample,thiscouldbetheCJCsensor.
![Page 100: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/100.jpg)
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
![Page 101: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/101.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 102: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/102.jpg)
DAQmxCreateAIThrmcplChanint32DAQmxCreateAIThrmcplChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32thermocoupleType,int32cjcSource,float64cjcVal,constcharcjcChannel[]);
![Page 103: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/103.jpg)
PurposeCreateschannel(s)thatuseathermocoupletomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
![Page 104: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/104.jpg)
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.
![Page 105: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/105.jpg)
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.
![Page 106: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/106.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 107: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/107.jpg)
DAQmxCreateAIThrmstrChanIexint32DAQmxCreateAIThrmstrChanIex(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32currentExcitSource,float64currentExcitVal,float64a,float64b,float64c);
![Page 108: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/108.jpg)
PurposeCreateschannel(s)thatuseathermistortomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Usethisfunctionwhenthethermistorrequirescurrentexcitation.
![Page 109: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/109.jpg)
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
![Page 110: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/110.jpg)
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.
![Page 111: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/111.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 112: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/112.jpg)
DAQmxCreateAIThrmstrChanVexint32DAQmxCreateAIThrmstrChanVex(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32voltageExcitSource,float64voltageExcitVal,float64a,float64b,float64c,float64r1);
![Page 113: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/113.jpg)
PurposeCreateschannel(s)thatuseathermistortomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Usethisfunctionwhenthethermistorrequiresvoltageexcitation.
![Page 114: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/114.jpg)
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
![Page 115: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/115.jpg)
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.
![Page 116: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/116.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 117: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/117.jpg)
DAQmxCreateAIVoltageChanint32DAQmxCreateAIVoltageChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,constcharcustomScaleName[]);
![Page 118: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/118.jpg)
PurposeCreateschannel(s)tomeasurevoltageandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Ifyourmeasurementrequirestheuseofinternalexcitationoryouneedthevoltagetobescaledbyexcitation,callDAQmxCreateAIVoltageChanWithExcit.
![Page 119: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/119.jpg)
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
![Page 120: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/120.jpg)
DAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
![Page 121: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/121.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 122: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/122.jpg)
DAQmxCreateAIVoltageRMSChanint32DAQmxCreateAIVoltageRMSChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,constcharcustomScaleName[]);
![Page 123: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/123.jpg)
PurposeCreateschannel(s)tomeasureRMSvoltageandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Ifyourmeasurementrequirestheuseofinternalexcitationoryouneedthevoltagetobescaledbyexcitation,callDAQmxCreateAIVoltageChanWithExcit.
![Page 124: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/124.jpg)
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
![Page 125: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/125.jpg)
DAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
![Page 126: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/126.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 127: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/127.jpg)
DAQmxCreateAIVoltageChanWithExcitint32DAQmxCreateAIVoltageChanWithExcit(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,int32bridgeConfig,int32voltageExcitSource,float64voltageExcitVal,bool32useExcitForScaling,constcharcustomScaleName[]);
![Page 128: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/128.jpg)
PurposeCreateschannel(s)tomeasurevoltageandaddsthechannelstothetaskyouspecifywithtaskHandle.Usethisinstanceforcustomsensorsthatrequireexcitation.Youcanchoosetousetheexcitationtoscalethemeasurement.
![Page 129: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/129.jpg)
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.
![Page 130: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/130.jpg)
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.
![Page 131: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/131.jpg)
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.
![Page 132: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/132.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 133: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/133.jpg)
DAQmxCreateAIPosLVDTChanint32DAQmxCreateAIPosLVDTChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,float64sensitivity,int32sensitivityUnits,int32voltageExcitSource,float64voltageExcitVal,float64voltageExcitFreq,int32ACExcitWireMode,constcharcustomScaleName[]);
![Page 134: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/134.jpg)
PurposeCreateschannel(s)thatuseanLVDTtomeasurelinearpositionandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
![Page 135: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/135.jpg)
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.
![Page 136: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/136.jpg)
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.
![Page 137: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/137.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 138: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/138.jpg)
DAQmxCreateAIPosRVDTChanint32DAQmxCreateAIPosRVDTChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,float64sensitivity,int32sensitivityUnits,int32voltageExcitSource,float64voltageExcitVal,float64voltageExcitFreq,int32ACExcitWireMode,constcharcustomScaleName[]);
![Page 139: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/139.jpg)
PurposeCreateschannel(s)thatuseanRVDTtomeasureangularpositionandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
![Page 140: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/140.jpg)
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.
![Page 141: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/141.jpg)
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.
![Page 142: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/142.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 143: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/143.jpg)
ObsoleteThisfunctionisobsolete.UseDAQmxCreateAITempBuiltInSensorChaninstead.
![Page 144: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/144.jpg)
DAQmxCreateAIDeviceTempChanint32DAQmxCreateAIDeviceTempChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32units);
![Page 145: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/145.jpg)
PurposeCreateschannel(s)thatuseasensorbuiltintoaterminalblockordevicetomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.OnSCXImodules,forexample,thiscouldbetheCJCsensor.
![Page 146: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/146.jpg)
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
![Page 147: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/147.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 148: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/148.jpg)
DAQmxCreateTEDSAIAccelChanint32DAQmxCreateTEDSAIAccelChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,int32currentExcitSource,float64currentExcitVal,constcharcustomScaleName[]);
![Page 149: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/149.jpg)
PurposeCreateschannel(s)thatuseanaccelerometertomeasureaccelerationandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
![Page 150: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/150.jpg)
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
![Page 151: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/151.jpg)
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.
![Page 152: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/152.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 153: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/153.jpg)
DAQmxCreateTEDSAICurrentChanint32DAQmxCreateTEDSAICurrentChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,int32shuntResistorLoc,float64externalShuntResistorValue,constcharcustomScaleName[]);
![Page 154: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/154.jpg)
PurposeCreateschannel(s)tomeasurecurrentandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
![Page 155: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/155.jpg)
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
![Page 156: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/156.jpg)
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.
![Page 157: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/157.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 158: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/158.jpg)
DAQmxCreateTEDSAIMicrophoneChanint32DAQmxCreateTEDSAIMicrophoneChan(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,int32units,float64maxSndPressLevel,int32currentExcitSource,float64currentExcitVal,constcharcustomScaleName[]);
![Page 159: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/159.jpg)
PurposeCreateschannel(s)thatuseamicrophonetomeasuresoundpressureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
![Page 160: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/160.jpg)
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.
![Page 161: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/161.jpg)
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.
![Page 162: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/162.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 163: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/163.jpg)
DAQmxCreateTEDSAIResistanceChanint32DAQmxCreateTEDSAIResistanceChan(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32currentExcitSource,float64currentExcitVal,constcharcustomScaleName[]);
![Page 164: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/164.jpg)
PurposeCreateschannel(s)tomeasureresistanceandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
![Page 165: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/165.jpg)
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
![Page 166: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/166.jpg)
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.
![Page 167: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/167.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 168: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/168.jpg)
DAQmxCreateTEDSAIRTDChanint32DAQmxCreateTEDSAIRTDChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32currentExcitSource,float64currentExcitVal);
![Page 169: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/169.jpg)
PurposeCreateschannel(s)thatuseanRTDtomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
![Page 170: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/170.jpg)
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
![Page 171: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/171.jpg)
tospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
currentExcitVal float64 Theamountofexcitation,inamperes,thatthesensorrequires.
![Page 172: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/172.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 173: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/173.jpg)
DAQmxCreateTEDSAIStrainGageChanint32DAQmxCreateTEDSAIStrainGageChan(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32voltageExcitSource,float64voltageExcitVal,float64initialBridgeVoltage,float64leadWireResistance,constcharcustomScaleName[]);
![Page 174: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/174.jpg)
PurposeCreateschannel(s)tomeasurestrainandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
![Page 175: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/175.jpg)
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
![Page 176: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/176.jpg)
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.
![Page 177: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/177.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 178: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/178.jpg)
DAQmxCreateTEDSAIThrmcplChanint32DAQmxCreateTEDSAIThrmcplChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32cjcSource,float64cjcVal,constcharcjcChannel[]);
![Page 179: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/179.jpg)
PurposeCreateschannel(s)thatuseathermocoupletomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
![Page 180: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/180.jpg)
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
![Page 181: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/181.jpg)
compensation.
cjcVal float64 ThetemperatureofthecoldjunctionofthethermocoupleifyousetcjcSourcetoDAQmx_Val_ConstVal.
cjcChannel constchar[] Thechannelthatacquiresthetemperatureofthethermocouplecold-junctionifyousetcjcSourcetoDAQmx_Val_Chan.Youcanuseaglobalchanneloranothervirtualchannelalreadyinthetask.Ifthechannelisatemperaturechannel,NI-DAQmxacquiresthetemperatureinthecorrectunits.Otherchanneltypes,suchasaresistancechannelwithacustomsensor,mustuseacustomscaletoscalevaluestodegreesCelsius.
![Page 182: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/182.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 183: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/183.jpg)
DAQmxCreateTEDSAIThrmstrChanIexint32DAQmxCreateTEDSAIThrmstrChanIex(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32currentExcitSource,float64currentExcitVal);
![Page 184: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/184.jpg)
PurposeCreateschannel(s)thatuseathermistortomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Usethisinstancewhenthethermistorrequirescurrentexcitation.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
![Page 185: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/185.jpg)
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
![Page 186: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/186.jpg)
tospecifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusecurrentExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
currentExcitVal float64 Theamountofexcitation,inamperes,thatthesensorrequires.
![Page 187: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/187.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 188: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/188.jpg)
DAQmxCreateTEDSAIThrmstrChanVexint32DAQmxCreateTEDSAIThrmstrChanVex(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32resistanceConfig,int32voltageExcitSource,float64voltageExcitVal,float64r1);
![Page 189: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/189.jpg)
PurposeCreateschannel(s)thatuseathermistortomeasuretemperatureandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Usethisinstancewhenthethermistorrequiresvoltageexcitation.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
![Page 190: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/190.jpg)
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
![Page 191: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/191.jpg)
specifytheamountofexcitation.
DAQmx_Val_External Useanexcitationsourceotherthanthebuilt-inexcitationsourceofthedevice.YoumustusevoltageExcitValtospecifytheamountofexcitation.
DAQmx_Val_None Supplynoexcitationtothechannel.Youcannotusethisvalueifthesensorrequiresexcitation.
voltageExcitVal float64 Theamountofexcitation,involts,thatthesensorrequires.
r1 float64 Thevalue,inohms,ofthereferenceresistor.
![Page 192: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/192.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 193: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/193.jpg)
DAQmxCreateTEDSAIVoltageChanint32DAQmxCreateTEDSAIVoltageChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,constcharcustomScaleName[]);
![Page 194: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/194.jpg)
PurposeCreateschannel(s)tomeasurevoltageandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.Ifyourmeasurementrequirestheuseofinternalexcitationoryouneedthevoltagetobescaledbytheexcitation,usetheDAQmxCreateTEDSAIVoltageChanWithExcitfunction.
![Page 195: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/195.jpg)
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
![Page 196: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/196.jpg)
channel.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
![Page 197: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/197.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 198: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/198.jpg)
DAQmxCreateTEDSAIVoltageChanWithExcitint32DAQmxCreateTEDSAIVoltageChanWithExcit(TaskHandletaskHandle,
constcharphysicalChannel[],constcharnameToAssignToChannel[],int32terminalConfig,float64minVal,float64maxVal,int32units,int32voltageExcitSource,float64voltageExcitVal,constcharcustomScaleName[]);
![Page 199: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/199.jpg)
PurposeCreateschannel(s)tomeasurevoltageandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Usethisinstanceforcustomsensorsthatrequireexcitation.Youcanusetheexcitationtoscalethemeasurement.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
![Page 200: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/200.jpg)
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
![Page 201: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/201.jpg)
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.
![Page 202: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/202.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 203: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/203.jpg)
DAQmxCreateTEDSAIPosLVDTChanint32DAQmxCreateTEDSAIPosLVDTChan(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32voltageExcitSource,float64voltageExcitVal,float64voltageExcitFreq,int32ACExcitWireMode,constcharcustomScaleName[]);
![Page 204: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/204.jpg)
PurposeCreateschannel(s)thatuseanLVDTtomeasurelinearpositionandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
![Page 205: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/205.jpg)
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
![Page 206: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/206.jpg)
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.
![Page 207: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/207.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 208: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/208.jpg)
DAQmxCreateTEDSAIPosRVDTChanint32DAQmxCreateTEDSAIPosRVDTChan(TaskHandletaskHandle,const
charphysicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32voltageExcitSource,float64voltageExcitVal,float64voltageExcitFreq,int32ACExcitWireMode,constcharcustomScaleName[]);
![Page 209: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/209.jpg)
PurposeCreateschannel(s)thatuseanRVDTtomeasureangularpositionandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youmustconfigurethephysicalchannel(s)withTEDSinformationtousethisfunction.
![Page 210: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/210.jpg)
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
![Page 211: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/211.jpg)
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.
![Page 212: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/212.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 213: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/213.jpg)
DAQmxCreateAOCurrentChanint32DAQmxCreateAOCurrentChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,constcharcustomScaleName[]);
![Page 214: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/214.jpg)
PurposeCreateschannel(s)togeneratecurrentandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
![Page 215: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/215.jpg)
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.
![Page 216: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/216.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 217: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/217.jpg)
DAQmxCreateAOFuncGenChanint32DAQmxCreateAOFuncGenChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],int32type,float64frequency,float64amplitude,float64offset);
![Page 218: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/218.jpg)
PurposeCreatesachannelforcontinuallygeneratingawaveformontheselectedphysicalchannel.
![Page 219: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/219.jpg)
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.
![Page 220: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/220.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 221: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/221.jpg)
DAQmxCreateAOVoltageChanint32DAQmxCreateAOVoltageChan(TaskHandletaskHandle,constchar
physicalChannel[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,constcharcustomScaleName[]);
![Page 222: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/222.jpg)
PurposeCreateschannel(s)togeneratevoltageandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.
![Page 223: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/223.jpg)
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.
![Page 224: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/224.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 225: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/225.jpg)
DAQmxCreateDIChanint32DAQmxCreateDIChan(TaskHandletaskHandle,constcharlines[],const
charnameToAssignToLines[],int32lineGrouping);
![Page 226: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/226.jpg)
PurposeCreateschannel(s)tomeasuredigitalsignalsandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youcangroupdigitallinesintoonedigitalchannelorseparatethemintomultipledigitalchannels.Ifyouspecifyoneormoreentireportsinlinesbyusingportphysicalchannelnames,youcannotseparatetheportsintomultiplechannels.Toseparateportsintomultiplechannels,usethisfunctionmultipletimeswithadifferentporteachtime.
![Page 227: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/227.jpg)
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
![Page 228: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/228.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 229: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/229.jpg)
DAQmxCreateDOChanint32DAQmxCreateDOChan(TaskHandletaskHandle,constcharlines[],const
charnameToAssignToLines[],int32lineGrouping);
![Page 230: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/230.jpg)
PurposeCreateschannel(s)togeneratedigitalsignalsandaddsthechannel(s)tothetaskyouspecifywithtaskHandle.Youcangroupdigitallinesintoonedigitalchannelorseparatethemintomultipledigitalchannels.Ifyouspecifyoneormoreentireportsinlinesbyusingportphysicalchannelnames,youcannotseparatetheportsintomultiplechannels.Toseparateportsintomultiplechannels,usethisfunctionmultipletimeswithadifferentporteachtime.
![Page 231: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/231.jpg)
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
![Page 232: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/232.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 233: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/233.jpg)
DAQmxCreateCICountEdgesChanint32DAQmxCreateCICountEdgesChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],int32edge,uInt32initialCount,int32countDirection);
![Page 234: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/234.jpg)
PurposeCreatesachanneltocountthenumberofrisingorfallingedgesofadigitalsignalandaddsthechanneltothetaskyouspecifywithtaskHandle.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignaltothedefaultinputterminalofthecounterunlessyouselectadifferentinputterminal.
![Page 235: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/235.jpg)
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
![Page 236: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/236.jpg)
directionterminal.
![Page 237: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/237.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 238: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/238.jpg)
DAQmxCreateCIFreqChanint32DAQmxCreateCIFreqChan(TaskHandletaskHandle,constcharcounter[],
constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32edge,int32measMethod,float64measTime,uInt32divisor,constcharcustomScaleName[]);
![Page 239: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/239.jpg)
PurposeCreatesachanneltomeasurethefrequencyofadigitalsignalandaddsthechanneltothetaskyouspecifywithtaskHandle.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignaltothedefaultinputterminalofthecounterunlessyouselectadifferentinputterminal.
![Page 240: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/240.jpg)
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,
![Page 241: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/241.jpg)
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.
![Page 242: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/242.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 243: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/243.jpg)
DAQmxCreateCIPeriodChanint32DAQmxCreateCIPeriodChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32edge,int32measMethod,float64measTime,uInt32divisor,constcharcustomScaleName[]);
![Page 244: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/244.jpg)
PurposeCreatesachanneltomeasuretheperiodofadigitalsignalandaddsthechanneltothetaskyouspecifywithtaskHandle.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignaltothedefaultinputterminalofthecounterunlessyouselectadifferentinputterminal.
NoteWhenmeasMethodissettoDAQmx_Val_LowFreq1Ctr,youmustpassthevalues0.000001formeasTimeand4fordivisor.Thesevalueswillbeignoredbythefunction,butiftheyarenotpassed,thefunctionreturnsanerror.
![Page 245: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/245.jpg)
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,
![Page 246: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/246.jpg)
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.
![Page 247: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/247.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 248: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/248.jpg)
DAQmxCreateCIPulseWidthChanint32DAQmxCreateCIPulseWidthChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32startingEdge,constcharcustomScaleName[]);
![Page 249: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/249.jpg)
PurposeCreatesachanneltomeasurethewidthofadigitalpulseandaddsthechanneltothetaskyouspecifywithtaskHandle.startingEdgedetermineswhethertomeasureahighpulseoralowpulse.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignaltothedefaultinputterminalofthecounterunlessyouselectadifferentinputterminal.
![Page 250: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/250.jpg)
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.
![Page 251: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/251.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 252: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/252.jpg)
DAQmxCreateCISemiPeriodChanint32DAQmxCreateCISemiPeriodChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,constcharcustomScaleName[]);
![Page 253: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/253.jpg)
PurposeCreatesachanneltomeasurethetimebetweenstatetransitionsofadigitalsignalandaddsthechanneltothetaskyouspecifywithtaskHandle.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignaltothedefaultinputterminalofthecounterunlessyouselectadifferentinputterminal.
![Page 254: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/254.jpg)
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.
![Page 255: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/255.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 256: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/256.jpg)
DAQmxCreateCITwoEdgeSepChanDAQmxCreateCITwoEdgeSepChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],float64minVal,float64maxVal,int32units,int32firstEdge,int32secondEdge,constcharcustomScaleName[]);
![Page 257: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/257.jpg)
PurposeCreatesachannelthatmeasurestheamountoftimebetweentherisingorfallingedgeofonedigitalsignalandtherisingorfallingedgeofanotherdigitalsignal.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignalstothedefaultinputterminalsofthecounterunlessyouselectdifferentinputterminals.
![Page 258: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/258.jpg)
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
![Page 259: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/259.jpg)
secondsignal.DAQmx_Val_Falling Stopeachmeasurementon
thefallingedgeofthesecondsignal.
customScaleName constchar[] Thenameofacustomscaletoapplytothechannel.Tousethisparameter,youmustsetunitstoDAQmx_Val_FromCustomScale.IfyoudonotsetunitsDAQmx_Val_FromCustomScale,youmustsetcustomScaleNametoNULL.
![Page 260: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/260.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 261: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/261.jpg)
DAQmxCreateCILinEncoderChanint32DAQmxCreateCILinEncoderChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],int32decodingType,bool32ZidxEnable,float64ZidxVal,int32ZidxPhase,int32units,float64distPerPulse,float64initialPos,constcharcustomScaleName[]);
![Page 262: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/262.jpg)
PurposeCreatesachannelthatusesalinearencodertomeasurelinearposition.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignalstothedefaultinputterminalsofthecounterunlessyouselectdifferentinputterminals.
![Page 263: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/263.jpg)
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.
![Page 264: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/264.jpg)
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.
![Page 265: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/265.jpg)
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.
![Page 266: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/266.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 267: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/267.jpg)
DAQmxCreateCIAngEncoderChanint32DAQmxCreateCIAngEncoderChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],int32decodingType,bool32ZidxEnable,float64ZidxVal,int32ZidxPhase,int32units,uInt32pulsesPerRev,float64initialAngle,constcharcustomScaleName[]);
![Page 268: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/268.jpg)
PurposeCreatesachannelthatusesanangularencodertomeasureangularposition.Youcancreateonlyonecounterinputchannelatatimewiththisfunctionbecauseataskcanincludeonlyonecounterinputchannel.Toreadfrommultiplecounterssimultaneously,useaseparatetaskforeachcounter.Connecttheinputsignalstothedefaultinputterminalsofthecounterunlessyouselectdifferentinputterminals.
![Page 269: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/269.jpg)
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.
![Page 270: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/270.jpg)
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.
![Page 271: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/271.jpg)
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.
![Page 272: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/272.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 273: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/273.jpg)
DAQmxCreateCIGPSTimestampChanint32DAQmxCreateCIGPSTimestampChan(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],int32units,int32gpsSyncMethod,constcharcustScaleName[]);
![Page 274: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/274.jpg)
PurposeCreatesachannelthatusesaspecial-purposecountertotakeatimestampandsynchronizesthatcountertoaGPSreceiver.
![Page 275: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/275.jpg)
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.
![Page 276: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/276.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 277: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/277.jpg)
DAQmxCreateCOPulseChanFreqint32DAQmxCreateCOPulseChanFreq(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],int32units,int32idleState,float64initialDelay,float64freq,float64dutyCycle);
![Page 278: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/278.jpg)
PurposeCreateschannel(s)togeneratedigitalpulsesthatfreqanddutyCycledefineandaddsthechanneltothetaskyouspecifywithtaskHandle.Thepulsesappearonthedefaultoutputterminalofthecounterunlessyouselectadifferentoutputterminal.
![Page 279: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/279.jpg)
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.
![Page 280: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/280.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 281: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/281.jpg)
DAQmxCreateCOPulseChanTicksint32DAQmxCreateCOPulseChanTicks(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],constcharsourceTerminal[],int32idleState,int32initialDelay,int32lowTicks,int32highTicks);
![Page 282: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/282.jpg)
PurposeCreateschannel(s)togeneratedigitalpulsesdefinedbythenumberoftimebaseticksthatthepulseisatahighstateandthenumberoftimebaseticksthatthepulseisatalowstateandalsoaddsthechanneltothetaskyouspecifywithtaskHandle.Thepulsesappearonthedefaultoutputterminalofthecounterunlessyouselectadifferentoutputterminal.
![Page 283: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/283.jpg)
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.
![Page 284: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/284.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 285: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/285.jpg)
DAQmxCreateCOPulseChanTimeint32DAQmxCreateCOPulseChanTime(TaskHandletaskHandle,constchar
counter[],constcharnameToAssignToChannel[],int32units,int32idleState,float64initialDelay,float64lowTime,float64highTime);
![Page 286: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/286.jpg)
PurposeCreateschannel(s)togeneratedigitalpulsesdefinedbytheamountoftimethepulseisatahighstateandtheamountoftimethepulseisatalowstateandaddsthechanneltothetaskyouspecifywithtaskHandle.Thepulsesappearonthedefaultoutputterminalofthecounterunlessyouselectadifferentoutputterminal.
![Page 287: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/287.jpg)
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.
![Page 288: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/288.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 289: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/289.jpg)
DAQmxCfgBurstHandshakingTimingExportClockint32DAQmxCfgBurstHandshakingTimingExportClock(TaskHandle
taskHandle,int32sampleMode,uInt64sampsPerChan,float64sampleClkRate,constcharsampleClkOutpTerm[],int32sampleClkPulsePolarity,int32pauseWhen,int32readyEventActiveLevel);
![Page 290: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/290.jpg)
PurposeConfigureswhentheDAQdevicetransfersdatatoaperipheraldevice,usingtheDAQdevice'sonboardsampleclocktocontrolbursthandshakingtiming.
![Page 291: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/291.jpg)
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
![Page 292: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/292.jpg)
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.
![Page 293: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/293.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 294: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/294.jpg)
DAQmxCfgBurstHandshakingTimingImportClockint32DAQmxCfgBurstHandshakingTimingImportClock(TaskHandle
taskHandle,int32sampleMode,uInt64sampsPerChan,float64sampleClkRate,constcharsampleClkSrc[],int32sampleClkActiveEdge,int32pauseWhen,int32readyEventActiveLevel);
![Page 295: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/295.jpg)
PurposeConfigureswhentheDAQdevicetransfersdatatoaperipheraldevice,usinganimportedsampleclocktocontrolbursthandshakingtiming.
![Page 296: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/296.jpg)
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
![Page 297: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/297.jpg)
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.
![Page 298: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/298.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 299: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/299.jpg)
DAQmxCfgChangeDetectionTimingint32DAQmxCfgChangeDetectionTiming(TaskHandletaskHandle,constchar
risingEdgeChan[],constcharfallingEdgeChan[],int32sampleMode,uInt64sampsPerChan);
![Page 300: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/300.jpg)
PurposeConfiguresthetasktoacquiresamplesontherisingand/orfallingedgesofthelinesorportsyouspecify.
![Page 301: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/301.jpg)
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
![Page 302: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/302.jpg)
clockandchangedetectiontimingtypes.
sampsPerChan uInt64 ThenumberofsamplestoacquirefromeachchannelifsampleModeisDAQmx_Val_FiniteSamps.IfsampleModeisDAQmx_Val_ContSamps,NI-DAQmxusesthisvaluetodeterminethebuffersize.
![Page 303: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/303.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 304: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/304.jpg)
DAQmxCfgHandshakingTimingint32DAQmxCfgHandshakingTiming(TaskHandletaskHandle,int32
sampleMode,uInt64sampsPerChanToAcquire);
![Page 305: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/305.jpg)
PurposeDeterminesthenumberofdigitalsamplestoacquireorgenerateusingdigitalhandshakingbetweenthedeviceandaperipheraldevice.
![Page 306: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/306.jpg)
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
![Page 307: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/307.jpg)
types.
sampsPerChanToAcquire uInt64 ThenumberofsamplestoacquireorgenerateforeachchannelinthetaskifsampleModeisDAQmx_Val_FiniteSamps.IfsampleModeisDAQmx_Val_ContSamps,NI-DAQmxusesthisvaluetodeterminethebuffersize.
![Page 308: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/308.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 309: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/309.jpg)
DAQmxCfgImplicitTimingint32DAQmxCfgImplicitTiming(TaskHandletaskHandle,int32sampleMode,
uInt64sampsPerChanToAcquire);
![Page 310: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/310.jpg)
PurposeSetsonlythenumberofsamplestoacquireorgeneratewithoutspecifyingtiming.Typically,youshouldusethisfunctionwhenthetaskdoesnotrequiresampletiming,suchastasksthatusecountersforbufferedfrequencymeasurement,bufferedperiodmeasurement,orpulsetraingeneration.
![Page 311: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/311.jpg)
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
![Page 312: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/312.jpg)
types.
sampsPerChanToAcquire uInt64 ThenumberofsamplestoacquireorgenerateforeachchannelinthetaskifsampleModeisDAQmx_Val_FiniteSamps.IfsampleModeisDAQmx_Val_ContSamps,NI-DAQmxusesthisvaluetodeterminethebuffersize.
![Page 313: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/313.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 314: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/314.jpg)
DAQmxCfgPipelinedSampClkTimingint32DAQmxCfgPipelinedSampClkTiming(TaskHandletaskHandle,constchar
source[],float64rate,int32activeEdge,int32sampleMode,uInt64samplesPerChannel);
![Page 315: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/315.jpg)
PurposeSetsthesourceoftheSampleClock,therateoftheSampleClock,andthenumberofsamplestoacquireorgenerate.ThedeviceacquiresorgeneratessamplesoneachSampleClockedge,butdoesnotrespondtocertaintriggersuntilafewSampleClockedgeslater.Pipeliningallowshigherdatatransferratesatthecostofincreasedtriggerresponselatency.Refertothedevicedocumentationforinformationaboutwhichtriggerspipeliningaffects.ThistimingtypeallowshandshakingusingthePausetrigger,theReadyforTransferevent,ortheDataActiveevent.Refertothedevicedocumentationformoreinformation.ThistimingtypeissupportedonlybytheNI6536andNI6537.
![Page 316: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/316.jpg)
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
![Page 317: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/317.jpg)
continuouslyusinghardwaretimingwithoutabuffer.Hardwaretimedsinglepoint
samplemodeissupportedonlyforthesampleclockandchangedetectiontimingtypes.
sampsPerChanToAcquire uInt64 ThenumberofsamplestoacquireorgenerateforeachchannelinthetaskifsampleModeisDAQmx_Val_FiniteSamps.IfsampleModeisDAQmx_Val_ContSamps,NI-DAQmxusesthisvaluetodeterminethebuffersize.
![Page 318: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/318.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 319: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/319.jpg)
DAQmxCfgSampClkTimingint32DAQmxCfgSampClkTiming(TaskHandletaskHandle,constcharsource[],
float64rate,int32activeEdge,int32sampleMode,uInt64sampsPerChanToAcquire);
![Page 320: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/320.jpg)
PurposeSetsthesourceoftheSampleClock,therateoftheSampleClock,andthenumberofsamplestoacquireorgenerate.
![Page 321: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/321.jpg)
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
![Page 322: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/322.jpg)
continuouslyusinghardwaretimingwithoutabuffer.Hardwaretimedsinglepoint
samplemodeissupportedonlyforthesampleclockandchangedetectiontimingtypes.
sampsPerChanToAcquire uInt64 ThenumberofsamplestoacquireorgenerateforeachchannelinthetaskifsampleModeisDAQmx_Val_FiniteSamps.IfsampleModeisDAQmx_Val_ContSamps,NI-DAQmxusesthisvaluetodeterminethebuffersize.
![Page 323: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/323.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 324: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/324.jpg)
DAQmxCfgAnlgEdgeStartTrigint32DAQmxCfgAnlgEdgeStartTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerSlope,float64triggerLevel);
![Page 325: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/325.jpg)
PurposeConfiguresthetasktostartacquiringorgeneratingsampleswhenananalogsignalcrossesthelevelyouspecify.
![Page 326: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/326.jpg)
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.
![Page 327: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/327.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 328: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/328.jpg)
DAQmxCfgAnlgWindowStartTrigint32DAQmxCfgAnlgWindowStartTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerWhen,float64windowTop,float64windowBottom);
![Page 329: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/329.jpg)
PurposeConfiguresthetasktostartacquiringorgeneratingsampleswhenananalogsignalentersorleavesarangeyouspecify.
![Page 330: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/330.jpg)
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.
![Page 331: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/331.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 332: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/332.jpg)
DAQmxCfgDigEdgeStartTrigint32DAQmxCfgDigEdgeStartTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerEdge);
![Page 333: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/333.jpg)
PurposeConfiguresthetasktostartacquiringorgeneratingsamplesonarisingorfallingedgeofadigitalsignal.
![Page 334: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/334.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
triggerSource constchar[] Thenameofaterminalwherethereisadigitalsignaltouseasthesourceofthetrigger.
triggerEdge int32 Specifiesonwhichedgeofadigitalsignaltostartacquiringorgeneratingsamples.
Value DescriptionDAQmx_Val_Rising Risingedge(s).DAQmx_Val_Falling Fallingedge(s).
![Page 335: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/335.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 336: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/336.jpg)
DAQmxCfgDigPatternStartTrigint32DAQmxCfgDigPatternStartTrig(TaskHandletaskHandle,constchar
triggerSource[],constchartriggerPattern[],int32triggerWhen);
![Page 337: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/337.jpg)
PurposeConfiguresatasktostartacquiringorgeneratingsampleswhenadigitalpatternismatched.
![Page 338: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/338.jpg)
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
![Page 339: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/339.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 340: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/340.jpg)
DAQmxDisableStartTrigint32DAQmxDisableStartTrig(TaskHandletaskHandle);
![Page 341: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/341.jpg)
PurposeConfiguresthetasktostartacquiringorgeneratingsamplesimmediatelyuponstartingthetask.
![Page 342: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/342.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
![Page 343: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/343.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 344: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/344.jpg)
DAQmxCfgAnlgEdgeRefTrigint32DAQmxCfgAnlgEdgeRefTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerSlope,float64triggerLevel,uInt32pretriggerSamples);
![Page 345: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/345.jpg)
PurposeConfiguresthetasktostoptheacquisitionwhenthedeviceacquiresallpretriggersamples,ananalogsignalreachesthelevelyouspecify,andthedeviceacquiresallpost-triggersamples.
![Page 346: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/346.jpg)
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.
![Page 347: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/347.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 348: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/348.jpg)
DAQmxCfgAnlgWindowRefTrigint32DAQmxCfgAnlgWindowRefTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerWhen,float64windowTop,float64windowBottom,uInt32pretriggerSamples);
![Page 349: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/349.jpg)
PurposeConfiguresthetasktostoptheacquisitionwhenthedeviceacquiresallpretriggersamples,ananalogsignalentersorleavesarangeyouspecify,andthedeviceacquiresallpost-triggersamples.
![Page 350: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/350.jpg)
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.
![Page 351: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/351.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 352: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/352.jpg)
DAQmxCfgDigEdgeRefTrigint32DAQmxCfgDigEdgeRefTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerEdge,uInt32pretriggerSamples);
![Page 353: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/353.jpg)
PurposeConfiguresthetasktostoptheacquisitionwhenthedeviceacquiresallpretriggersamples,detectsarisingorfallingedgeofadigitalsignal,andacquiresallposttriggersamples.
![Page 354: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/354.jpg)
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.
![Page 355: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/355.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 356: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/356.jpg)
DAQmxCfgDigPatternRefTrigint32DAQmxCfgDigPatternRefTrig(TaskHandletaskHandle,constchar
triggerSource[],constchartriggerPattern[],int32triggerWhen,uInt32pretriggerSamples);
![Page 357: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/357.jpg)
PurposeConfiguresthetasktostoptheacquisitionwhenthedeviceacquiresallpretriggersamples,matchesordoesnotmatchadigitalpattern,andacquiresallposttriggersamples.
![Page 358: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/358.jpg)
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.
![Page 359: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/359.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 360: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/360.jpg)
DAQmxDisableRefTrigint32DAQmxDisableRefTrig(TaskHandletaskHandle);
![Page 361: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/361.jpg)
PurposeDisablesreferencetriggeringforthemeasurementorgeneration.
![Page 362: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/362.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
![Page 363: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/363.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 364: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/364.jpg)
DAQmxCfgDigEdgeAdvTrigint32DAQmxCfgDigEdgeAdvTrig(TaskHandletaskHandle,constchar
triggerSource[],int32triggerEdge);
![Page 365: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/365.jpg)
PurposeConfiguresaswitchtasktoadvancetothenextentryinascanlistonarisingorfallingedgeofadigitalsignal.
![Page 366: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/366.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
triggerSource constchar[] Theterminalwherethereisadigitalsignaltouseasthesourceofthetrigger.
triggerEdge int32 Specifiesonwhichedgeofadigitalsignaltoadvancetothenextentryinthescanlist.
Value DescriptionDAQmx_Val_Rising Risingedge(s).DAQmx_Val_Falling Fallingedge(s).
![Page 367: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/367.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 368: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/368.jpg)
DAQmxDisableAdvTrigint32DAQmxDisableAdvTrig(TaskHandletaskHandle);
![Page 369: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/369.jpg)
PurposeDisablestheadvancetriggeringforthetask.
![Page 370: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/370.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
![Page 371: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/371.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 372: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/372.jpg)
DAQmxSendSoftwareTriggerint32DAQmxSendSoftwareTrigger(TaskHandletaskHandle,int32triggerID);
![Page 373: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/373.jpg)
PurposeGeneratesthespecifiedsoftwaretrigger.
![Page 374: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/374.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
triggerID int32 Specifieswhichsoftwaretriggertogenerate.
Value DescriptionDAQmx_Val_AdvanceTrigger Generatetheadvance
trigger
![Page 375: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/375.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 376: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/376.jpg)
DAQmxReadAnalogF64int32DAQmxReadAnalogF64(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,float64readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
![Page 377: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/377.jpg)
PurposeReadsmultiplefloating-pointsamplesfromataskthatcontainsoneormoreanaloginputchannels.
![Page 378: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/378.jpg)
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.
![Page 379: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/379.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 380: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/380.jpg)
DAQmxReadAnalogScalarF64int32DAQmxReadAnalogScalarF64(TaskHandletaskHandle,float64timeout,
float64*value,bool32*reserved);
![Page 381: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/381.jpg)
PurposeReadsasinglefloating-pointsamplefromataskthatcontainsasingleanaloginputchannel.
![Page 382: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/382.jpg)
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.
![Page 383: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/383.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 384: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/384.jpg)
DAQmxReadBinaryI16int32DAQmxReadBinaryI16(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,int16readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
![Page 385: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/385.jpg)
PurposeReadsmultipleunscaled,signed16-bitintegersamplesfromataskthatcontainsoneormoreanaloginputchannels.
![Page 386: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/386.jpg)
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.
![Page 387: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/387.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 388: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/388.jpg)
DAQmxReadBinaryI32int32DAQmxReadBinaryI32(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,int32readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
![Page 389: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/389.jpg)
PurposeReadsoneormoreunscaled32-bitsignedintegersamplesfromataskthatcontainsoneormoreanaloginputchannels.
![Page 390: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/390.jpg)
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.
![Page 391: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/391.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 392: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/392.jpg)
DAQmxReadBinaryU16int32DAQmxReadBinaryU16(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,uInt16readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
![Page 393: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/393.jpg)
PurposeReadsmultipleunscaled,unsigned16-bitintegersamplesfromataskthatcontainsoneormoreanaloginputchannels.
![Page 394: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/394.jpg)
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.
![Page 395: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/395.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 396: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/396.jpg)
DAQmxReadBinaryU32int32DAQmxReadBinaryU32(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,uInt32readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
![Page 397: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/397.jpg)
PurposeReadsoneormoreunscaled32-bitunsignedintegersamplesfromataskthatcontainsoneormoreanaloginputchannels.
![Page 398: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/398.jpg)
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.
![Page 399: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/399.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 400: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/400.jpg)
DAQmxReadCounterF64int32DAQmxReadCounterF64(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,float64readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
![Page 401: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/401.jpg)
PurposeReadsmultiplefloating-pointsamplesfromacountertask.Usethisfunctionwhencountersamplesarescaledtoafloating-pointvalue,suchasforfrequencyandperiodmeasurements.
![Page 402: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/402.jpg)
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.
![Page 403: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/403.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 404: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/404.jpg)
DAQmxReadCounterScalarF64int32DAQmxReadCounterScalarF64(TaskHandletaskHandle,float64timeout,
float64*value,bool32*reserved);
![Page 405: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/405.jpg)
PurposeReadsasinglefloating-pointsamplefromacountertask.Usethisfunctionwhenthecountersampleisscaledtoafloating-pointvalue,suchasforfrequencyandperiodmeasurement.
![Page 406: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/406.jpg)
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.
![Page 407: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/407.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 408: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/408.jpg)
DAQmxReadCounterScalarU32int32DAQmxReadCounterScalarU32(TaskHandletaskHandle,float64timeout,
uInt32*value,bool32*reserved);
![Page 409: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/409.jpg)
PurposeReadsa32-bitintegersamplefromacountertask.Usethisfunctionwhenthecountersampleisreturnedunscaled,suchasforedgecounting.
![Page 410: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/410.jpg)
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.
![Page 411: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/411.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 412: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/412.jpg)
DAQmxReadCounterU32int32DAQmxReadCounterU32(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,uInt32readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
![Page 413: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/413.jpg)
PurposeReadsmultiple32-bitintegersamplesfromacountertask.Usethisfunctionwhencountersamplesarereturnedunscaled,suchasforedgecounting.
![Page 414: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/414.jpg)
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.
![Page 415: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/415.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 416: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/416.jpg)
DAQmxReadDigitalLinesint32DAQmxReadDigitalLines(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,uInt8readArray[],uInt32arraySizeInBytes,int32*sampsPerChanRead,int32*numBytesPerSamp,bool32*reserved);
![Page 417: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/417.jpg)
PurposeReadsmultiplesamplesfromeachdigitallineinatask.Eachlineinachannelgetsonebytepersample.
![Page 418: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/418.jpg)
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.
![Page 419: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/419.jpg)
numBytesPerSamp int32* ThenumberofelementsinreadArraythatconstitutesasampleperchannel.Foreachsampleperchannel,numBytesPerSampisthenumberofbytesthatchannelconsistsof.
![Page 420: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/420.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 421: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/421.jpg)
DAQmxReadDigitalScalarU32int32DAQmxReadDigitalScalarU32(TaskHandletaskHandle,float64timeout,
uInt32*value,bool32*reserved);
![Page 422: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/422.jpg)
PurposeReadsasingle32-bitintegersamplefromataskthatcontainsasingledigitalinputchannel.Usethisfunctionfordeviceswithupto32linesperport.Thesampleisreturnedinunsignedintegerformat.
![Page 423: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/423.jpg)
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.
![Page 424: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/424.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 425: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/425.jpg)
DAQmxReadDigitalU8int32DAQmxReadDigitalU8(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,uInt8readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
![Page 426: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/426.jpg)
PurposeReadsmultiple8-bitintegersamplesfromataskthathasoneormoremultipledigitalinputchannels.Usethisfunctionfordeviceswithupto8linesperport.Thesamplesarereturnedinunsignedbyteformat.
![Page 427: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/427.jpg)
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.
![Page 428: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/428.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 429: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/429.jpg)
DAQmxReadDigitalU16int32DAQmxReadDigitalU16(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,uInt16readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
![Page 430: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/430.jpg)
PurposeReadsmultiple16-bitintegersamplesfromataskthatcontainsoneormoredigitalinputchannels.Usethisfunctionfordeviceswithupto16linesperport.Thesamplesarereturnedinunsignedintegerformat.
![Page 431: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/431.jpg)
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.
![Page 432: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/432.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 433: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/433.jpg)
DAQmxReadDigitalU32int32DAQmxReadDigitalU32(TaskHandletaskHandle,int32
numSampsPerChan,float64timeout,bool32fillMode,uInt32readArray[],uInt32arraySizeInSamps,int32*sampsPerChanRead,bool32*reserved);
![Page 434: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/434.jpg)
PurposeReadsmultiple32-bitintegersamplesfromataskthatcontainsoneormoredigitalinputchannels.Usethisfunctionfordeviceswithupto32linesperport.Thesamplesarereturnedinunsignedintegerformat.
![Page 435: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/435.jpg)
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.
![Page 436: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/436.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 437: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/437.jpg)
DAQmxGetNthTaskReadChannelint32DAQmxGetNthTaskReadChannel(TaskHandletaskHandle,uInt32index,
charbuffer[],int32bufferSize);
![Page 438: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/438.jpg)
PurposeTakesatask,anindex,andauserdeclaredbufferwithsize.ItfillsoutthebufferwiththeNthchannelasrequestedbytheuserintheindex.Thiscomesfromallthechannelsinthetask.Indexingstartsat1.
![Page 439: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/439.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
index uInt32 TheNthchanneltoreturn.Theindexstartsat1.
bufferSize int32 Thesize,inbytes,ofbuffer.Ifyoupass0,thisfunctionreturnsthenumberofbytesneededtoallocate.
Output
buffer char[] TheNthchannelintheindex.IfyoupassNULL,thisfunctionreturnsthenumberofbytesneededtoallocate.
![Page 440: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/440.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.Forthisfunction,ifyoupassNULLforthebufferor0forthebuffersize,thisfunctionreturnsthenumberofbytesneededtoallocate.
![Page 441: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/441.jpg)
DAQmxReadRawint32DAQmxReadRaw(TaskHandletaskHandle,int32numSampsPerChan,
float64timeout,void*readArray,uInt32arraySizeInBytes,int32*sampsRead,int32*numBytesPerSamp,bool32*reserved);
![Page 442: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/442.jpg)
PurposeReadsrawsamplesdirectlyfromtheinputlines.Thereisnoscaling,parsing,orseparationofthesamples.Refertothespecificationsforyourdevicetodeterminetheformatoftheincomingsamples.
![Page 443: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/443.jpg)
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.
![Page 444: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/444.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 445: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/445.jpg)
DAQmxWriteAnalogF64int32DAQmxWriteAnalogF64(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,float64writeArray[],int32*sampsPerChanWritten,bool32*reserved);
![Page 446: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/446.jpg)
PurposeWritesmultiplefloating-pointsamplestoataskthatcontainsoneormoreanalogoutputchannels.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeof2samples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
![Page 447: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/447.jpg)
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.
![Page 448: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/448.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 449: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/449.jpg)
DAQmxWriteAnalogScalarF64int32DAQmxWriteAnalogScalarF64(TaskHandletaskHandle,bool32autoStart,
float64timeout,float64value,bool32*reserved);
![Page 450: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/450.jpg)
PurposeWritesafloating-pointsampletoataskthatcontainsasingleanalogoutputchannel.
![Page 451: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/451.jpg)
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.
![Page 452: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/452.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 453: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/453.jpg)
DAQmxWriteBinaryI16int32DAQmxWriteBinaryI16(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,int16writeArray[],int32*sampsPerChanWritten,bool32*reserved);
![Page 454: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/454.jpg)
PurposeWritesunscaledsignedintegersamplestothetask.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeof2samples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
![Page 455: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/455.jpg)
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.
![Page 456: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/456.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 457: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/457.jpg)
DAQmxWriteBinaryU16int32DAQmxWriteBinaryU16(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,uInt16writeArray[],int32*sampsPerChanWritten,bool32*reserved);
![Page 458: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/458.jpg)
PurposeWritesunscaled,unsigned16-bitintegersamplestothetask.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeof2samples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
![Page 459: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/459.jpg)
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.
![Page 460: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/460.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 461: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/461.jpg)
DAQmxWriteCtrFreqint32DAQmxWriteCtrFreq(TaskHandletaskHandle,int32numSampsPerChan,
bool32autoStart,float64timeout,bool32dataLayout,float64frequency[],float64dutyCycle[],int32*numSampsPerChanWritten,bool32*reserved);
![Page 462: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/462.jpg)
PurposeWritesanewpulsefrequencyanddutycycletoeachchannelinacontinuouscounteroutputtaskthatcontainsoneormorechannels.
![Page 463: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/463.jpg)
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.
![Page 464: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/464.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 465: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/465.jpg)
DAQmxWriteCtrFreqScalarint32DAQmxWriteCtrFreqScalar(TaskHandletaskHandle,bool32autoStart,
float64timeout,float64frequency,float64dutyCycle,bool32*reserved);
![Page 466: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/466.jpg)
PurposeWritesanewpulsefrequencyanddutycycletoacontinuouscounteroutputtaskthatcontainsasinglechannel.
![Page 467: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/467.jpg)
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.
![Page 468: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/468.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 469: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/469.jpg)
DAQmxWriteCtrTicksint32DAQmxWriteCtrTicks(TaskHandletaskHandle,int32numSampsPerChan,
bool32autoStart,float64timeout,bool32dataLayout,uInt32highTicks[],uInt32lowTicks[],int32*numSampsPerChanWritten,bool32*reserved);
![Page 470: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/470.jpg)
PurposeWritesnewpulsehightickcountsandlowtickcountstoeachchannelinacontinuouscounteroutputtaskthatcontainsoneormorechannels.
![Page 471: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/471.jpg)
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.
![Page 472: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/472.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 473: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/473.jpg)
DAQmxWriteCtrTicksScalarint32DAQmxWriteCtrTicksScalar(TaskHandletaskHandle,bool32autoStart,
float64timeout,uInt32highTicks,uInt32lowTicks,bool32*reserved);
![Page 474: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/474.jpg)
PurposeWritesanewpulsehightickcountandlowtickcounttoacontinuouscounteroutputtaskthatcontainsasinglechannel.
![Page 475: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/475.jpg)
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.
![Page 476: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/476.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 477: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/477.jpg)
DAQmxWriteCtrTimeint32DAQmxWriteCtrTime(TaskHandletaskHandle,int32numSampsPerChan,
bool32autoStart,float64timeout,bool32dataLayout,float64highTime[],float64lowTime[],int32*numSampsPerChanWritten,bool32*reserved);
![Page 478: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/478.jpg)
PurposeWritesanewpulsehightimeandlowtimetoeachchannelinacontinuouscounteroutputtaskthatcontainsoneormorechannels.
![Page 479: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/479.jpg)
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.
![Page 480: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/480.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 481: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/481.jpg)
DAQmxWriteCtrTimeScalarint32DAQmxWriteCtrTimeScalar(TaskHandletaskHandle,bool32autoStart,
float64timeout,float64highTime,float64lowTime,bool32*reserved);
![Page 482: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/482.jpg)
PurposeWritesanewpulsehightimeandlowtimetoacontinuouscounteroutputtaskthatcontainsasinglechannel.
![Page 483: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/483.jpg)
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.
![Page 484: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/484.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 485: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/485.jpg)
DAQmxWriteDigitalLinesint32DAQmxWriteDigitalLines(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,uInt8writeArray[],int32*sampsPerChanWritten,bool32*reserved);
![Page 486: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/486.jpg)
PurposeWritesmultiplesamplestoeachdigitallineinatask.Whenyoucreateyourwritearray,eachsampleperchannelmustcontainthenumberofbytesreturnedbytheDAQmx_Read_DigitalLines_BytesPerChanproperty.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeof2samples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
![Page 487: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/487.jpg)
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.
![Page 488: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/488.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 489: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/489.jpg)
DAQmxWriteDigitalScalarU32int32DAQmxWriteDigitalScalarU32(TaskHandletaskHandle,bool32autoStart,
float64timeout,uInt32value,bool32*reserved);
![Page 490: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/490.jpg)
PurposeWritesasingle32-bitunsignedintegersampletoataskthatcontainsasingledigitaloutputchannel.Usethisformatfordeviceswithupto32linesperport.
![Page 491: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/491.jpg)
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.
![Page 492: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/492.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 493: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/493.jpg)
DAQmxWriteDigitalU8int32DAQmxWriteDigitalU8(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,uInt8writeArray[],int32*sampsPerChanWritten,bool32*reserved);
![Page 494: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/494.jpg)
PurposeWritesmultiple8-bitunsignedintegersamplestoataskthatcontainsoneormoredigitaloutputchannels.Usethisformatfordeviceswithupto8linesperport.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeoftwosamples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
![Page 495: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/495.jpg)
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.
![Page 496: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/496.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 497: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/497.jpg)
DAQmxWriteDigitalU16int32DAQmxWriteDigitalU16(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,uInt16writeArray[],int32*sampsPerChanWritten,bool32*reserved);
![Page 498: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/498.jpg)
PurposeWritesmultiple16-bitunsignedintegersamplestoataskthatcontainsoneormoredigitaloutputchannels.Usethisformatfordeviceswithupto16linesperport.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeoftwosamples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
![Page 499: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/499.jpg)
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.
![Page 500: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/500.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 501: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/501.jpg)
DAQmxWriteDigitalU32int32DAQmxWriteDigitalU32(TaskHandletaskHandle,int32
numSampsPerChan,bool32autoStart,float64timeout,bool32dataLayout,uInt32writeArray[],int32*sampsPerChanWritten,bool32*reserved);
![Page 502: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/502.jpg)
PurposeWritesmultiple32-bitunsignedintegersamplestoataskthatcontainsoneormoredigitaloutputchannels.Usethisformatfordeviceswithupto32linesperport.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeoftwosamples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
![Page 503: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/503.jpg)
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.
![Page 504: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/504.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 505: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/505.jpg)
DAQmxWriteRawint32DAQmxWriteRaw(TaskHandletaskHandle,int32numSamps,bool32
autoStart,float64timeout,void*writeArray,int32*sampsPerChanWritten,bool32*reserved);
![Page 506: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/506.jpg)
PurposeWritesrawsamplestoatask.Thereisnoscaling,parsing,orseparationofthesamples.Refertothespecificationsforyourinstrumenttodeterminetheformatoftheincomingsamples.
NoteIfyouconfiguredtimingforyourtask,yourwriteisconsideredabufferedwrite.Bufferedwritesrequireaminimumbuffersizeof2samples.IfyoudonotconfigurethebuffersizeusingDAQmxCfgOutputBuffer,NI-DAQmxautomaticallyconfiguresthebufferwhenyouconfiguresampletiming.Ifyouattempttowriteonesampleforabufferedwritewithoutconfiguringthebuffer,youwillreceiveanerror.
![Page 507: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/507.jpg)
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.
![Page 508: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/508.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 509: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/509.jpg)
DAQmxExportSignalint32DAQmxExportSignal(TaskHandletaskHandle,int32signalID,constchar
outputTerminal[]);
![Page 510: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/510.jpg)
PurposeRoutesacontrolsignaltothespecifiedterminal.Theoutputterminalcanresideonthedevicethatgeneratesthecontrolsignaloronadifferentdevice.Usethisfunctiontoshareclocksandtriggersbetweenmultipletasksanddevices.Theroutescreatedbythisfunctionaretask-basedroutes.
![Page 511: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/511.jpg)
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
![Page 512: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/512.jpg)
arederivedfromthisclock.
DAQmx_Val_SampleClock Clockthedeviceusestotimeeachsample.
DAQmx_Val_AdvanceTrigger Triggerthatmovesaswitchtothenextentryinascanlist.
DAQmx_Val_ReferenceTrigger Triggerthatestablishesthereferencepointbetweenpretriggerandposttriggersamples.
DAQmx_Val_StartTrigger Triggerthatbeginsameasurementorgeneration.
DAQmx_Val_AdvCmpltEvent Signalthataswitchproductgeneratesafteritbothexecutesthecommand(s)inascanlistentryandwaitsforthesettlingtime
![Page 513: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/513.jpg)
toelapse.DAQmx_Val_AIHoldCmpltEvent Signalthat
anESeriesorMSeriesdevicegenerateswhenthedevicelatchesanaloginputdata(theADCenters"hold"mode)anditissafeforanyexternalswitchinghardwaretoremovethesignalandreplaceitwiththenextsignal.Thiseventdoesnotindicatethecompletionoftheactualanalog-to-digitalconversion.
DAQmx_Val_CounterOutputEvent Signalthatacountergenerates.Eachtimethecounterreachesterminal
![Page 514: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/514.jpg)
count,thissignaltogglesorpulses.
DAQmx_Val_ChangeDetectionEvent SignalthatastaticDIOdevicegenerateswhenthedevicedetectsarisingorfallingedgeonanyofthelinesorportsyouselectedwhenyouconfiguredchangedetectiontiming.
DAQmx_Val_WDTExpiredEvent SignalthatastaticDIOdevicegenerateswhenthewatchdogtimerexpires.
outputTerminal constchar[] Thedestinationterminaloftheexportedsignal.
![Page 515: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/515.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 516: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/516.jpg)
DAQmxCalculateReversePolyCoeffint32DAQmxCalculateReversePolyCoeff(float64forwardCoeffs[],uInt32
numForwardCoeffsIn,float64minValX,float64maxValX,int32numPointsToCompute,int32reversePolyOrder,float64reverseCoeffs[]);
![Page 517: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/517.jpg)
PurposeComputesasetofcoefficientsforapolynomialthatapproximatestheinverseofthepolynomialwiththecoefficientsyouspecifywithforwardCoeffs.Thefunctiongeneratesatableofxversusyvaluesovertherangeofx.Thefunctionthenfindsapolynomialfit,usingtheleastsquaresmethodtocomputeapolynomialthatcomputesanxgivenay.
![Page 518: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/518.jpg)
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.
![Page 519: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/519.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 520: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/520.jpg)
DAQmxCreateLinScaleint32DAQmxCreateLinScale(constcharname[],float64slope,float64
yIntercept,int32preScaledUnits,constcharscaledUnits[]);
![Page 521: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/521.jpg)
PurposeCreatesandconfiguresascalethatusestheequationy=mx+b,wherexistheprescaledvalueandyisthescaledvalue.Theequationisidenticalforinputandoutput.Ifyourequationisintheformx=my+b,youmustfirstsolveforyintermsofx.
![Page 522: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/522.jpg)
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.
![Page 523: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/523.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 524: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/524.jpg)
DAQmxCreateMapScaleint32DAQmxCreateMapScale(constcharname[],float64prescaledMin,float64
prescaledMax,float64scaledMin,float64scaledMax,int32preScaledUnits,constcharscaledUnits[]);
![Page 525: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/525.jpg)
PurposeCreatesandconfiguresascalethatscalesvaluesproportionallyfromarangeofprescaledvaluestoarangeofscaledvalues.
![Page 526: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/526.jpg)
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
![Page 527: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/527.jpg)
DAQmx_Val_FromTEDS UnitsdefinedbyTEDSinformationassociatedwiththechannel.
scaledUnits constchar[] Theunitsyouwanttouseforthescaledvalue.Youcanuseanarbitraryvalue.
![Page 528: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/528.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 529: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/529.jpg)
DAQmxCreatePolynomialScaleint32DAQmxCreatePolynomialScale(constcharname[],float64
forwardCoeffs[],uInt32numForwardCoeffsIn,float64reverseCoeffs[],uInt32numReverseCoeffsIn,int32preScaledUnits,constcharscaledUnits[]);
![Page 530: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/530.jpg)
PurposeCreatesandconfiguresascalethatusesannthorderpolynomialequation.NI-DAQmxrequiresbothapolynomialtoconvertprescaledvaluestoscaledvalues(forward)andapolynomialtoconvertscaledvaluestoprescaledvalues(reverse).Ifyouknowonlyonesetofcoefficients,useDAQmxCalculateReversePolyCoefftogeneratetheotherset.
![Page 531: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/531.jpg)
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
![Page 532: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/532.jpg)
equalto9.81m/s2.
DAQmx_Val_Pascals pascalsDAQmx_Val_FromTEDS Unitsdefinedby
TEDSinformationassociatedwiththechannel.
scaledUnits constchar[] Theunitsyouwanttouseforthescaledvalue.Youcanuseanarbitraryvalue.
![Page 533: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/533.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 534: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/534.jpg)
DAQmxCreateTableScaleint32DAQmxCreateTableScale(constcharname[],float64prescaledVals[],
uInt32numPrescaledValsIn,float64scaledVals[],uInt32numScaledValsIn,int32preScaledUnits,constcharscaledUnits[]);
![Page 535: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/535.jpg)
PurposeCreatesandconfiguresascalethatmapsanarrayofprescaledvaluestoanarrayofcorrespondingscaledvalues.NI-DAQmxapplieslinearinterpolationtovaluesthatfallbetweenthevaluesinthetable.Readoperationsclipscaledsamplesthatareoutsidethemaximumandminimumscaledvaluesfoundinthetable.Writeoperationsgenerateerrorsforsamplesthatareoutsidetheminimumandmaximumscaledvaluesfoundinthetable.
![Page 536: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/536.jpg)
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
![Page 537: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/537.jpg)
TEDSinformationassociatedwiththechannel.
scaledUnits constchar[] Theunitsyouwanttouseforthescaledvalue.Youcanuseanarbitraryvalue.
![Page 538: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/538.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 539: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/539.jpg)
DAQmxCfgInputBufferint32DAQmxCfgInputBuffer(TaskHandletaskHandle,uInt32
numSampsPerChan);
![Page 540: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/540.jpg)
PurposeOverridestheautomaticinputbufferallocationthatNI-DAQmxperforms.
![Page 541: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/541.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
numSampsPerChan uInt32 Thenumberofsamplesthebuffercanholdforeachchannelinthetask.Zeroindicatesnobuffershouldbeallocated.Useabuffersizeof0toperformahardware-timedoperationwithoutusingabuffer.
![Page 542: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/542.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 543: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/543.jpg)
DAQmxCfgOutputBufferint32DAQmxCfgOutputBuffer(TaskHandletaskHandle,uInt32
numSampsPerChan);
![Page 544: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/544.jpg)
PurposeOverridestheautomaticoutputbufferallocationthatNI-DAQmxperforms.
![Page 545: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/545.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
numSampsPerChan uInt32 Thenumberofsamplesthebuffercanholdforeachchannelinthetask.Zeroindicatesnobuffershouldbeallocated.Useabuffersizeof0toperformahardware-timedoperationwithoutusingabuffer.
![Page 546: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/546.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 547: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/547.jpg)
DAQmxWaitForNextSampleClockint32DAQmxWaitForNextSampleClock(TaskHandletaskHandle,float64
timeout,bool32*isLate);
![Page 548: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/548.jpg)
PurposeWaitsuntilthenextpulseoftheSampleClockoccurs.IfanextraSampleClockpulseoccursbetweencallstothisfunction,thesecondcallreturnsanerrororwarningandwaitsforthenextSampleClockpulse.Usetheget/set/resetfunctionsfortheRealTimeConvLateErrorsToWarningspropertytospecifywhetherthisfunctionreturnserrorsorwarnings.UsethisfunctiontoensureI/OcyclescompletewithinSampleClockperiods.NationalInstrumentsrecommendsyouusethisfunctionforcertainapplicationsonly.UsetheDAQmxReal-Timepropertiestoconfigureerrorreportingandwaitingoptions.
![Page 549: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/549.jpg)
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.
![Page 550: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/550.jpg)
ReturnValueName Type Description
isLate int32 IndicatesifthisfunctiondetectedanextraSampleClockpulseafterthespecifiednumberofwarmupiterationsexecute.IfyouareusingtheCAPI,useDAQmxSetRealTimeNumOfWarmupIterstospecifythenumberofwarmupiterations.IfyouareusingtheCVIAPI,useDAQmxSetRealTimeAttributetospecifythenumberofiterations.ThisoutputisalwaysFALSEuntilthatnumberofloopiterationsexecute.
![Page 551: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/551.jpg)
DAQmxWaitUntilTaskDoneint32DAQmxWaitUntilTaskDone(TaskHandletaskHandle,float64
timeToWait);
![Page 552: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/552.jpg)
PurposeWaitsforthemeasurementorgenerationtocomplete.Usethisfunctiontoensurethatthespecifiedoperationiscompletebeforeyoustopthetask.
![Page 553: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/553.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
timeToWait float64 Themaximumamountoftime,inseconds,towaitforthemeasurementorgenerationtocomplete.Thefunctionreturnsanerrorifthetimeelapsesbeforethemeasurementorgenerationiscomplete.Avalueof-1(DAQmx_Val_WaitInfinitely)meanstowaitindefinitely.IfyousettimeToWaitto0,thefunctionchecksonceandreturnsanerrorifthemeasurementorgenerationisnotdone.
![Page 554: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/554.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 555: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/555.jpg)
ObsoleteThisfunctionisobsoleteandnowalwaysreturnszero.Theinformationbelownolongerappliesbutisprovidedforreference.
![Page 556: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/556.jpg)
DAQmxIsReadOrWriteLatebool32DAQmxIsReadOrWriteLate(int32errorCode);
![Page 557: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/557.jpg)
PurposeReturnsTRUEifaDAQmxReadfunctionorDAQmxWritefunctiondidnotexecuteinrealtime.
![Page 558: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/558.jpg)
ParametersInput
Name Type Description
errorCode int32 AnerrorcodeorwarningreturnedbyoneoftheNI-DAQmxLibraryReadorWritefunctions.
![Page 559: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/559.jpg)
ReturnValueName Type Description
isLate int32 Avalueof0indicatesthereadorwritefunctionexecutedinrealtime.Avalueof1indicatesthefunctiondidnotexecuteinrealtime.
![Page 560: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/560.jpg)
DAQmxSwitchCloseRelaysint32DAQmxSwitchCloseRelays(constcharrelays[],bool32waitForSettling);
![Page 561: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/561.jpg)
PurposeClosesthespecifiedrelays.IfyousetwaitForSettlingtoTRUE,thisfunctionwaitsonlyafterclosingallrelays.Ifyouwanttowaitforsettlingafterclosingeachrelay,usethisfunctionmultipletimestocloseeachrelayseparately.Whenyouoperaterelaysdirectly,youcircumventtheprotectionthatchannelusagetypesoffer.AvoidusingthisfunctionwhenyouusetheDAQmxSwitchConnectfunctionortheDAQmxSwitchDisconnectfunction.Thisfunctiondoesnotpassthechangesyoumaketothosefunctions.
![Page 562: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/562.jpg)
ParametersInput
Name Type Description
relays constchar[] Asetofrelaystoclose.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
![Page 563: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/563.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 564: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/564.jpg)
DAQmxSwitchConnectint32DAQmxSwitchConnect(constcharswitchChannel1[],constchar
switchChannel2[],bool32waitForSettling);
![Page 565: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/565.jpg)
PurposeMakesaconnectionbetweentwoswitchchannels.Whenusingthisfunction,specifyonlythetwoconnectionendpointsusingswitchChannel1andswitchChannel2.Thefunctionthenattemptstofindanavailablepathbetweenthetwochannels.
![Page 566: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/566.jpg)
ParametersInput
Name Type Description
switchChannel1 constchar[] Thefirstchanneltoconnect.
switchChannel2 constchar[] Thesecondchanneltoconnect.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
![Page 567: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/567.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 568: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/568.jpg)
DAQmxSwitchConnectMultiint32DAQmxSwitchConnectMulti(constcharconnectionList[],bool32
waitForSettling);
![Page 569: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/569.jpg)
PurposeMakesoneormoreconnectionsspecifiedbyaconnectionlist.Youcanspecifyonlythetwoendpoints,oryoucanspecifytheexplicitpathbetweentwoendpoints.Thisfunctioncanmakeconnectionsonmultipledevices,buteachconnectionmustresideonasingledevice.Intheeventofanerror,connectingstopsatthepointinthelistwheretheerroroccurred.IfyousetwaitForSettlingtoTRUE,thisfunctionreturnsonlyaftermakingallconnections.Ifyouwanttowaitforsettlingbetweenconnections,usethisfunctionmultipletimestomakeconnectionsseparately.
![Page 570: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/570.jpg)
ParametersInput
Name Type Description
connectionList constchar[] Alistofconnections,usingaspecialsyntax,tomakebetweenswitchchannels.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
![Page 571: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/571.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 572: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/572.jpg)
DAQmxSwitchCreateScanListint32DAQmxSwitchCreateScanList(constcharscanList[],TaskHandle
*taskHandle);
![Page 573: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/573.jpg)
PurposeCreatesanewswitchscanningtaskthatusesthespecifiedscanlistandappliesittothespecifiedtask.
![Page 574: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/574.jpg)
ParametersInput
Name Type Description
scanList constchar[] Usesaspecialsyntaxtospecifythesequenceofconnectionsanddisconnectionsforthetask.
Output
Name Type Description
taskHandle TaskHandle* Thetaskcreatedbythisfunction.
![Page 575: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/575.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 576: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/576.jpg)
DAQmxSwitchDisconnectint32DAQmxSwitchDisconnect(constcharswitchChannel1[],constchar
switchChannel2[],bool32waitForSettling);
![Page 577: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/577.jpg)
PurposeDisconnectstwoswitchchannels.Whenusingthisfunction,specifyonlythetwoconnectionendpointsswitchChannel1andswitchChannel2.
![Page 578: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/578.jpg)
ParametersInput
Name Type Description
switchChannel1 constchar[] Thefirstchanneltodisconnect.
switchChannel2 constchar[] Thesecondchanneltodisconnect.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
![Page 579: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/579.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 580: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/580.jpg)
DAQmxSwitchDisconnectAllint32DAQmxSwitchDisconnectAll(constchardeviceName[],bool32
waitForSettling);
![Page 581: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/581.jpg)
PurposeTerminatesallactiveconnectionsonthedevice,whichplacestherelaysintothetopologyresetstate.YoucanusethisfunctiontoterminateconnectionsmadebyDAQmxSwitchConnect,DAQmxSwitchOpenRelays,orDAQmxSwitchCloseRelays.Thisfunctiondoesnotalterthesettlingtimeorchannelusagesettings.Toresetthosesettings,useDAQmxResetDeviceorDAQmxSwitchSetTopologyAndReset.IfyousetwaitForSettlingtoTRUE,thisfunctionreturnsonlyafterterminatingallconnections.Ifyouwanttowaitforsettlingbetweendisconnections,usetheDAQmxSwitchDisconnectfunctionmultipletimestoterminateconnectionsseparately.
![Page 582: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/582.jpg)
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
![Page 583: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/583.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 584: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/584.jpg)
DAQmxSwitchDisconnectMultiint32DAQmxSwitchDisconnectMulti(constcharconnectionList[],bool32
waitForSettling);
![Page 585: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/585.jpg)
PurposeTerminatesoneormoreconnectionsspecifiedbyaconnectionlist.Thisfunctioncanterminateconnectionsonmultipledevices.Intheeventofanerror,thefunctionstopsatthepointinthelistwheretheerroroccurred.IfyousetwaitForSettlingtoTRUE,thisfunctionreturnsonlyafterterminatingallconnections.Ifyouwanttowaitforsettlingbetweendisconnections,usethisfunctionmultipletimestoterminateconnectionsseparately.
![Page 586: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/586.jpg)
ParametersInput
Name Type Description
connectionList constchar[] Usesaspecialsyntaxtospecifythelistofswitchconnectionstoterminate.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
![Page 587: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/587.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 588: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/588.jpg)
DAQmxSwitchFindPathint32DAQmxSwitchFindPath(constcharswitchChannel1[],constchar
switchChannel2[],charpath[],uInt32pathBufferSize,int32*pathStatus);
![Page 589: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/589.jpg)
PurposeReturnsinformationaboutthepathbetweenswitchChannel1andswitchChannel2.Ifthechannelsareconnected,thisfunctionreturnsthepathbywhichtheyareconnected.Ifthechannelsarenotconnected,thefunctionreturnsapathbywhichtheycouldbeconnected,ifoneisavailable.
![Page 590: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/590.jpg)
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
![Page 591: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/591.jpg)
DAQmx_Val_PathStatus_ChannelInUse
DAQmx_Val_PathStatus_SourceChannelConflict
DAQmx_Val_PathStatus_ChannelReservedForRouting
![Page 592: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/592.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.Forthisfunction,ifyoupassNULLforthebufferor0forthebuffersize,thisfunctionreturnsthenumberofbytesneededtoallocate.
![Page 593: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/593.jpg)
DAQmxSwitchGetMultiRelayCountint32DAQmxSwitchGetMultiRelayCount(constcharrelayList[],uInt32
count[],uInt32countArraySize,uInt32*numRelayCountsRead);
![Page 594: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/594.jpg)
PurposeReturnsthenumberoftimesasetofrelayshavebeenactuated.Usethisfunctiontotrackrelaylifetimeandusage.YoumustsetthewaitForSettlingparameterofSwitchfunctionstoTRUEtoobtainanaccuraterelaycount.
![Page 595: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/595.jpg)
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.
![Page 596: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/596.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.Forthisfunction,ifyoupassNULLforthebufferor0forthebuffersize,thisfunctionreturnsthenumberofsamplesneededtoallocate.Forexample,malloc(n*sizeof(uInt32));
![Page 597: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/597.jpg)
DAQmxSwitchGetMultiRelayPosint32DAQmxSwitchGetMultiRelayPos(constcharrelayList[],uInt32
relayPos[],uInt32relayPosArraySize,uInt32*numRelayPosRead);
![Page 598: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/598.jpg)
PurposeReturnsthecurrentpositionofasetofrelays.
![Page 599: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/599.jpg)
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.
![Page 600: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/600.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.Forthisfunction,ifyoupassNULLforthebufferor0forthebuffersize,thisfunctionreturnsthenumberofsamplesneededtoallocate.Forexample,malloc(n*sizeof(uInt32));
![Page 601: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/601.jpg)
DAQmxSwitchGetSingleRelayCountint32DAQmxSwitchGetSingleRelayCount(constcharrelayName[],uInt32
*count);
![Page 602: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/602.jpg)
PurposeReturnsthenumberoftimesasinglerelayhasbeenactuated.Usethisfunctiontotrackrelaylifetimeandusage.YoumustsetthewaitForSettlingparameterofSwitchfunctionstoTRUEtoobtainanaccuraterelaycount.
![Page 603: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/603.jpg)
ParametersInput
Name Type Description
relayName constchar[] Therelayyouwanttoquery.
Output
Name Type Description
count uInt32* Thenumberoftimestherelayhasbeenactuated.
![Page 604: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/604.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 605: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/605.jpg)
DAQmxSwitchGetSingleRelayPosint32DAQmxSwitchGetSingleRelayPos(constcharrelayName[],uInt32
*relayPos);
![Page 606: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/606.jpg)
PurposeReturnsthecurrentpositionofasinglerelay.
![Page 607: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/607.jpg)
ParametersInput
Name Type Description
relayName constchar[] Therelayyouwanttoquery.
Output
Name Type Description
relayPos uInt32* Thepositionoftherelay.
Value DescriptionDAQmx_Val_Open Relayisopen.DAQmx_Val_Closed Relayisclosed.
![Page 608: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/608.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 609: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/609.jpg)
DAQmxSwitchOpenRelaysint32DAQmxSwitchOpenRelays(constcharrelays[],bool32waitForSettling);
![Page 610: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/610.jpg)
PurposeOpensthespecifiedrelays.IfyousetwaitForSettlingtoTRUE,thisfunctionwaitsonlyafteropeningallrelays.Ifyouwanttowaitforsettlingafteropeningeachrelay,usethisfunctionmultipletimestoopeneachrelayseparately.Whenyouoperaterelaysdirectly,youcircumventtheprotectionofferedchannelusagetypes.AvoidusingthisfunctionwhenyouuseDAQmxSwitchConnectandDAQmxSwitchDisconnect.Thisfunctiondoesnotpassthechangesyoumaketothosefunctions.
![Page 611: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/611.jpg)
ParametersInput
Name Type Description
relays constchar[] Asetofrelaystoopen.
waitForSettling bool32 IfTRUE,thisfunctionwaitsfortheswitchestosettlebeforereturning.IfFALSE,thefunctionreturnsimmediatelyaftertheoperation.
![Page 612: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/612.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 613: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/613.jpg)
DAQmxSwitchSetTopologyAndResetint32DAQmxSwitchSetTopologyAndReset(constchardeviceName[],const
charnewTopology[]);
![Page 614: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/614.jpg)
PurposeResetsaswitchdeviceandsetsitstopologytotheonespecifiedwithnewTopology.Usethisfunctiontoinitializeaswitchdevicebeforescanningormakingconnectionstoensuretheinitialstateofthatswitch.ThisfunctiondiffersfromDAQmxResetDevicebecauseitusestheinputtopologynameratherthantheoneyouspecifyinMAX.ThisfunctiondoesnotmodifythechannelusagedefaultsyouconfigureinMAX.
![Page 615: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/615.jpg)
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
![Page 616: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/616.jpg)
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
![Page 617: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/617.jpg)
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
![Page 618: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/618.jpg)
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
![Page 619: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/619.jpg)
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
![Page 620: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/620.jpg)
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
![Page 621: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/621.jpg)
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
![Page 622: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/622.jpg)
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
![Page 623: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/623.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 624: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/624.jpg)
DAQmxSwitchWaitForSettlingint32DAQmxSwitchWaitForSettling(constchardeviceName[]);
![Page 625: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/625.jpg)
PurposeWaitsforthesettlingtimeonthedevicetoexpire.Thedeviceresetsthistimeandbeginscountingdownagainwhenthedeviceperformsanoperation.Thisfunctioncanreturnimmediatelyifnooperationhappenedrecently.
![Page 626: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/626.jpg)
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
![Page 627: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/627.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 628: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/628.jpg)
DAQmxConnectTermsint32DAQmxConnectTerms(constcharsourceTerminal[],constchar
destinationTerminal[],int32signalModifiers);
![Page 629: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/629.jpg)
PurposeCreatesaroutebetweenasourceanddestinationterminal.Theroutecancarryavarietyofdigitalsignals,suchastriggers,clocks,andhardwareevents.Thesesourceanddestinationterminalscanbeondifferentdevicesaslongasaconnectingpublicbus,suchasRTSIorthePXIbackplane,isavailable.DAQmxConnectTermsdoesnotmodifyatask.WhenDAQmxConnectTermsruns,therouteisimmediatelyreservedandcommittedtohardware.Thistypeofroutingiscalledimmediaterouting.
![Page 630: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/630.jpg)
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.
![Page 631: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/631.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 632: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/632.jpg)
DAQmxDisconnectTermsint32DAQmxDisconnectTerms(constcharsourceTerminal[],constchar
destinationTerminal[]);
![Page 633: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/633.jpg)
PurposeRemovessignalroutespreviouslycreatedusingDAQmxConnectTerms.DAQmxDisconnectTermscannotremovetask-basedroutes,suchasthosecreatedthroughtimingandtriggeringconfiguration.Whenthisfunctionexecutes,therouteisunreservedimmediately.Forthisreason,thistypeofroutingiscalledimmediaterouting.
![Page 634: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/634.jpg)
ParametersInput
Name Type Description
sourceTerminal constchar[] Theoriginatingterminaloftheroute.Youcanspecifyaterminalname.
destinationTerminal constchar[] Thereceivingterminaloftheroute.Youcanspecifyaterminalname.
![Page 635: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/635.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 636: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/636.jpg)
DAQmxTristateOutputTermint32DAQmxTristateOutputTerm(constcharoutputTerminal[]);
![Page 637: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/637.jpg)
PurposeSetsaterminaltohigh-impedancestate.IfyouconnectanexternalsignaltoaterminalontheI/Oconnector,theterminalmustbeinhigh-impedancestate.Otherwise,thedevicecoulddouble-drivetheterminalanddamagethehardware.Ifyouusethisfunctiononaterminalinanactiveroute,thefunctionfailsandreturnsanerror.DAQmxResetDevicesetsallterminalsontheI/Oconnectortohigh-impedancestatebutabortsanyrunningtasksassociatedwiththedevice.
![Page 638: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/638.jpg)
ParametersInput
Name Type Description
outputTerminal constchar[] TheterminalontheI/Oconnectortosettohigh-impedancestate.Youcanspecifyaterminalname.
![Page 639: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/639.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 640: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/640.jpg)
DAQmxResetDeviceint32DAQmxResetDevice(constchardeviceName[]);
![Page 641: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/641.jpg)
PurposeImmediatelyabortsalltasksassociatedwithadeviceandreturnsthedevicetoaninitializedstate.Abortingataskstopsandreleasesanyresourcesthetaskreserved.
![Page 642: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/642.jpg)
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
![Page 643: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/643.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 644: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/644.jpg)
DAQmxControlWatchdogTaskint32DAQmxControlWatchdogTask(TaskHandletaskHandle,int32action);
![Page 645: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/645.jpg)
PurposeControlsthewatchdogtaskaccordingtotheactionyouspecify.
![Page 646: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/646.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
action int32 Specifieshowtocontrolthewatchdogtask.
Value DescriptionDAQmx_Val_ResetTimer Resetstheinternal
timerto0.Youmustcontinuallyresettheinternaltimertopreventitfromtimingoutandlockingoutthedevice.
DAQmx_Val_ClearExpiration Unlocksadevicewhosewatchdogexpired.
![Page 647: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/647.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 648: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/648.jpg)
DAQmxCreateWatchdogTimerTaskint32DAQmxCreateWatchdogTimerTask(constchardeviceName[],constchar
taskName[],TaskHandle*taskHandle,float64timeout,constcharchannelName[],int32expState,...);
![Page 649: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/649.jpg)
PurposeCreatesandconfiguresataskthatcontrolsthewatchdogtimerofadevice.Thetimeractivateswhenyoustartthetask.
![Page 650: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/650.jpg)
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.
![Page 651: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/651.jpg)
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.
![Page 652: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/652.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 653: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/653.jpg)
DAQmxAOSeriesCalAdjustDAQmxAOSeriesCalAdjust(uInt32calHandle,float64referenceVoltage);
![Page 654: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/654.jpg)
PurposeAdjuststheexternalcalibrationconstantsonanAOSeriesdevice.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithreferenceVoltage.
![Page 655: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/655.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.Thisvoltageshouldbebetween+6.000Vand+9.999V.
![Page 656: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/656.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 657: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/657.jpg)
DAQmxESeriesCalAdjustint32DAQmxESeriesCalAdjust(uInt32calHandle,float64referenceVoltage);
![Page 658: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/658.jpg)
PurposeAdjuststheexternalcalibrationconstantsonanE-Seriesdevice.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithreferenceVoltage.
![Page 659: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/659.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.Thisvoltageshouldbebetween+6.000Vand+9.999V.
![Page 660: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/660.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 661: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/661.jpg)
DAQmxGetAIChanCalCalDateint32DAQmxGetAIChanCalCalDate(TaskHandletaskHandle,constchar
channelName[],uInt32*year,uInt32*month,uInt32*day,uInt32*hour,uInt32*minute);
![Page 662: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/662.jpg)
PurposeIndicatesthelastdateandtimethatthechannelunderwentachannelcalibration.
![Page 663: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/663.jpg)
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.
![Page 664: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/664.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 665: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/665.jpg)
DAQmxGetAIChanCalExpDateint32DAQmxGetAIChanCalExpDate(TaskHandletaskHandle,constchar
channelName[],uInt32*year,uInt32*month,uInt32*day,uInt32*hour,uInt32*minute);
![Page 666: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/666.jpg)
PurposeIndicatesthelastdateandtimethatthechannelunderwentanexternalchannelcalibration.
![Page 667: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/667.jpg)
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.
![Page 668: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/668.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 669: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/669.jpg)
DAQmxGetExtCalLastDateAndTimeint32DAQmxGetExtCalLastDateAndTime(constchardeviceName[],uInt32
*year,uInt32*month,uInt32*day,uInt32*hour,uInt32*minute);
![Page 670: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/670.jpg)
PurposeIndicatesthelastdateandtimethatthedeviceunderwentanexternalcalibration.
![Page 671: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/671.jpg)
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.
![Page 672: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/672.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 673: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/673.jpg)
DAQmxGetSelfCalLastDateAndTimeint32DAQmxGetSelfCalLastDateAndTime(constchardeviceName[],uInt32
*year,uInt32*month,uInt32*day,uInt32*hour,uInt32*minute);
![Page 674: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/674.jpg)
PurposeIndicatesthelastdateandtimethatthedeviceunderwentaselfcalibration.
![Page 675: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/675.jpg)
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.
![Page 676: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/676.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 677: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/677.jpg)
DAQmxMSeriesCalAdjustint32DAQmxMSeriesCalAdjust(uInt32calHandle,float64referenceVoltage);
![Page 678: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/678.jpg)
PurposeAdjuststheexternalcalibrationconstantsforanMSeriesdevice.YoumustconnectaknownvoltagetothedeviceandspecifythatvoltagewithreferenceVoltage.
![Page 679: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/679.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.Thisvoltageshouldbebetween+6.000Vand+9.999V.
![Page 680: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/680.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 681: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/681.jpg)
DAQmxPerformBridgeOffsetNullingCalint32DAQmxPerformBridgeOffsetNullingCal(TaskHandletaskHandle,const
charchannel[])
![Page 682: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/682.jpg)
PurposePerformsabridgeoffsetnullingcalibrationonthechannelsinthetask.Ifthetaskmeasuresbothbridge-basedsensorsandnon-bridge-basedsensors,specifythenamesofthechannelsthatmeasurebridge-basedsensorsinthechannelparameter.
![Page 683: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/683.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
channel constchar[] Asubsetofvirtualchannelsinthetaskthatyouwanttocalibrate.Usethisparameterifyoudonotwanttocalibrateallthechannelsinthetaskorifsomechannelsinthetaskmeasurenon-bridge-basedsensors.
![Page 684: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/684.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 685: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/685.jpg)
DAQmxPerformBridgeOffsetNullingCalExint32DAQmxPerformBridgeOffsetNullingCalEx(TaskHandletaskHandle,const
charchannel[],bool32skipUnsupportedChannels)
![Page 686: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/686.jpg)
PurposePerformsabridgeoffsetnullingcalibrationonthechannelsinthetask.Ifthetaskmeasuresbothbridge-basedsensorsandnon-bridge-basedsensors,specifythenamesofthechannelsthatmeasurebridge-basedsensorsinthechannelparameter.
![Page 687: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/687.jpg)
ParametersInput
Name Type Description
taskHandle TaskHandle Thetaskusedinthisfunction.
channel constchar[] Asubsetofvirtualchannelsinthetaskthatyouwanttocalibrate.Usethisparameterifyoudonotwanttocalibrateallthechannelsinthetaskorifsomechannelsinthetaskmeasurenon-bridge-basedsensors.
skipUnsupportedChannels bool32 Specifieswhetherornottoskipchannelsthatdonotsupportcalibration.IfskipUnsupportedChannelsisTRUE,calibrationwillbeperformedonlyonsupportedchannels.IfFALSE,calibrationwillbeperformedonchannelsspecifiedbychannel.ThedefaultisFALSE.
![Page 688: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/688.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 689: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/689.jpg)
DAQmxPerformBridgeShuntCalint32DAQmxPerformBridgeShuntCal(TaskHandletaskHandle,constchar
channel[],float64shuntResistorValue,int32shuntResistorLocation,float64bridgeResistance,bool32skipUnsupportedChannels);
![Page 690: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/690.jpg)
PurposePerformsshuntcalibrationforthespecifiedchannelsusingabridgesensor.
![Page 691: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/691.jpg)
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.
![Page 692: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/692.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 693: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/693.jpg)
DAQmxPerformStrainShuntCalint32DAQmxPerformStrainShuntCal(TaskHandletaskHandle,constchar
channel[],float64shuntResistorValue,int32shuntResistorLocation,bool32skipUnsupportedChannels);
![Page 694: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/694.jpg)
PurposePerformsshuntcalibrationforthespecifiedchannelsusingastraingagesensor.
![Page 695: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/695.jpg)
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.
![Page 696: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/696.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 697: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/697.jpg)
DAQmxRestoreLastExtCalConstint32DAQmxRestoreLastExtCalConst(constchardeviceName[]);
![Page 698: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/698.jpg)
PurposeSetstheselfcalibrationconstantsofthedevicetothethecurrentexternalcalibrationconstants.NationalInstrumentssetstheexternalcalibrationconstantsatthefactory,andthoseconstantsremainineffectuntilyouperformanewexternalcalibrationonthedevice.Thisfunctionnullifiesanyselfcalibrationyouperformonthedevice.Ifyouhaveneverperformedaselfcalibrationonthedevice,thisfunctionhasnoeffect.
![Page 699: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/699.jpg)
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
![Page 700: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/700.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 701: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/701.jpg)
DAQmxSCBaseboardCalAdjustint32DAQmxSCBaseboardCalAdjust(uInt32calHandle,float64
referenceVoltage);
![Page 702: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/702.jpg)
PurposeAdjuststheexternalcalibrationconstantsonforthebaseboardofanSCSeriesdevice.YoumustconnectaknownvoltagetothedeviceandspecifythatvoltagewithreferenceVoltage.
![Page 703: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/703.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.Thisvoltageshouldbebetween+6.000Vand+9.999V.
![Page 704: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/704.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 705: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/705.jpg)
DAQmxSelfCalint32DAQmxSelfCal(constchardeviceName[]);
![Page 706: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/706.jpg)
PurposeMeasurestheonboardreferencevoltageofthedeviceandadjuststheself-calibrationconstantstoaccountforanyerrorscausedbyshort-termfluctuationsintheoperatingenvironment.Whenyouselfcalibrateadevice,noexternalsignalconnectionsarenecessary.
![Page 707: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/707.jpg)
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
![Page 708: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/708.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 709: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/709.jpg)
DAQmxSetAIChanCalCalDateint32DAQmxSetAIChanCalCalDate(TaskHandletaskHandle,constchar
channelName[],uInt32*year,uInt32*month,uInt32*day,uInt32*hour,uInt32*minute);
![Page 710: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/710.jpg)
PurposeSetsthedateandtimethatthechannelunderwentachannelcalibration.
![Page 711: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/711.jpg)
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.
![Page 712: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/712.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 713: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/713.jpg)
DAQmxSetAIChanCalExpDateint32DAQmxSetAIChanCalExpDate(TaskHandletaskHandle,constchar
channelName[],uInt32*year,uInt32*month,uInt32*day,uInt32*hour,uInt32*minute);
![Page 714: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/714.jpg)
PurposeSetsthedateandtimethatthechannelunderwentanexternalchannelcalibration.
![Page 715: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/715.jpg)
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.
![Page 716: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/716.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 717: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/717.jpg)
DAQmxSSeriesCalAdjustint32DAQmxSSeriesCalAdjust(uInt32calHandle,float64referenceVoltage);
![Page 718: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/718.jpg)
PurposeAdjuststheexternalcalibrationconstantsforanSSeriesdevice.YoumustconnectaknownvoltagetothedeviceandspecifythatvoltagewithreferenceVoltage.
![Page 719: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/719.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.Thisvoltageshouldbebetween+6.000Vand+9.999V.
![Page 720: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/720.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 721: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/721.jpg)
DAQmxChangeExtCalPasswordint32DAQmxChangeExtCalPassword(constchardeviceName[],constchar
password[],constcharnewPassword[]);
![Page 722: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/722.jpg)
PurposeChangestheexternalcalibrationpasswordofthedevice.
![Page 723: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/723.jpg)
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
password constchar[] Thecurrentcalibrationpasswordforthedevice.Thispasswordiscasesensitive.ThedefaultpasswordforallNIproductsisNI.
newPassword constchar[] Thenewpasswordforthedevice.Thispasswordcanbenolongerthanfourcharacters.
![Page 724: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/724.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 725: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/725.jpg)
DAQmxCloseExtCalint32DAQmxCloseExtCal(uInt32calHandle,int32action);
![Page 726: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/726.jpg)
PurposeClosesanopenexternalcalibrationsession.
![Page 727: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/727.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
action int32 Specifieshowtoclosethecalibrationsession.
Value DescriptionDAQmx_Val_Action_Commit Savesthecalibration
changesmadeinthesession
DAQmx_Val_Action_Cancel Closesthesessionwithoutsavinganycalibrationchanges
![Page 728: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/728.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 729: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/729.jpg)
DAQmxInitExtCalint32DAQmxInitExtCal(constchardeviceName[],constcharpassword[],
uInt32*calHandle);
![Page 730: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/730.jpg)
PurposeStartsanexternalcalibrationsessiononadevice.
![Page 731: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/731.jpg)
ParametersInput
Name Type Description
deviceName constchar[] Thenameofthedevice,asconfiguredinMeasurement&AutomationExplorer(MAX),towhichthisoperationapplies.
password constchar[] Thecurrentcalibrationpasswordforthedevice.Thispasswordiscasesensitive.ThedefaultpasswordforallNIproductsisNI.
Output
Name Type Description
calHandle uInt32* Areferencetothecalibrationsession.
![Page 732: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/732.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 733: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/733.jpg)
DAQmxAdjustDSAAICalint32DAQmxAdjustDSAAICal(uInt32calHandle,float64referenceVoltage);
![Page 734: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/734.jpg)
PurposeAdjuststheexternalcalibrationconstantsfortheanaloginputsectionofaDSAdevice.YoumustconnectaknownvoltagetothedeviceandspecifythatvoltagewiththereferenceVoltageparameter.
![Page 735: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/735.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.Thisvoltageshouldbebetween+4.9Vand+9.1V.
![Page 736: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/736.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 737: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/737.jpg)
DAQmxAdjustDSAAOCalint32DAQmxAdjustDSAAOCal(uInt32calHandle,uInt32channel,float64
requestedLowVoltage,float64actualLowVoltage,float64requestedHighVoltage,float64actualHighVoltage,float64gainSetting);
![Page 738: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/738.jpg)
PurposeAdjuststheexternalcalibrationconstantsfortheanalogoutputsectionofaDSAdevice.Youmustusethedevicetogenerateahighvoltageandlowvoltageataspecifiedgain,measurethehighandlowvoltages,thenspecifytherequestedhighvoltage,lowvoltage,andgainalongwiththeactualhighvoltageandlowvoltage.
![Page 739: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/739.jpg)
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.
![Page 740: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/740.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 741: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/741.jpg)
DAQmxAdjustDSATimebaseCalint32DAQmxAdjustDSATimebaseCal(uInt32calHandle,float64
referenceFrequency);
![Page 742: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/742.jpg)
PurposeAdjuststheexternalcalibrationconstantforthetimebaseofaDSAdevicewithanadjustableoscillator.YoumustconnectasinusoidalsignalwithaknownfrequencytothedeviceandspecifythatfrequencywithreferenceFrequency.
![Page 743: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/743.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
referenceFrequency float64 Thefrequency,inhertz,ofthesignaltouseasareferenceforcalibration.
![Page 744: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/744.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 745: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/745.jpg)
DAQmxAdjust4204Calint32DAQmxAdjust4204Cal(uInt32calHandle,constcharchannelNames[],
float64lowPassFreq,bool32trackHoldEnabled,float64inputVal);
![Page 746: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/746.jpg)
PurposeAdjuststheinternalandexternalcalibrationconstantsfortheSCMPpodonthePXI-4204device.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithinputVal.
![Page 747: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/747.jpg)
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.
![Page 748: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/748.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 749: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/749.jpg)
DAQmxAdjust4220Calint32DAQmxAdjust4220Cal(uInt32calHandle,constcharchannelNames[],
float64gain,float64inputVal);
![Page 750: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/750.jpg)
PurposeAdjuststheinternalandexternalcalibrationconstantsfortheSCMPpodonthePXI-4220device.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithinputVal.Thisdeviceneedsreferencesignalsof0.0voltsatgainsof1,15,20,and310onaparticularchannelinordertoperformanoffsetcalibrationforthatchannel.Ifthosepointsarenotmanuallysupplied,theywillbeautomaticallymeasuredinternallywithsampleandholdenabled.
![Page 751: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/751.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelNames constchar[]
Thephysicalchannel(s)tocalibrate.
gain float64 ThegainvalueontheSCMPpodtocalibrate.
inputVal float64 Theknownvoltage,involts,touseasareferenceforcalibration.
![Page 752: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/752.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 753: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/753.jpg)
DAQmxAdjust4224Calint32DAQmxAdjust4224Cal(uInt32calHandle,constcharchannelNames[],
float64gain,float64inputVal);
![Page 754: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/754.jpg)
PurposeAdjuststheinternalandexternalcalibrationconstantsfortheSCMPpodonthePXI-4224device.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithinputVal.
![Page 755: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/755.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelNames constchar[]
Thephysicalchannel(s)tocalibrate.
gain float64 ThegainvalueontheSCMPpodtocalibrate.
inputVal float64 Theknownvoltage,involts,touseasareferenceforcalibration.
![Page 756: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/756.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 757: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/757.jpg)
DAQmxAdjust1102Calint32DAQmxAdjust1102Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
![Page 758: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/758.jpg)
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-1102module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
![Page 759: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/759.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
![Page 760: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/760.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 761: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/761.jpg)
DAQmxAdjust1104Calint32DAQmxAdjust1104Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
![Page 762: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/762.jpg)
PurposeAdjuststhecalibrationconstantsfortheSCXI-1104module.YoumustmeasurethevoltagegeneratedbyapreviouscalltotheDAQmxSetup1104Calfunctionandspecifythemeasurementwithmeasuredoutput.
![Page 763: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/763.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
![Page 764: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/764.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 765: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/765.jpg)
DAQmxAdjust1112Calint32DAQmxAdjust1112Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
![Page 766: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/766.jpg)
PurposeAdjuststhecalibrationconstantsfortheSCXI-1112module.YoumustmeasurethevoltagegeneratedbyapreviouscalltotheDAQmxSetup1112CalfunctionandspecifythemeasurementwithmeasOutput.
![Page 767: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/767.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
![Page 768: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/768.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 769: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/769.jpg)
DAQmxAdjust1122Calint32DAQmxAdjust1122Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
![Page 770: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/770.jpg)
PurposeAdjuststhecalibrationconstantsfortheSCXI-1122module.YoumustmeasurethevoltageorcurrentgeneratedbyapreviouscalltotheDAQmxSetup1122CalfunctionandspecifythemeasurementwithmeasOutput.
![Page 771: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/771.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 ThevoltageorcurrentmeasuredattheoutputchannelspecifiedinapreviouscalltotheDAQmxSetup1122Calfunction.
![Page 772: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/772.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 773: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/773.jpg)
DAQmxAdjust1124Calint32DAQmxAdjust1124Cal(uInt32calHandle,float64measOutput);
![Page 774: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/774.jpg)
PurposeAdjuststhecalibrationconstantsfortheSCXI-1124module.YoumustmeasurethevoltageorcurrentgeneratedbyapreviouscalltotheDAQmxSetup1124CalfunctionandspecifythemeasurementwithmeasOutput.
![Page 775: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/775.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
measOutput float64 ThevoltageorcurrentmeasuredattheoutputchannelspecifiedinapreviouscalltotheDAQmxSetup1124Calfunction.
![Page 776: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/776.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 777: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/777.jpg)
DAQmxAdjust1125Calint32DAQmxAdjust1125Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
![Page 778: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/778.jpg)
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-1125module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
![Page 779: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/779.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
![Page 780: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/780.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 781: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/781.jpg)
DAQmxAdjust1126Calint32DAQmxAdjust1126Cal(uInt32calHandle,float64refFreq,float64
measOutput);
![Page 782: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/782.jpg)
PurposeAdjuststhecalibrationconstantsfortheSCXI-1126module.YoumustmeasurethevoltagegeneratedbyapreviouscalltotheDAQmxSetup1126CalfunctionandspecifythemeasurementwithmeasOutput.
![Page 783: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/783.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refFreq float64 Theknownfrequency,inhertz,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
![Page 784: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/784.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 785: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/785.jpg)
DAQmxAdjust1141Calint32DAQmxAdjust1141Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
![Page 786: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/786.jpg)
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-1141module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
![Page 787: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/787.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
![Page 788: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/788.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 789: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/789.jpg)
DAQmxAdjust1142Calint32DAQmxAdjust1142Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
![Page 790: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/790.jpg)
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-1142module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
![Page 791: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/791.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
![Page 792: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/792.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 793: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/793.jpg)
DAQmxAdjust1143Calint32DAQmxAdjust1143Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
![Page 794: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/794.jpg)
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-1143module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
![Page 795: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/795.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
![Page 796: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/796.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 797: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/797.jpg)
DAQmxAdjust1502Calint32DAQmxAdjust1502Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
![Page 798: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/798.jpg)
PurposeAdjuststhecalibrationconstantsfortheSCXI-1502module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
![Page 799: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/799.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
![Page 800: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/800.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 801: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/801.jpg)
DAQmxAdjust1503Calint32DAQmxAdjust1503Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
![Page 802: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/802.jpg)
PurposeAdjuststhecalibrationconstantsfortheSCXI-1503module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
![Page 803: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/803.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
![Page 804: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/804.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 805: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/805.jpg)
DAQmxAdjust1503CurrentCalint32DAQmxAdjust1503CurrentCal(uInt32calHandle,constchar
channelName[],float64measOutput);
![Page 806: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/806.jpg)
PurposeAdjuststhecurrentcalibrationconstantsfortheSCXI-1503module.
![Page 807: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/807.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
measOutput float64 Thecurrentmeasuredattheoutputofthemodule.
![Page 808: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/808.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 809: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/809.jpg)
DAQmxAdjust1520Calint32DAQmxAdjust1520Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
![Page 810: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/810.jpg)
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-1520module.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.Thisdeviceneedsreferencesignalsof0.0voltsatgainsof1,15,20,and310onaparticularchannelinordertoperformanoffsetcalibrationforthatchannel.
![Page 811: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/811.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
![Page 812: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/812.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 813: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/813.jpg)
DAQmxAdjust1521Calint32DAQmxAdjust1521Cal(uInt32calHandle,float64refVoltage,float64
measOutput);
![Page 814: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/814.jpg)
PurposeAdjuststhecalibrationconstantsfortheSCXI-1521module.YoumustmeasurethevoltagegeneratedbyapreviouscalltotheDAQmxSetup1521CalfunctionandspecifythemeasurementwithmeasOutput.
![Page 815: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/815.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.
![Page 816: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/816.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 817: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/817.jpg)
DAQmxAdjust153xCalint32DAQmxAdjust153xCal(uInt32calHandle,float64refVoltage,float64
measOutput);
![Page 818: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/818.jpg)
PurposeAdjuststheexternalcalibrationconstantsfortheSCXI-153xmodule.YoumustsupplyaknownvoltagetothedeviceandspecifythatvoltagewithrefVoltage.
![Page 819: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/819.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
refVoltage float64 Theknownvoltage,involts,touseasareferenceforcalibration.BothrefVoltageandmeasOutputmustbeofthesamemeasurementtype,eitherRMSvoltageorpeak-to-peakvoltage.
measOutput float64 Thevoltagemeasuredattheoutputofthemodule.BothrefVoltageandmeasOutputmustbeofthesamemeasurementtype,eitherRMSvoltageorpeak-to-peakvoltage.
![Page 820: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/820.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 821: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/821.jpg)
DAQmxAdjust1540Calint32DAQmxAdjust1540Cal(uInt32calHandle,float64refVoltage,float64
measOutput,int32inputCalSource);
![Page 822: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/822.jpg)
PurposeAdjuststhecalibrationconstantsfortheSCXI-1540module.YoumustmeasurethevoltagegeneratedbyapreviouscalltotheDAQmxSetup1540CalfunctionandspecifythemeasurementwithmeasOutput.
![Page 823: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/823.jpg)
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.
![Page 824: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/824.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 825: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/825.jpg)
DAQmxSetup1102Calint32DAQmxSetup1102Cal(uInt32calHandle,constcharchannelNames[],
float64gain);
![Page 826: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/826.jpg)
PurposeSetstheSCXI-1102moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1102Calfunction.
NoteTheterminalwheremoduleoutputismeasuredwilldependontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0+/-pinsoftherearsignalconnector.Pleaserefertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 827: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/827.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelNames constchar[]
Thephysicalchannel(s)tocalibrate.
gain float64 Thegainvaluetocalibrate.
![Page 828: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/828.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 829: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/829.jpg)
DAQmxSetup1104Calint32DAQmxSetup1104Cal(uInt32calHandle,constcharchannel[]);
![Page 830: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/830.jpg)
PurposeSpecifiesthechannelontheSCXI-1104moduleforcalibration.Measurecalibrationinput/outputpointsbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.SpecifyeachofthesepointsusingtheDAQmxAdjust1104Calfunction.
NoteTheterminalwheremoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0+/-pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 831: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/831.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channel constchar[]
Thephysicalchanneltocalibrate.
![Page 832: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/832.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 833: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/833.jpg)
DAQmxSetup1112Calint32DAQmxSetup1112Cal(uInt32calHandle,constcharchannel[]);
![Page 834: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/834.jpg)
PurposeSpecifiesthechannelontheSCXI-1112moduleforcalibration.Measurecalibrationinput/outputpointsbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.SpecifyeachofthesepointsusingtheDAQmxAdjust1112Calfunction.
NoteTheterminalwheremoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0+/-pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 835: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/835.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channel constchar[]
Thephysicalchanneltocalibrate.
![Page 836: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/836.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 837: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/837.jpg)
DAQmxSetup1122Calint32DAQmxSetup1122Cal(uInt32calHandle,constcharchannel[],float64
gain);
![Page 838: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/838.jpg)
PurposeSetstheSCXI-1122moduletothespecifiedgainvalue.CalibrationI/Opointscanbemeasuredbysupplyingreferencesignalstothedeviceandmeasuringtheoutputs.SpecifyeachofthesepointsusingtheDAQmxAdjust1122Calfunction.
NoteTheterminalwheremoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 839: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/839.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channel constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
![Page 840: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/840.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 841: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/841.jpg)
DAQmxSetup1124Calint32DAQmxSetup1124Cal(uInt32calHandle,constcharchannelName[],int32
range,uInt32dacValue);
![Page 842: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/842.jpg)
PurposeWritesthespecifiedbinaryvaluetotheD/Acircuitryonthespecifiedchannelatthespecifiedrange.MeasureandspecifythevoltageorcurrentgeneratedinasubsequentcalltotheDAQmxAdjust1124Calfunction.
NoteSpecifyatleasttwocalibrationpointsforeachchannel/rangebeingcalibrated.Therecommendedbinarydatatouseforvoltagerangesare0and4095.Therecommendedbinarydatatouseforthecurrentrangeis255and4095.
![Page 843: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/843.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
range int32 Therangetocalibrate.
dacValue uInt32 ThebinarynumbertowritetotheDACcircuitry.
![Page 844: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/844.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 845: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/845.jpg)
DAQmxSetup1125Calint32DAQmxSetup1125Cal(uInt32calHandle,constcharchannelNames[],
float64gain);
![Page 846: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/846.jpg)
PurposeSetstheSCXI-1125moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1125Calfunction.
NoteTheterminalwheremoduleoutputismeasuredwilldependontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0+/-pinsoftherearsignalconnector.Pleaserefertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 847: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/847.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelNames constchar[]
Thephysicalchannel(s)tocalibrate.
gain float64 Thegainvaluetocalibrate.
![Page 848: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/848.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 849: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/849.jpg)
DAQmxSetup1126Calint32DAQmxSetup1126Cal(uInt32calHandle,constcharchannelName[],
float64upperFreqLimit);
![Page 850: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/850.jpg)
PurposeSpecifiesthechannelandupperfrequencylimitontheSCXI-1126moduleforcalibration.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.SpecifyeachofthesepointsusingtheDAQmxAdjust1126Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 851: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/851.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
upperFreqLimit float64 Thehighfrequencylimitinhertz,with0Hzasthelowfrequencylimit,whichmostcloselyencapsulatestherangestobecalibrated.
![Page 852: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/852.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 853: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/853.jpg)
DAQmxSetup1141Calint32DAQmxSetup1141Cal(uInt32calHandle,constcharchannelName[],
float64gain);
![Page 854: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/854.jpg)
PurposeSetstheSCXI-1141moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1141Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 855: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/855.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
![Page 856: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/856.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 857: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/857.jpg)
DAQmxSetup1142Calint32DAQmxSetup1142Cal(uInt32calHandle,constcharchannelName[],
float64gain);
![Page 858: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/858.jpg)
PurposeSetstheSCXI-1142moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1142Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 859: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/859.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
![Page 860: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/860.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 861: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/861.jpg)
DAQmxSetup1143Calint32DAQmxSetup1143Cal(uInt32calHandle,constcharchannelName[],
float64gain);
![Page 862: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/862.jpg)
PurposeSetstheSCXI-1143moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1143Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 863: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/863.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
![Page 864: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/864.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 865: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/865.jpg)
DAQmxSetup1502Calint32DAQmxSetup1502Cal(uInt32calHandle,constcharchannelName[],
float64gain);
![Page 866: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/866.jpg)
PurposeSetstheSCXI-1502moduletothespecifiedgainvalue.CalibrationI/Opointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.SpecifyeachofthesepointsusingtheDAQmxAdjust1502Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 867: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/867.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
![Page 868: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/868.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 869: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/869.jpg)
DAQmxSetup1503Calint32DAQmxSetup1503Cal(uInt32calHandle,constcharchannelName[],
float64gain);
![Page 870: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/870.jpg)
PurposeSetstheSCXI-1503moduletothespecifiedgainvalue.CalibrationI/Opointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.SpecifyeachofthesepointsusingtheDAQmxAdjust1503Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 871: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/871.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
![Page 872: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/872.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 873: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/873.jpg)
DAQmxSetup1520Calint32DAQmxSetup1520Cal(uInt32calHandle,constcharchannelNames[],
float64gain);
![Page 874: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/874.jpg)
PurposeSetstheSCXI-1520moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1520Calfunction.Thisfunctionwillalsodisablesampleandholdonthemodulesothattheoutputcanbemeasuredbyexternaldevicesthatcannotsupplytheappropriatesampleandholdtimingsignals.
NoteTheterminalwheremoduleoutputismeasuredwilldependontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0+/-pinsoftherearsignalconnector.Pleaserefertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 875: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/875.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelNames constchar[]
Thephysicalchannel(s)tocalibrate.
gain float64 Thegainvaluetocalibrate.
![Page 876: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/876.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 877: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/877.jpg)
DAQmxSetup153xCalint32DAQmxSetup153xCal(uInt32calHandle,constcharchannelName[],
float64gain);
![Page 878: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/878.jpg)
PurposeSetstheSCXI-153xmoduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust153xCalfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 879: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/879.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
gain float64 Thegainvaluetocalibrate.
![Page 880: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/880.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 881: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/881.jpg)
DAQmxSetup1540Calint32DAQmxSetup1540Cal(uInt32calHandle,constcharchannel[],float64
excitationVoltage,float64excitationFreq);
![Page 882: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/882.jpg)
PurposeSetstheSCXI-1540moduletothespecifiedgainvalue.Calibrationinput/outputpointscanbemeasuredbysupplyingreferencesignalstothespecifiedchannelandmeasuringtheoutputs.EachofthesepointsshouldbespecifiedusingtheDAQmxAdjust1540Calfunction.
NoteTheterminalwherethemoduleoutputismeasureddependsontheconfigurationofthemoduleinMAX.NationalInstrumentsrecommendscablingthemoduletothedigitizersothattheoutputappearsontheMCH0±pinsoftherearsignalconnector.Refertothemoduleusermanualformoreinformationontheroutingofmoduleoutput.
![Page 883: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/883.jpg)
ParametersInput
Name Type Description
calHandle uInt32 AreferencetothecalibrationsessionthatyoucreatedusingtheDAQmxInitExtCalfunction.
channelName constchar[]
Thephysicalchanneltocalibrate.
excitationVoltage float64 TheRMSvalueoftheinternalACexcitationvoltage.
excitationFreq float64 ThefrequencyoftheinternalACexcitationvoltage.
![Page 884: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/884.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 885: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/885.jpg)
DAQmxDeleteSavedGlobalChanint32DAQmxDeleteSavedGlobalChan(constcharchannelName[]);
![Page 886: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/886.jpg)
PurposeDeletesthespecifiedglobalvirtualchannelfromMAX.Thisfunctiondoesnotremovetheglobalvirtualchannelfromtasksthatuseit.
![Page 887: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/887.jpg)
ParametersInput
Name Type Description
channelName constchar[] Nameoftheglobalvirtualchanneltodelete.
![Page 888: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/888.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 889: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/889.jpg)
DAQmxDeleteSavedScaleint32DAQmxDeleteSavedScale(constcharscaleName[]);
![Page 890: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/890.jpg)
PurposeDeletesthespecifiedcustomscalefromMAX.Thisfunctiondoesnotremovethecustomscalefromvirtualchannelsthatuseit.
![Page 891: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/891.jpg)
ParametersInput
Name Type Description
scaleName constchar[] Nameofthecustomscaletodelete.
![Page 892: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/892.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 893: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/893.jpg)
DAQmxDeleteSavedTaskint32DAQmxDeleteSavedTask(constchartaskName[]);
![Page 894: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/894.jpg)
PurposeDeletesthespecifiedtaskfromMAX.Thisfunctiondoesnotclearthecopyofthetaskstoredinmemory.UseDAQmxClearTasktoclearthecopyofthetask.
![Page 895: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/895.jpg)
ParametersInput
Name Type Description
taskName constchar[] Nameofthetasktodelete.
![Page 896: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/896.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 897: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/897.jpg)
DAQmxSaveGlobalChanint32DAQmxSaveGlobalChan(TaskHandletaskHandle,constchar
channelName[],constcharsaveAs[],constcharauthor[],uInt32options);
![Page 898: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/898.jpg)
PurposeSavesthespecifiedlocalorglobalvirtualchanneltoMAXasaglobalvirtualchannel.Youmustspecifyboththelocalorglobalvirtualchanneltosaveandataskthatcontainsthatchannel.ProgrammaticallysavedglobalvirtualchannelscannotbeviewedintheDAQAssistantforversionsofNI-DAQearlierthan7.4.ToviewaprogrammaticallysavedglobalvirtualchannelinanearlierversionofNI-DAQ,firstusetheDAQAssistantinNI-DAQ7.4orlatertosavetheglobalvirtualchannel.VisittheDAQmxProfessionalDeveloperToolswebsiteformoreinformationandexamplesofprogrammaticallysavingglobalvirtualchannels.
![Page 899: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/899.jpg)
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
![Page 900: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/900.jpg)
channeltobeeditedintheDAQAssistant.Ifyousetthisflag,theDAQAssistantmustsupportallglobalvirtualchannelsettings.
DAQmx_Val_Save_AllowInteractiveDeletion AllowtheglobalvirtualchanneltobedeletedthroughMAX.
![Page 901: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/901.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 902: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/902.jpg)
DAQmxSaveScaleint32DAQmxSaveScale(constcharscaleName[],constcharsaveAs[],const
charauthor[],uInt32options);
![Page 903: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/903.jpg)
PurposeSavesthespecifiedcustomscaletoMAX.VisittheDAQmxProfessionalDeveloperToolswebsiteformoreinformationandexamplesofprogrammaticallysavingglobalchannels.
![Page 904: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/904.jpg)
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.
![Page 905: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/905.jpg)
DAQmx_Val_Save_AllowInteractiveDeletion AllowthecustomscaletobedeletedthroughMAX.
![Page 906: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/906.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 907: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/907.jpg)
DAQmxSaveTaskint32DAQmxSaveTask(TaskHandletaskHandle,constcharsaveAs[],const
charauthor[],uInt32options);
![Page 908: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/908.jpg)
PurposeSavesthespecifiedtaskandanylocalchannelsitcontainstoMAX.Thisfunctiondoesnotsaveglobalchannels.UseDAQmxSaveGlobalChantosaveglobalchannels.ProgrammaticallysavedtaskscannotbeviewedintheDAQAssistantforversionsofNI-DAQearlierthan7.4.ToviewaprogrammaticallysavedtaskinanearlierversionofNI-DAQ,firstusetheDAQAssistantinNI-DAQ7.4orlatertosavethetask.VisittheDAQmxProfessionalDeveloperToolswebsiteformoreinformationandexamplesofprogrammaticallysavingglobalchannels.
![Page 909: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/909.jpg)
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
![Page 910: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/910.jpg)
Assistantmustsupportalltasksettings.
DAQmx_Val_Save_AllowInteractiveDeletion AllowthetasktobedeletedthroughMAX.
![Page 911: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/911.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 912: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/912.jpg)
DAQmxClearTEDSint32DAQmxClearTEDS(constcharphysicalChannel[]);
![Page 913: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/913.jpg)
PurposeRemovesTEDSinformationfromthephysicalchannelyouspecify.ThisfunctiontemporarilyoverridesanyTEDSconfigurationforthephysicalchannelthatyouperformedinMAX.
![Page 914: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/914.jpg)
ParametersInput
Name Type Description
physicalChannel constchar[] Thenameofthephysicalchannelyouwanttoclear.
![Page 915: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/915.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 916: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/916.jpg)
DAQmxConfigureTEDSint32DAQmxConfigureTEDS(constcharphysicalChannel[],constchar
filePath[]);
![Page 917: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/917.jpg)
PurposeAssociatesTEDSinformationwiththephysicalchannelyouspecify.IfyoudonotspecifythefilenameofadatasheetinthefilePathparameter,thisfunctionattemptstofindaTEDSsensorconnectedtothephysicalchannel.ThisfunctiontemporarilyoverridesanyTEDSconfigurationforthephysicalchannelthatyouperformedinMAX.
![Page 918: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/918.jpg)
ParametersInput
Name Type Description
physicalChannel constchar[]
Thenameofthephysicalchannelyouwanttoconfigure.
filePath constchar[]
ThepathtoaVirtualTEDSdatasheetthatyouwanttoassociatewiththephysicalchannel.Ifyoudonotspecifythefilenameofadatasheet,thisfunctionattemptstofindaTEDSsensorconnectedtothephysicalchannel.
![Page 919: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/919.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 920: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/920.jpg)
DAQmxWriteToTEDSFromArrayint32DAQmxWriteToTEDSFromArray(constcharphysicalChannel[],uInt8
bitstream[],uInt32arraySize,int32basicTEDSOptions);
![Page 921: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/921.jpg)
PurposeWritesTEDSdata,storedasa1Darrayof8-bitunsignedintegers,tothesensorconnectedtothephysicalchannelyouspecify.
![Page 922: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/922.jpg)
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.
![Page 923: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/923.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 924: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/924.jpg)
DAQmxWriteToTEDSFromFileint32DAQmxWriteToTEDSFromFile(constcharphysicalChannel[],constchar
filePath[],int32basicTEDSOptions);
![Page 925: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/925.jpg)
PurposeWritesTEDSdatafromavirtualTEDSfiletothesensorconnectedtothephysicalchannelyouspecify.
![Page 926: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/926.jpg)
ParametersInput
Name Type Description
physicalChannel constchar[]
Thenameofthephysicalchannelyouwanttoconfigure.
filePath constchar[]
SpecifiesthefilenameofavirtualTEDSfilethatcontainsthebitstreamtowrite.
basicTEDSOptions int32 SpecifieshowtohandlebasicTEDSdatainthebitstream.
Value DescriptionDoNotWrite
IgnorebasicTEDSdata.
WritetoEEPROM
WritebasicTEDSdatatotheEEPROM,evenifthesensorincludesaPROM.YoucannotwritebasicTEDSdataifthePROMcontainsdata.
WritetoPROM
WritebasicTEDSdatatothePROM.AnysubsequentattemptstowritebasicTEDSdataresultinanerror.
![Page 927: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/927.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 928: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/928.jpg)
DAQmxSetAnalogPowerUpStatesint32DAQmxSetAnalogPowerUpStates(constchardeviceName[],constchar
channelNames[],float64state,int32channelType,...);
![Page 929: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/929.jpg)
PurposeUpdatesthestatesthatanalogphysicalchannelsonadevicearesettowhenthedevicepowersuporwhenthedeviceisreset.Power-upstatesarestoredinEEPROMsthatyoucanwritetoonlyalimitednumberoftimes.Therefore,youshouldusethisfunctionasinfrequentlyaspossible.ThisfunctionwritestotheEEPROMonlyifasettingyourequestisdifferentfromtheonecurrentlystoredontheEEPROM.Thisfunctionwritespower-upstatesinsequentialorder.Therefore,ifaphysicalchannelhasmultipleentries,thelastentryisused.
![Page 930: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/930.jpg)
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,
![Page 931: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/931.jpg)
DAQmx_Val_ChannelVoltage,NULL);Ifyoupassadditionalchannelsandstates,thefunctioncallcanbesimilartothefollowingexample:DAQmxSetAnalogPowerUpStates("Dev1","Dev1/ao0",0.0,DAQmx_Val_ChannelVoltage,"Dev1/ao1",1.0,DAQmx_Val_ChannelCurrent,NULL);
![Page 932: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/932.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 933: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/933.jpg)
DAQmxSetDigitalLogicFamilyPowerUpStateint32DAQmxSetDigitalLogicFamilyPowerUpState(constchardeviceName[],
int32logicFamily);
![Page 934: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/934.jpg)
PurposeSetsthedigitallogicfamilytousewhenthedevicepowersup.
![Page 935: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/935.jpg)
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)
![Page 936: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/936.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 937: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/937.jpg)
DAQmxSetDigitalPowerUpStatesint32DAQmxSetDigitalPowerUpStates(constchardeviceName[],constchar
channelNames[],int32state,...);
![Page 938: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/938.jpg)
PurposeUpdatesthestatethatdigitalphysicalchannelsonstaticDIOdevicesaresettowhenthedevicepowersuporwhenthedeviceisreset.Power-upstatesarestoredinEEPROMsthatyoucanwritetoonlyalimitednumberoftimes.Therefore,youshouldusethisfunctionasinfrequentlyaspossible.ThisfunctionwritestotheEEPROMonlyifasettingyourequestisdifferentfromtheonecurrentlystoredontheEEPROM.Thisfunctionwritespower-upstatesinsequentialorder.Therefore,ifaphysicalchannelhasmultipleentries,thelastentryisused.
![Page 939: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/939.jpg)
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);
![Page 940: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/940.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Apositivevalueindicatesawarning.Anegativevalueindicatesanerror.
![Page 941: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/941.jpg)
DAQmxGetErrorStringint32DAQmxGetErrorString(int32errorCode,charerrorString[],uInt32
bufferSize);
![Page 942: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/942.jpg)
PurposeConvertstheerrornumberreturnedbyanNI-DAQmxfunctionintoameaningfulerrormessage.IfyoupassinavalidvalueforerrorStringanditsbufferSize,thisfunctionreturnsasmuchoftheavailabledataaspossible.IfyoupassNULLforerrorStringor0forbufferSize,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
![Page 943: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/943.jpg)
ParametersInput
Name Type Description
errorCode int32 AnerrorcodeorwarningreturnedbyoneoftheNI-DAQmxLibraryfunctions.
bufferSize uInt32 Thesize,inbytes,ofthebufferpassedintheerrorString.Ifyoupass0,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
Output
errorString char[] Themeaningfulerrormessagefortheerrornumber.IfyoupassNULL,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
![Page 944: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/944.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.IfyoupassinavalidvalueforerrorStringanditsbufferSize,thisfunctionreturnsasmuchoftheavailabledataaspossible.IfyoupassNULLforerrorStringor0forbufferSize,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
![Page 945: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/945.jpg)
DAQmxGetExtendedErrorInfoint32DAQmxGetExtendedErrorInfo(charerrorString[],uInt32bufferSize);
![Page 946: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/946.jpg)
PurposeReturnsdynamic,specificerrorinformation.Thisfunctionisvalidonlyforthelastfunctionthatfailed;additionalNI-DAQmxcallsmayinvalidatethisinformation.IfyoupassvalidvaluesforerrorStringandbufferSize,thisfunctionreturnsasmuchoftheavailabledataaspossible.IfyoupassNULLforerrorStringor0forbufferSize,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
![Page 947: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/947.jpg)
ParametersInput
Name Type Description
bufferSize uInt32 Thesize,inbytes,oferrorString.Ifyoupass0,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
Output
Name Type Description
errorString char[] Dynamicerrorinformation.IfyoupassNULL,thisfunctionreturnsthenumberofbytesyouneedtoallocate.
![Page 948: NI-DAQmx C Reference Help · If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop,](https://reader036.vdocuments.site/reader036/viewer/2022071007/5fc4cf1612f20526f20005cc/html5/thumbnails/948.jpg)
ReturnValueName Type Description
status int32 Theerrorcodereturnedbythefunctionintheeventofanerrororwarning.Avalueof0indicatessuccess.Anegativevalueindicatesanerror.IfyoupassinavalidvalueforerrorStringanditsbufferSize,thisfunctionreturnsasmuchoftheavailabledataaspossible.IfyoupassNULLforerrorStringor0forbufferSize,thisfunctionreturnsthenumberofbytesyouneedtoallocate.