DAQmxAddGlobalChansToTask

int32 DAQmxAddGlobalChansToTask (TaskHandle taskHandle, const char channelNames[]);

Purpose

Adds global virtual channels from MAX to the given task.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels from MAX.
channelNames | const char [] | The channels to add to the task. You can specify a list or range of channels. These channels must be valid channels available from MAX. If you pass an invalid channel, NI-DAQmx returns an error. This value is ignored if it is empty.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxClearTask

int32 DAQmxClearTask (TaskHandle taskHandle);

Purpose

Clears the task. Before clearing, this function stops the task, if necessary, and releases any resources reserved by the task. You cannot use a task once you clear the task without recreating or reloading the task.

If you use the DAQmxCreateTask function or any of the NI-DAQmx Create Channel functions within a loop, use this function within the loop after you finish with the task to avoid allocating unnecessary memory.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to clear.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTask

int32 DAQmxCreateTask (const char taskName[], TaskHandle *taskHandle);

Purpose

Creates a task. If you use this function to create a task, you must use DAQmxClearTask to destroy it.

If you use this function within a loop, NI-DAQmx creates a new task in each iteration of the loop. Use the DAQmxClearTask function within the loop after you finish with the task to avoid allocating unnecessary memory.

Parameters

Input
Name | Type | Description
taskName const char [] Name assigned to the task.

Note This name may be changed internally. Call DAQmxGetTaskName to verify whether the name was changed during creation.
Output
Name | Type | Description
taskHandle | TaskHandle * | A reference to the task created in this function.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxIsTaskDone

int32 DAQmxIsTaskDone (TaskHandle taskHandle, bool32 *isTaskDone);

Purpose

Queries the status of the task and indicates if it completed execution. Use this function to ensure that the specified operation is complete before you stop the task.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
Output
Name | Type | Description
isTaskDone | bool32 * | Indicates whether the measurement or generation completed.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxLoadTask

int32 DAQmxLoadTask (const char taskName[], TaskHandle *taskHandle);

Purpose

Loads an existing named task from Measurement & Automation Explorer (MAX). If you use this function to load a task, you must use DAQmxClearTask to destroy it.

Parameters

Input
Name | Type | Description
taskName | const char [] | A named task in MAX.
Output
Name | Type | Description
taskHandle | TaskHandle * | A reference to the task returned by this function.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxStartTask

int32 DAQmxStartTask (TaskHandle taskHandle);

Purpose

Transitions the task from the committed state to the running state, which begins measurement or generation. Using this function is required for some applications and optional for others.

If you do not use this function, a measurement task starts automatically when a read operation begins. The autoStart parameter of the NI-DAQmx Write functions determines if a generation task starts automatically when you use an NI-DAQmx Write function.

If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop, the task starts and stops repeatedly. Starting and stopping a task repeatedly reduces the performance of the application.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to start.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxStopTask

int32 DAQmxStopTask (TaskHandle taskHandle);

Purpose

Stops the task and returns it to the state it was in before you called DAQmxStartTask or called an NI-DAQmx Write function with autoStart set to TRUE.

If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop, the task starts and stops repeatedly. Starting and stopping a task repeatedly reduces the performance of the application.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to stop.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxRegisterDoneEvent

int32 DAQmxRegisterDoneEvent (TaskHandle taskHandle, uInt32 options, DAQmxDoneEventCallbackPtr callbackFunction, void *callbackData);

Purpose

Registers a callback function to receive an event when a task stops due to an error or when a finite acquisition task or finite generation task completes execution. A Done event does not occur when a task is stopped explicitly, such as by calling DAQmxStopTask.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
options uInt32 Use this parameter to set certain options. You can combine flags with the bitwise-OR operator ('|') to set multiple options. Pass a value of zero if no options need to be set.
Value | Description
0 | The callback function is called in a DAQmx thread. This is the default value.
DAQmx_Val_SynchronousEventCallbacks | The callback function is called in the thread which registered the event. In order for the callback to occur, you must be processing messages.
Note If you are receiving synchronous events faster than you are processing them, then the user interface of your application might become unresponsive.
callbackFunction DAQmxDoneEventCallbackPtr The function that you want DAQmx to call when the event occurs. The function you pass in this parameter must have the following prototype:

int32 CVICALLBACK Callback (TaskHandle taskHandle, int32 status, void *callbackData);

Upon entry to the callback, the taskHandle parameter contains the handle to the task on which the event occurred. The status parameter contains the status of the task when the event occurred. If the status value is negative, it indicates an error. If the status value is zero, it indicates no error. If the status value is positive, it indicates a warning. The callbackData parameter contains the value you passed in the callbackData parameter of this function.
callbackData | void * | A value that you want DAQmx to pass to the callback function as the function data parameter. Do not pass the address of a local variable or any other variable that might not be valid when the function is executed.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxRegisterEveryNSamplesEvent

int32 DAQmxRegisterEveryNSamplesEvent (TaskHandle taskHandle, int32 everyNsamplesEventType, uInt32 nSamples, uInt32 options, DAQmxEveryNSamplesEventCallbackPtr callbackFunction, void *callbackData);

Purpose

Registers a callback function to receive an event when the specified number of samples is written from the device to the buffer or from the buffer to the device. This function only works with devices that support buffered tasks.

When you stop a task explicitly any pending events are discarded. For example, if you call DAQmxStopTask then you do not receive any pending events.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
everyNsamplesEventType int32 The type of event you want to receive.
Value | Description
DAQmx_Val_Acquired_Into_Buffer | This event type is only supported for input tasks. Events occur when the specified number of samples are acquired into the buffer from the device.
DAQmx_Val_Transferred_From_Buffer | This event type is only supported for output tasks. Events occur when the specified number of samples are transferred from the buffer to the device.
nSamples | uInt32 | The number of samples after which each event should occur.
options uInt32 Use this parameter to set certain options. You can combine flags with the bitwise-OR operator ('|') to set multiple options. Pass a value of zero if no options need to be set.
Value | Description
0 | The callback function is called in a DAQmx thread. This is the default value.
DAQmx_Val_SynchronousEventCallbacks | The callback function is called in the thread which registered the event. In order for the callback to occur, you must be processing messages.
Note If you are receiving synchronous events faster than you are processing them, then the user interface of your application might become unresponsive.
callbackFunction DAQmxEveryNSamplesEventCallbackPtr The function that you want DAQmx to call when the event occurs. The function you pass in this parameter must have the following prototype:

int32 CVICALLBACK Callback (TaskHandle taskHandle, int32 everyNsamplesEventType, uInt32 nSamples, void *callbackData);

Upon entry to the callback, the taskHandle parameter contains the handle to the task on which the event occurred. The everyNSamplesEventType parameter contains the value you passed in the everyNSamplesEventType parameter of this function. The nSamples parameter contains the value you passed in the nSamples parameter of this function. The callbackData parameter contains the value you passed in the callbackData parameter of this function.
callbackData | void * | A value that you want DAQmx to pass to the callback function as the function data parameter. Do not pass the address of a local variable or any other variable that might not be valid when the function is executed.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxRegisterSignalEvent

int32 DAQmxRegisterSignalEvent (TaskHandle taskHandle, int32 signalID, uInt32 options, DAQmxSignalEventCallbackPtr callbackFunction, void *callbackData);

Purpose

Registers a callback function to receive an event when the specified hardware event occurs.

When you stop a task explicitly any pending events are discarded. For example, if you call DAQmxStopTask then you do not receive any pending events.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
signalID int32 The signal for which you want to receive results.
Value | Description
DAQmx_Val_SampleClock | Sample clock
DAQmx_Val_SampleCompleteEvent | Sample complete event
DAQmx_Val_ChangeDetectionEvent | Change detection event
DAQmx_Val_CounterOutputEvent | Counter output event
options uInt32 Use this parameter to set certain options. You can combine flags with the bitwise-OR operator ('|') to set multiple options. Pass a value of zero if no options need to be set.
Value | Description
0 | The callback function is called in a DAQmx thread. This is the default value.
DAQmx_Val_SynchronousEventCallbacks | The callback function is called in the thread which registered the event. In order for the callback to occur, you must be processing messages.
Note If you are receiving synchronous events faster than you are processing them, then the user interface of your application might become unresponsive.
callbackFunction DAQmxSignalEventCallbackPtr The function that you want DAQmx to call when the event occurs. The function you pass in this parameter must have the following prototype:

int32 CVICALLBACK Callback (TaskHandle taskHandle, int32 signalID, void *callbackData);

Upon entry to the callback, the taskHandle parameter contains the handle to the task on which the event occurred. The signalID parameter contains the value you passed in the signalID parameter of this function. The callbackData parameter contains the value you passed in the callbackData parameter of this function.
callbackData | void * | A value that you want DAQmx to pass to the callback function as the function data parameter. Do not pass the address of a local variable or any other variable that might not be valid when the function is executed.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxGetNthTaskChannel

int32 DAQmxGetNthTaskChannel (TaskHandle taskHandle, uInt32 index, char buffer[], int32 bufferSize);

Purpose

Returns the Nth channel. This function takes the taskHandle, index, and bufferSize you specify and returns the Nth channel.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
index | uInt32 | The Nth channel you want to return. The index starts at 1.
bufferSize | int32 | The size, in bytes, of buffer. If you pass 0, this function returns the number of bytes needed to allocate.
Output
buffer | char [] | The Nth channel in the index. If you pass NULL, this function returns the number of bytes needed to allocate.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A negative value indicates an error. For this function, if you pass NULL for the buffer or 0 for the buffer size, this function returns the number of bytes needed to allocate.


DAQmxTaskControl

int32 DAQmxTaskControl (TaskHandle taskHandle, int32 action);

Purpose

Alters the state of a task according to the action you specify. To minimize the time required to start a task, for example, DAQmxTaskControl can commit the task prior to starting.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
action int32 Specifies how to alter the task state.
Value | Description
DAQmx_Val_Task_Start | Starts execution of the task.
DAQmx_Val_Task_Stop | Stops execution of the task.
DAQmx_Val_Task_Verify | Verifies that all task parameters are valid for the hardware.
DAQmx_Val_Task_Commit | Programs the hardware as much as possible according to the task configuration.
DAQmx_Val_Task_Reserve | Reserves the hardware resources needed for the task. No other tasks can reserve these same resources.
DAQmx_Val_Task_Unreserve | Releases all previously reserved resources.
DAQmx_Val_Task_Abort | Abort is used to stop an operation, such as Read or Write, that is currently active. Abort puts the task into an unstable but recoverable state. To recover the task, call Start to restart the task or call Stop to reset the task without starting it.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIAccelChan

int32 DAQmxCreateAIAccelChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 terminalConfig, float64 minVal, float64 maxVal, int32 units, float64 sensitivity, int32 sensitivityUnits, int32 currentExcitSource, float64 currentExcitVal, const char customScaleName[]);

Purpose

Creates channel(s) that use an accelerometer to measure acceleration and adds the channel(s) to the task you specify with taskHandle.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
terminalConfig int32 The input terminal configuration for the channel.

Value | Description
DAQmx_Val_Cfg_Default (-1) | At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_InputTermCfg_RSE | Referenced single-ended mode
DAQmx_Val_InputTermCfg_NRSE | Nonreferenced single-ended mode
DAQmx_Val_InputTermCfg_Diff | Differential mode
DAQmx_Val_InputTermCfg_PseudoDiff | Pseudodifferential mode
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return acceleration measurements from the channel.

Name | Description
DAQmx_Val_AccelUnit_g | G. 1 g is approximately equal to 9.81 m/s2.
DAQmx_Val_FromCustomScale | Units specified by a custom scale. Use customScaleName to specify a custom scale.
sensitivity | float64 | The sensitivity of the sensor. This value is in the units you specify with sensitivityUnits. Refer to the sensor documentation to determine this value.
sensitivityUnits int32 The units of sensitivity.

Name | Description
DAQmx_Val_mVoltsPerG | mVolts/g.
DAQmx_Val_VoltsPerG | Volts/g.
currentExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
currentExcitVal | float64 | The amount of excitation, in amperes, that the sensor requires.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAICurrentChan

int32 DAQmxCreateAICurrentChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 terminalConfig, float64 minVal, float64 maxVal, int32 units, int32 shuntResistorLoc, float64 extShuntResistorVal, const char customScaleName[]);

Purpose

Creates channel(s) for current measurement and adds the channel(s) to the task you specify with taskHandle.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
terminalConfig int32 The input terminal configuration for the channel.

Value | Description
DAQmx_Val_Cfg_Default (-1) | At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_InputTermCfg_RSE | Referenced single-ended mode
DAQmx_Val_InputTermCfg_NRSE | Nonreferenced single-ended mode
DAQmx_Val_InputTermCfg_Diff | Differential mode
DAQmx_Val_InputTermCfg_PseudoDiff | Pseudodifferential mode
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Value | Description
DAQmx_Val_Amps | amperes
DAQmx_Val_FromCustomScale | Units a custom scale specifies. If you select this value, you must specify a custom scale name.
shuntResistorLoc int32 The location of the shunt resistor.
Value | Description
DAQmx_Val_Default | At run time, NI-DAQmx chooses the default shunt resistor location for the channel.
DAQmx_Val_Internal | Use the built-in shunt resistor of the device.
DAQmx_Val_External | Use a shunt resistor external to the device. You must specify the value of the shunt resistor in extShuntResistorVal.
extShuntResistorVal | float64 | The value, in ohms, of an external shunt resistor.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIFreqVoltageChan

int32 DAQmxCreateAIFreqVoltageChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, float64 thresholdLevel, float64 hysteresis, const char customScaleName[]);

Purpose

Creates channel(s) that use a frequency-to-voltage converter to measure frequency and adds the channel(s) to the task you specify with taskHandle.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_Hz | hertz
DAQmx_Val_FromCustomScale | Units specified by a custom scale. Use customScaleName to specify a custom scale.
thresholdLevel | float64 | The voltage level at which to recognize waveform repetitions.
hysteresis | float64 | Specifies in volts a window below thresholdLevel. The input voltage must pass below thresholdLevel minus hysteresis before NI-DAQmx recognizes a waveform repetition. Hysteresis can improve measurement accuracy when the signal contains noise or jitter.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIMicrophoneChan

int32 DAQmxCreateAIMicrophoneChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 terminalConfig, int32 units, float64 micSensitivity, float64 maxSndPressLevel, int32 currentExcitSource, float64 currentExcitVal, const char customScaleName[]);

Purpose

Creates channel(s) that use a microphone to measure sound pressure and adds the channel(s) to the task you specify with taskHandle.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
terminalConfig int32 The input terminal configuration for the channel.

Value | Description
DAQmx_Val_Cfg_Default (-1) | At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_InputTermCfg_RSE | Referenced single-ended mode
DAQmx_Val_InputTermCfg_NRSE | Nonreferenced single-ended mode
DAQmx_Val_InputTermCfg_Diff | Differential mode
DAQmx_Val_InputTermCfg_PseudoDiff | Pseudodifferential mode
units int32 The units to use to return sound pressure measurements.

Name | Description
DAQmx_Val_Pascals | pascals
DAQmx_Val_FromCustomScale | Units specified by a custom scale. Use customScaleName to specify a custom scale.
micSensitivity | float64 | The sensitivity of the microphone. Specify this value in millivolts per pascal.
maxSndPressLevel | float64 | The maximum instantaneous sound pressure level you expect to measure. This value is in decibels, referenced to 20 micropascals.
currentExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
currentExcitVal | float64 | The amount of excitation, in amperes, that the sensor requires.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIResistanceChan

int32 DAQmxCreateAIResistanceChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 resistanceConfig, int32 currentExcitSource, float64 currentExcitVal, const char customScaleName[]);

Purpose

Create channel(s) to measure resistance and adds the channel(s) to the task you specify with taskHandle.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_Ohms | ohms
DAQmx_Val_FromCustomScale | Units specified by a custom scale. Use customScaleName to specify a custom scale.
resistanceConfig int32 The configuration for resistance measurements.
Value | Description
DAQmx_Val_2Wire | 2-wire mode.
DAQmx_Val_3Wire | 3-wire mode.
DAQmx_Val_4Wire | 4-wire mode.
currentExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
currentExcitVal | float64 | The amount of excitation, in amperes, that the sensor requires.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIRTDChan

int32 DAQmxCreateAIRTDChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 rtdType, int32 resistanceConfig, int32 currentExcitSource, float64 currentExcitVal, float64 r0);

Purpose

Creates channel(s) that use an RTD to measure temperature and adds the channel(s) to the task you specify with taskHandle.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_DegR | degrees Rankine
rtdType int32 The type of RTD connected to the channel.
Value | Description
DAQmx_Val_Pt3750 | Pt3750
DAQmx_Val_Pt3851 | Pt3851
DAQmx_Val_Pt3911 | Pt3911
DAQmx_Val_Pt3916 | Pt3916
DAQmx_Val_Pt3920 | Pt3920
DAQmx_Val_Pt3928 | Pt3928
DAQmx_Val_Custom | You must specify the 'A', 'B', and 'C' constants for the Callendar-Van Dusen equation
resistanceConfig int32 The configuration for resistance measurements.
Value | Description
DAQmx_Val_2Wire | 2-wire mode.
DAQmx_Val_3Wire | 3-wire mode.
DAQmx_Val_4Wire | 4-wire mode.
currentExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
currentExcitVal | float64 | The amount of excitation, in amperes, that the sensor requires.
r0 | float64 | The sensor resistance in ohms at 0 deg C for the Callendar-Van Dusen equation Refer to the sensor documentation to determine this value.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIStrainGageChan

int32 DAQmxCreateAIStrainGageChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 strainConfig, int32 voltageExcitSource, float64 voltageExcitVal, float64 gageFactor, float64 initialBridgeVoltage, float64 nominalGageResistance, float64 poissonRatio, float64 leadWireResistance, const char customScaleName[]);

Purpose

Creates channel(s) to measure strain and adds the channel(s) to the task you specify with taskHandle.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_Strain | Strain
DAQmx_Val_FromCustomScale | Units specified by a custom scale. Use customScaleName to specify a custom scale.
strainConfig int32 The strain gage bridge configuration.
Value | Description
DAQmx_Val_FullBridgeI | Four active gages with two pairs subjected to equal and opposite strains.
DAQmx_Val_FullBridgeII | Four active gages with two aligned with maximum principal strain and two Poisson gages in adjacent arms.
DAQmx_Val_FullBridgeIII | Four active gages with two aligned with maximum principal strain and two Poisson gages in opposite arms.
DAQmx_Val_HalfBridgeI | Two active gages with one aligned with maximum principal strain and one Poisson gage.
DAQmx_Val_HalfBridgeII | Two active gages with equal and opposite strains.
DAQmx_Val_QuarterBridgeI | Single active gage.
DAQmx_Val_QuarterBridgeII | Single active gage and one dummy gage.
voltageExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
voltageExcitVal | float64 | The amount of excitation, in volts, that the sensor requires.
gageFactor | float64 | The sensitivity of the strain gages and relates the change in electrical resistance to the change in strain. Each gage in the bridge must have the same gage factor. Refer to the sensor documentation to determine this value.
initialBridgeVoltage | float64 | The bridge output voltage in the unloaded condition. NI-DAQmx subtracts this value from any measurements before applying scaling equations. Perform a voltage measurement on the bridge with no strain applied to determine this value.
nominalGageResistance | float64 | The resistance, in ohms, of the gages in an unstrained position. Each gage in the bridge must have the same nominal gage resistance. The resistance across arms of the bridge that do not have strain gages must also be the same as the nominal gage resistance. Refer to the sensor documentation to determine this value.
poissonRatio | float64 | The ratio of lateral strain to axial strain in the material in which you measure strain.
leadWireResistance | float64 | The amount, in ohms, of resistance in the lead wires. Ideally, this value is the same for all leads.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAITempBuiltInSensorChan

int32 DAQmxCreateAITempBuiltInSensorChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 units);

Purpose

Creates channel(s) to measure temperature with a built-in sensor of a terminal block or device and adds the channel(s) to the task you specify with taskHandle. On SCXI modules, for example, this could be the CJC sensor.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_DegR | degrees Rankine

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIThrmcplChan

int32 DAQmxCreateAIThrmcplChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 thermocoupleType, int32 cjcSource, float64 cjcVal, const char cjcChannel[]);

Purpose

Creates channel(s) that use a thermocouple to measure temperature and adds the channel(s) to the task you specify with taskHandle.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_DegR | degrees Rankine
thermocoupleType int32 The type of thermocouple connected to the channel.
Value | Description
DAQmx_Val_J_Type_TC | J-type thermocouple.
DAQmx_Val_K_Type_TC | K-type thermocouple.
DAQmx_Val_N_Type_TC | N-type thermocouple.
DAQmx_Val_R_Type_TC | R-type thermocouple.
DAQmx_Val_S_Type_TC | S-type thermocouple.
DAQmx_Val_T_Type_TC | T-type thermocouple.
DAQmx_Val_B_Type_TC | B-type thermocouple.
DAQmx_Val_E_Type_TC | E-type thermocouple.
cjcSource int32 The source of cold junction compensation.
Value | Description
DAQmx_Val_BuiltIn | Use a cold-junction compensation channel built into the terminal block.
DAQmx_Val_ConstVal | You must specify the cold-junction temperature.
DAQmx_Val_Chan | Use a channel for cold-junction compensation.
cjcVal | float64 | The temperature of the cold junction of the thermocouple if you set cjcSource to DAQmx_Val_ConstVal.
cjcChannel | const char [] | The channel that acquires the temperature of the thermocouple cold-junction if you set cjcSource to DAQmx_Val_Chan. You can use a global channel or another virtual channel already in the task. If the channel is a temperature channel, NI-DAQmx acquires the temperature in the correct units. Other channel types, such as a resistance channel with a custom sensor, must use a custom scale to scale values to degrees Celsius.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIThrmstrChanIex

int32 DAQmxCreateAIThrmstrChanIex (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 resistanceConfig, int32 currentExcitSource, float64 currentExcitVal, float64 a, float64 b, float64 c);

Purpose

Creates channel(s) that use a thermistor to measure temperature and adds the channel(s) to the task you specify with taskHandle. Use this function when the thermistor requires current excitation.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_DegR | degrees Rankine
resistanceConfig int32 The configuration for resistance measurements.
Value | Description
DAQmx_Val_2Wire | 2-wire mode.
DAQmx_Val_3Wire | 3-wire mode.
DAQmx_Val_4Wire | 4-wire mode.
currentExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
currentExcitVal | float64 | The amount of excitation, in amperes, that the sensor requires.
a | float64 | The A constant from the Steinhart-Hart thermistor equation.
b | float64 | The B constant from the Steinhart-Hart thermistor equation.
c | float64 | The C constant from the Steinhart-Hart thermistor equation.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIThrmstrChanVex

int32 DAQmxCreateAIThrmstrChanVex (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 resistanceConfig, int32 voltageExcitSource, float64 voltageExcitVal, float64 a, float64 b, float64 c, float64 r1);

Purpose

Creates channel(s) that use a thermistor to measure temperature and adds the channel(s) to the task you specify with taskHandle. Use this function when the thermistor requires voltage excitation.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_DegR | degrees Rankine
resistanceConfig int32 The configuration for resistance measurements.
Value | Description
DAQmx_Val_2Wire | 2-wire mode.
DAQmx_Val_3Wire | 3-wire mode.
DAQmx_Val_4Wire | 4-wire mode.
voltageExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
voltageExcitVal | float64 | The amount of excitation, in volts, that the sensor requires.
a | float64 | The A constant from the Steinhart-Hart thermistor equation.
b | float64 | The B constant from the Steinhart-Hart thermistor equation.
c | float64 | The C constant from the Steinhart-Hart thermistor equation.
r1 | float64 | The value, in ohms, of the reference resistor.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIVoltageChan

int32 DAQmxCreateAIVoltageChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 terminalConfig, float64 minVal, float64 maxVal, int32 units, const char customScaleName[]);

Purpose

Creates channel(s) to measure voltage and adds the channel(s) to the task you specify with taskHandle. If your measurement requires the use of internal excitation or you need the voltage to be scaled by excitation, call DAQmxCreateAIVoltageChanWithExcit.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
terminalConfig int32 The input terminal configuration for the channel.

Value | Description
DAQmx_Val_Cfg_Default (-1) | At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_InputTermCfg_RSE | Referenced single-ended mode
DAQmx_Val_InputTermCfg_NRSE | Nonreferenced single-ended mode
DAQmx_Val_InputTermCfg_Diff | Differential mode
DAQmx_Val_InputTermCfg_PseudoDiff | Pseudodifferential mode
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the voltage measurements.
Name | Description
DAQmx_Val_Volts | volts
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIVoltageChanWithExcit

int32 DAQmxCreateAIVoltageChanWithExcit (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 terminalConfig, float64 minVal, float64 maxVal, int32 units, int32 bridgeConfig, int32 voltageExcitSource, float64 voltageExcitVal, bool32 useExcitForScaling, const char customScaleName[]);

Purpose

Creates channel(s) to measure voltage and adds the channels to the task you specify with taskHandle. Use this instance for custom sensors that require excitation. You can choose to use the excitation to scale the measurement.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
terminalConfig int32 The input terminal configuration for the channel.

Value | Description
DAQmx_Val_Cfg_Default (-1) | At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_InputTermCfg_RSE | Referenced single-ended mode
DAQmx_Val_InputTermCfg_NRSE | Nonreferenced single-ended mode
DAQmx_Val_InputTermCfg_Diff | Differential mode
DAQmx_Val_InputTermCfg_PseudoDiff | Pseudodifferential mode
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the voltage measurements.
Name | Description
DAQmx_Val_Volts | volts
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
bridgeConfig int32 The type of Wheatstone bridge the sensor is.
Value | Description
DAQmx_Val_FullBridge | Sensor is a full bridge. If you set useExcitForScaling to TRUE, NI-DAQmx divides the measurement by the excitation value. Many sensors scale data to native units using scaling of volts per excitation.
DAQmx_Val_HalfBridge | Sensor is a half bridge. If you set useExcitForScaling to TRUE, NI-DAQmx divides the measurement by the excitation value. Many sensors scale data to native units using scaling of volts per excitation.
DAQmx_Val_QuarterBridge | Sensor is a quarter bridge. If you set useExcitForScaling to TRUE, NI-DAQmx divides the measurement by the excitation value. Many sensors scale data to native units using scaling of volts per excitation.
DAQmx_Val_NoBridge | Sensor is not a Wheatstone bridge.
voltageExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
voltageExcitVal | float64 | The amount of excitation, in volts, that the sensor requires.
useExcitForScaling bool32 Specifies whether NI-DAQmx divides the measurement by the excitation. You should typically set useExcitForScaling to TRUE for ratiometric transducers. If you set useExcitForScaling to TRUE, set maxVal and minVal to reflect the scaling.

For example, if you expect to acquire a voltage between -5 and 5, and you use an excitation of .10 volts to scale the measurement, set minVal to -50 and set maxVal to 50. If you set bridgeConfig to DAQmx_Val_NoBridge, useExcitForScaling has no effect on the measurement.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIPosLVDTChan

int32 DAQmxCreateAIPosLVDTChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, float64 sensitivity, int32 sensitivityUnits, int32 voltageExcitSource, float64 voltageExcitVal, float64 voltageExcitFreq, int32 ACExcitWireMode, const char customScaleName[]);

Purpose

Creates channel(s) that use an LVDT to measure linear position and adds the channel(s) to the task you specify with taskHandle.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return linear position measurements from the channel.

Name | Description
DAQmx_Val_Meters | Meters
DAQmx_Val_Inches | Inches
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
sensitivity | float64 | The sensitivity of the sensor. This value is in the units you specify with sensitivityUnits. Refer to the sensor documentation to determine this value.
sensitivityUnits int32 The units of sensitivity.

Name | Description
DAQmx_Val_mVoltsPerVoltPerMillimeter | mvolts/volt/mmeter
DAQmx_Val_mVoltsPerVoltPerMilliInch | mvolts/volt/0.001 inch
voltageExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
voltageExcitVal | float64 | The amount of excitation, in volts, that the sensor requires.
voltageExcitFreq | float64 | The excitation frequency, in hertz, that the sensor requires. Refer to the sensor documentation to determine this value.
ACExcitWireMode int32 The number of leads on the sensor. Some sensors may require you to tie leads together to create a 4-wire or 5-wire sensor. Refer to the documentation for your sensor for more information.
Value | Description
DAQmx_Val_4Wire | 4-wire.
DAQmx_Val_5Wire | 5-wire.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIPosRVDTChan

int32 DAQmxCreateAIPosRVDTChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, float64 sensitivity, int32 sensitivityUnits, int32 voltageExcitSource, float64 voltageExcitVal, float64 voltageExcitFreq, int32 ACExcitWireMode, const char customScaleName[]);

Purpose

Creates channel(s) that use an RVDT to measure angular position and adds the channel(s) to the task you specify with taskHandle.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return angular position measurements from the channel.

Name | Description
DAQmx_Val_Degrees | Degrees
DAQmx_Val_Radians | Radians
DAQmx_Val_FromCustomScale | Units specified by a custom scale. Use customScaleName to specify a custom scale.
sensitivity | float64 | The sensitivity of the sensor. This value is in the units you specify with sensitivityUnits. Refer to the sensor documentation to determine this value.
sensitivityUnits int32 The units of sensitivity.

Name | Description
DAQmx_Val_mVoltsPerVoltPerDegree | mvolts/volt/degree
DAQmx_Val_mVoltsPerVoltPerRadian | mvolts/volt/radian
voltageExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
voltageExcitVal | float64 | The amount of excitation, in volts, that the sensor requires.
voltageExcitFreq | float64 | The excitation frequency, in hertz, that the sensor requires. Refer to the sensor documentation to determine this value.
ACExcitWireMode int32 The number of leads on the sensor. Some sensors may require you to tie leads together to create a 4-wire or 5-wire sensor. Refer to the documentation for your sensor for more information.
Value | Description
DAQmx_Val_4Wire | 4-wire.
DAQmx_Val_5Wire | 5-wire.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAIDeviceTempChan

int32 DAQmxCreateAIDeviceTempChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 units);

Purpose

Creates channel(s) that use a sensor built into a terminal block or device to measure temperature and adds the channel(s) to the task you specify with taskHandle. On SCXI modules, for example, this could be the CJC sensor.

Note This function is obsolete. Use DAQmxCreateAITempBuiltInSensorChan instead.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_DegR | degrees Rankine

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTEDSAIAccelChan

int32 DAQmxCreateTEDSAIAccelChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 terminalConfig, float64 minVal, float64 maxVal, int32 units, int32 currentExcitSource, float64 currentExcitVal, const char customScaleName[]);

Purpose

Creates channel(s) that use an accelerometer to measure acceleration and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
terminalConfig int32 The input terminal configuration for the channel.

Value | Description
DAQmx_Val_Cfg_Default (-1) | At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_InputTermCfg_RSE | Referenced single-ended mode
DAQmx_Val_InputTermCfg_NRSE | Nonreferenced single-ended mode
DAQmx_Val_InputTermCfg_Diff | Differential mode
DAQmx_Val_InputTermCfg_PseudoDiff | Pseudodifferential mode
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return acceleration measurements from the channel.

Name | Description
DAQmx_Val_AccelUnit_g | G. 1 g is approximately equal to 9.81 m/s2.
DAQmx_Val_FromCustomScale | Units specified by a custom scale. Use customScaleName to specify a custom scale.
currentExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
currentExcitVal | float64 | The amount of excitation, in amperes, that the sensor requires.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTEDSAICurrentChan

int32 DAQmxCreateTEDSAICurrentChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 terminalConfig, float64 minVal, float64 maxVal, int32 units, int32 shuntResistorLoc, float64 externalShuntResistorValue, const char customScaleName[]);

Purpose

Creates channel(s) to measure current and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
terminalConfig int32 The input terminal configuration for the channel.

Value | Description
DAQmx_Val_Cfg_Default (-1) | At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_InputTermCfg_RSE | Referenced single-ended mode
DAQmx_Val_InputTermCfg_NRSE | Nonreferenced single-ended mode
DAQmx_Val_InputTermCfg_Diff | Differential mode
DAQmx_Val_InputTermCfg_PseudoDiff | Pseudodifferential mode
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return measurements.
Name | Description
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
DAQmx_Val_FromTEDS | Units defined by TEDS information associated with the channel.
shuntResistorLoc int32 The location of the shunt resistor.
Value | Description
DAQmx_Val_Internal | Use the built-in shunt resistor of the device.
DAQmx_Val_External | Use a shunt resistor external to the device. You must specify the value of the shunt resistor in extShuntResistorVal.
extShuntResistorVal | float64 | The value, in ohms, of an external shunt resistor.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTEDSAIMicrophoneChan

int32 DAQmxCreateTEDSAIMicrophoneChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 terminalConfig, int32 units, float64 maxSndPressLevel, int32 currentExcitSource, float64 currentExcitVal, const char customScaleName[]);

Purpose

Creates channel(s) that use a microphone to measure sound pressure and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
terminalConfig int32 The input terminal configuration for the channel.

Value | Description
DAQmx_Val_Cfg_Default (-1) | At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_InputTermCfg_RSE | Referenced single-ended mode
DAQmx_Val_InputTermCfg_NRSE | Nonreferenced single-ended mode
DAQmx_Val_InputTermCfg_Diff | Differential mode
DAQmx_Val_InputTermCfg_PseudoDiff | Pseudodifferential mode
units int32 The units to use to return sound pressure measurements.

Name | Description
DAQmx_Val_Pascals | pascals
DAQmx_Val_FromCustomScale | Units specified by a custom scale. Use customScaleName to specify a custom scale.
maxSndPressLevel | float64 | The maximum instantaneous sound pressure level you expect to measure. This value is in decibels, referenced to 20 micropascals.
currentExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
currentExcitVal | float64 | The amount of excitation, in amperes, that the sensor requires.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTEDSAIResistanceChan

int32 DAQmxCreateTEDSAIResistanceChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 resistanceConfig, int32 currentExcitSource, float64 currentExcitVal, const char customScaleName[]);

Purpose

Creates channel(s) to measure resistance and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return measurements.
Name | Description
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
DAQmx_Val_FromTEDS | Units defined by TEDS information associated with the channel.
resistanceConfig int32 The configuration for resistance measurements.
Value | Description
DAQmx_Val_2Wire | 2-wire mode.
DAQmx_Val_3Wire | 3-wire mode.
DAQmx_Val_4Wire | 4-wire mode.
currentExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
currentExcitVal | float64 | The amount of excitation, in amperes, that the sensor requires.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTEDSAIRTDChan

int32 DAQmxCreateTEDSAIRTDChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 resistanceConfig, int32 currentExcitSource, float64 currentExcitVal);

Purpose

Creates channel(s) that use an RTD to measure temperature and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_DegR | degrees Rankine
resistanceConfig int32 The configuration for resistance measurements.
Value | Description
DAQmx_Val_2Wire | 2-wire mode.
DAQmx_Val_3Wire | 3-wire mode.
DAQmx_Val_4Wire | 4-wire mode.
currentExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
currentExcitVal | float64 | The amount of excitation, in amperes, that the sensor requires.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTEDSAIStrainGageChan

int32 DAQmxCreateTEDSAIStrainGageChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 voltageExcitSource, float64 voltageExcitVal, float64 initialBridgeVoltage, float64 leadWireResistance, const char customScaleName[]);

Purpose

Creates channel(s) to measure strain and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_Strain | Strain
DAQmx_Val_FromCustomScale | Units specified by a custom scale. Use customScaleName to specify a custom scale.
voltageExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
voltageExcitVal | float64 | The amount of excitation, in volts, that the sensor requires.
initialBridgeVoltage | float64 | The bridge output voltage in the unloaded condition. NI-DAQmx subtracts this value from any measurements before applying scaling equations. Perform a voltage measurement on the bridge with no strain applied to determine this value.
leadWireResistance | float64 | The amount, in ohms, of resistance in the lead wires. Ideally, this value is the same for all leads.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTEDSAIThrmcplChan

int32 DAQmxCreateTEDSAIThrmcplChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 cjcSource, float64 cjcVal, const char cjcChannel[]);

Purpose

Creates channel(s) that use a thermocouple to measure temperature and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_DegR | degrees Rankine
cjcSource int32 The source of cold junction compensation.
Value | Description
DAQmx_Val_BuiltIn | Use a cold-junction compensation channel built into the terminal block.
DAQmx_Val_ConstVal | You must specify the cold-junction temperature.
DAQmx_Val_Chan | Use a channel for cold-junction compensation.
cjcVal | float64 | The temperature of the cold junction of the thermocouple if you set cjcSource to DAQmx_Val_ConstVal.
cjcChannel | const char [] | The channel that acquires the temperature of the thermocouple cold-junction if you set cjcSource to DAQmx_Val_Chan. You can use a global channel or another virtual channel already in the task. If the channel is a temperature channel, NI-DAQmx acquires the temperature in the correct units. Other channel types, such as a resistance channel with a custom sensor, must use a custom scale to scale values to degrees Celsius.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTEDSAIThrmstrChanIex

int32 DAQmxCreateTEDSAIThrmstrChanIex (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 resistanceConfig, int32 currentExcitSource, float64 currentExcitVal);

Purpose

Creates channel(s) that use a thermistor to measure temperature and adds the channel(s) to the task you specify with taskHandle. Use this instance when the thermistor requires current excitation. You must configure the physical channel(s) with TEDS information to use this function.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_DegR | degrees Rankine
resistanceConfig int32 The configuration for resistance measurements.
Value | Description
DAQmx_Val_2Wire | 2-wire mode.
DAQmx_Val_3Wire | 3-wire mode.
DAQmx_Val_4Wire | 4-wire mode.
currentExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use currentExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
currentExcitVal | float64 | The amount of excitation, in amperes, that the sensor requires.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTEDSAIThrmstrChanVex

int32 DAQmxCreateTEDSAIThrmstrChanVex (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 resistanceConfig, int32 voltageExcitSource, float64 voltageExcitVal, float64 r1);

Purpose

Creates channel(s) that use a thermistor to measure temperature and adds the channel(s) to the task you specify with taskHandle. Use this instance when the thermistor requires voltage excitation. You must configure the physical channel(s) with TEDS information to use this function.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_DegR | degrees Rankine
resistanceConfig int32 The configuration for resistance measurements.
Value | Description
DAQmx_Val_2Wire | 2-wire mode.
DAQmx_Val_3Wire | 3-wire mode.
DAQmx_Val_4Wire | 4-wire mode.
voltageExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
voltageExcitVal | float64 | The amount of excitation, in volts, that the sensor requires.
r1 | float64 | The value, in ohms, of the reference resistor.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTEDSAIVoltageChan

int32 DAQmxCreateTEDSAIVoltageChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 terminalConfig, float64 minVal, float64 maxVal, int32 units, const char customScaleName[]);

Purpose

Creates channel(s) to measure voltage and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function. If your measurement requires the use of internal excitation or you need the voltage to be scaled by the excitation, use the DAQmxCreateTEDSAIVoltageChanWithExcit function.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
terminalConfig int32 The input terminal configuration for the channel.

Value | Description
DAQmx_Val_Cfg_Default (-1) | At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_InputTermCfg_RSE | Referenced single-ended mode
DAQmx_Val_InputTermCfg_NRSE | Nonreferenced single-ended mode
DAQmx_Val_InputTermCfg_Diff | Differential mode
DAQmx_Val_InputTermCfg_PseudoDiff | Pseudodifferential mode
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return measurements.
Name | Description
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
DAQmx_Val_FromTEDS | Units defined by TEDS information associated with the channel.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTEDSAIVoltageChanWithExcit

int32 DAQmxCreateTEDSAIVoltageChanWithExcit (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 terminalConfig, float64 minVal, float64 maxVal, int32 units, int32 voltageExcitSource, float64 voltageExcitVal, const char customScaleName[]);

Purpose

Creates channel(s) to measure voltage and adds the channel(s) to the task you specify with taskHandle. Use this instance for custom sensors that require excitation. You can use the excitation to scale the measurement. You must configure the physical channel(s) with TEDS information to use this function.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
terminalConfig int32 The input terminal configuration for the channel.

Value | Description
DAQmx_Val_Cfg_Default (-1) | At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_InputTermCfg_RSE | Referenced single-ended mode
DAQmx_Val_InputTermCfg_NRSE | Nonreferenced single-ended mode
DAQmx_Val_InputTermCfg_Diff | Differential mode
DAQmx_Val_InputTermCfg_PseudoDiff | Pseudodifferential mode
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return measurements.
Name | Description
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
DAQmx_Val_FromTEDS | Units defined by TEDS information associated with the channel.
voltageExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
voltageExcitVal | float64 | The amount of excitation, in volts, that the sensor requires.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTEDSAIPosLVDTChan

int32 DAQmxCreateTEDSAIPosLVDTChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 voltageExcitSource, float64 voltageExcitVal, float64 voltageExcitFreq, int32 ACExcitWireMode, const char customScaleName[]);

Purpose

Creates channel(s) that use an LVDT to measure linear position and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return linear position measurements from the channel.

Name | Description
DAQmx_Val_Meters | meters
DAQmx_Val_Inches | inches
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
voltageExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
voltageExcitVal | float64 | The amount of excitation, in volts, that the sensor requires.
voltageExcitFreq | float64 | The excitation frequency, in hertz, that the sensor requires. Refer to the sensor documentation to determine this value.
ACExcitWireMode int32 The number of leads on the sensor. Some sensors may require you to tie leads together to create a 4-wire or 5-wire sensor. Refer to the documentation for your sensor for more information.
Value | Description
DAQmx_Val_4Wire | 4-wire.
DAQmx_Val_5Wire | 5-wire.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTEDSAIPosRVDTChan

int32 DAQmxCreateTEDSAIPosRVDTChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 voltageExcitSource, float64 voltageExcitVal, float64 voltageExcitFreq, int32 ACExcitWireMode, const char customScaleName[]);

Purpose

Creates channel(s) that use an RVDT to measure angular position and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return angular position measurements from the channel.

Name | Description
DAQmx_Val_Degrees | degrees
DAQmx_Val_Radians | radians
DAQmx_Val_FromCustomScale | Units specified by a custom scale. Use customScaleName to specify a custom scale.
voltageExcitSource int32 The source of excitation.
Value | Description
DAQmx_Val_Internal | Use the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_External | Use an excitation source other than the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None | Supply no excitation to the channel. You cannot use this value if the sensor requires excitation.
voltageExcitVal | float64 | The amount of excitation, in volts, that the sensor requires.
voltageExcitFreq | float64 | The excitation frequency, in hertz, that the sensor requires. Refer to the sensor documentation to determine this value.
ACExcitWireMode int32 The number of leads on the sensor. Some sensors may require you to tie leads together to create a 4-wire or 5-wire sensor. Refer to the documentation for your sensor for more information.
Value | Description
DAQmx_Val_4Wire | 4-wire.
DAQmx_Val_5Wire | 5-wire.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAOCurrentChan

int32 DAQmxCreateAOCurrentChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, const char customScaleName[]);

Purpose

Creates channel(s) to generate current and adds the channel(s) to the task you specify with taskHandle.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to generate.
maxVal | float64 | The maximum value, in units, that you expect to generate.
units int32 The units in which to generate current.
Value | Description
DAQmx_Val_Amps | amperes
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateAOVoltageChan

int32 DAQmxCreateAOVoltageChan (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, const char customScaleName[]);

Purpose

Creates channel(s) to generate voltage and adds the channel(s) to the task you specify with taskHandle.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
physicalChannel | const char [] | The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to generate.
maxVal | float64 | The maximum value, in units, that you expect to generate.
units int32 The units in which to generate voltage.
Name | Description
DAQmx_Val_Volts | volts
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateDIChan

int32 DAQmxCreateDIChan (TaskHandle taskHandle, const char lines[], const char nameToAssignToLines[], int32 lineGrouping);

Purpose

Creates channel(s) to measure digital signals and adds the channel(s) to the task you specify with taskHandle. You can group digital lines into one digital channel or separate them into multiple digital channels. If you specify one or more entire ports in lines by using port physical channel names, you cannot separate the ports into multiple channels. To separate ports into multiple channels, use this function multiple times with a different port each time.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
lines | const char [] | The names of the digital lines used to create a virtual channel. You can specify a list or range of lines.
nameToAssignToLines | const char [] | The name of the created virtual channel(s). If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToLines, you must use the names when you refer to these channels in other NI-DAQmx functions.
lineGrouping int32 Specifies whether to group digital lines into one or more virtual channels. If you specify one or more entire ports in lines, you must set lineGrouping to DAQmx_Val_ChanForAllLines.
Value | Description
DAQmx_Val_ChanPerLine | One channel for each line
DAQmx_Val_ChanForAllLines | One channel for all lines

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateDOChan

int32 DAQmxCreateDOChan (TaskHandle taskHandle, const char lines[], const char nameToAssignToLines[], int32 lineGrouping);

Purpose

Creates channel(s) to generate digital signals and adds the channel(s) to the task you specify with taskHandle. You can group digital lines into one digital channel or separate them into multiple digital channels. If you specify one or more entire ports in lines by using port physical channel names, you cannot separate the ports into multiple channels. To separate ports into multiple channels, use this function multiple times with a different port each time.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
lines | const char [] | The names of the digital lines used to create a virtual channel. You can specify a list or range of lines.
nameToAssignToLines | const char [] | The name of the created virtual channel(s). If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToLines, you must use the names when you refer to these channels in other NI-DAQmx functions.
lineGrouping int32 Specifies whether to group digital lines into one or more virtual channels. If you specify one or more entire ports in lines, you must set lineGrouping to DAQmx_Val_ChanForAllLines.
Value | Description
DAQmx_Val_ChanPerLine | One channel for each line
DAQmx_Val_ChanForAllLines | One channel for all lines

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateCICountEdgesChan

int32 DAQmxCreateCICountEdgesChan (TaskHandle taskHandle, const char counter[], const char nameToAssignToChannel[], int32 edge, uInt32 initialCount, int32 countDirection);

Purpose

Creates a channel to count the number of rising or falling edges of a digital signal and adds the channel to the task you specify with taskHandle. You can create only one counter input channel at a time with this function because a task can include only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
counter | const char [] | The name of the counter to use to create virtual channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
edge int32 Specifies on which edges of the input signal to increment or decrement the count.

Value | Description
DAQmx_Val_Rising | Rising edge(s).
DAQmx_Val_Falling | Falling edge(s).
initialCount | uInt32 | The value from which to start counting.
countDirection int32 Specifies whether to increment or decrement the counter on each edge.

Value | Description
DAQmx_Val_CountUp | Increment the count register on each edge.
DAQmx_Val_CountDown | Decrement the count register on each edge.
DAQmx_Val_ExtControlled | The state of a digital line controls the count direction. Each counter has a default count direction terminal.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateCIFreqChan

int32 DAQmxCreateCIFreqChan (TaskHandle taskHandle, const char counter[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 edge, int32 measMethod, float64 measTime, uInt32 divisor, const char customScaleName[]);

Purpose

Creates a channel to measure the frequency of a digital signal and adds the channel to the task you specify with taskHandle. You can create only one counter input channel at a time with this function because a task can include only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
counter | const char [] | The name of the counter to use to create virtual channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Name | Description
DAQmx_Val_Hz | hertz
DAQmx_Val_Ticks | Timebase ticks
DAQmx_Val_FromCustomScale | Units by a custom scale. Use customScaleName to specify a custom scale.
edge int32 Specifies between which edges to measure the frequency or period of the signal.
Value | Description
DAQmx_Val_Rising | Rising edge(s).
DAQmx_Val_Falling | Falling edge(s).
measMethod int32 The method used to calculate the period or frequency of the signal.
Value | Description
DAQmx_Val_LowFreq1Ctr | Use one counter that uses a constant timebase to measure the input signal.
DAQmx_Val_HighFreq2Ctr | Use two counters, one of which counts pulses of the signal to measure during the specified measurement time.
DAQmx_Val_LargeRng2Ctr | Use one counter to divide the frequency of the input signal to create a lower-frequency signal that the second counter can more easily measure.
measTime float64 The length of time to measure the frequency or period of a digital signal, when measMethod is DAQmx_Val_HighFreq2Ctr. Measurement accuracy increases with increased measurement time and with increased signal frequency.

Caution If you measure a high-frequency signal for too long a time, the count register could roll over, resulting in an incorrect measurement.
divisor | uInt32 | The value by which to divide the input signal, when measMethod is DAQmx_Val_LargeRng2Ctr. The larger this value, the more accurate the measurement, but too large a value can cause the count register to roll over, resulting in an incorrect measurement.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateCIPeriodChan

int32 DAQmxCreateCIPeriodChan (TaskHandle taskHandle, const char counter[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 edge, int32 measMethod, float64 measTime, uInt32 divisor, const char customScaleName[]);

Purpose

Creates a channel to measure the period of a digital signal and adds the channel to the task you specify with taskHandle. You can create only one counter input channel at a time with this function because a task can include only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Note When measMethod is set to DAQmx_Val_LowFreq1Ctr, you must pass the values 0.000001 for measTime and 4 for divisor. These values will be ignored by the function, but if they are not passed, the function returns an error.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
counter | const char [] | The name of the counter to use to create virtual channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Value | Description
DAQmx_Val_Seconds | seconds
DAQmx_Val_Ticks | Timebase ticks
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
edge int32 Specifies between which edges to measure the frequency or period of the signal.
Value | Description
DAQmx_Val_Rising | Rising edge(s).
DAQmx_Val_Falling | Falling edge(s).
measMethod int32 Specifies the method used to calculate the frequency or period of the signal.
Value | Description
DAQmx_Val_LowFreq1Ctr | Use one counter that uses a constant timebase to measure the input signal.
DAQmx_Val_HighFreq2Ctr | Use two counters, one of which counts pulses of the signal to measure during the specified measurement time.
DAQmx_Val_LargeRng2Ctr | Use one counter to divide the frequency of the input signal to create a lower-frequency signal that the second counter can more easily measure.
measTime float64 The length of time to measure the frequency or period of a digital signal, when measMethod is DAQmx_Val_HighFreq2Ctr. Measurement accuracy increases with increased measurement time and with increased signal frequency.

Caution If you measure a high-frequency signal for too long a time, the count register could roll over, resulting in an incorrect measurement.
divisor | uInt32 | The value by which to divide the input signal, when measMethod is DAQmx_Val_LargeRng2Ctr. The larger this value, the more accurate the measurement, but too large a value can cause the count register to roll over, resulting in an incorrect measurement.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateCIPulseWidthChan

int32 DAQmxCreateCIPulseWidthChan (TaskHandle taskHandle, const char counter[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 startingEdge, const char customScaleName[]);

Purpose

Creates a channel to measure the width of a digital pulse and adds the channel to the task you specify with taskHandle. startingEdge determines whether to measure a high pulse or a low pulse. You can create only one counter input channel at a time with this function because a task can include only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
counter | const char [] | The name of the counter to use to create virtual channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Value | Description
DAQmx_Val_Seconds | seconds
DAQmx_Val_Ticks | Timebase ticks
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
startingEdge int32 Specifies on which edge to begin measuring pulse width.
Value | Description
DAQmx_Val_Rising | Rising edge(s).
DAQmx_Val_Falling | Falling edge(s).
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateCISemiPeriodChan

int32 DAQmxCreateCISemiPeriodChan (TaskHandle taskHandle, const char counter[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, const char customScaleName[]);

Purpose

Creates a channel to measure the time between state transitions of a digital signal and adds the channel to the task you specify with taskHandle. You can create only one counter input channel at a time with this function because a task can include only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
counter | const char [] | The name of the counter to use to create virtual channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Value | Description
DAQmx_Val_Seconds | seconds
DAQmx_Val_Ticks | Timebase ticks
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateCITwoEdgeSepChan

DAQmxCreateCITwoEdgeSepChan (TaskHandle taskHandle, const char counter[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 firstEdge, int32 secondEdge, const char customScaleName[]);

Purpose

Creates a channel that measures the amount of time between the rising or falling edge of one digital signal and the rising or falling edge of another digital signal. You can create only one counter input channel at a time with this function because a task can include only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signals to the default input terminals of the counter unless you select different input terminals.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
counter | const char [] | The name of the counter to use to create virtual channels.
nameToAssignToChannel const char [] The name to assign to the created virtual channel. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minVal | float64 | The minimum value, in units, that you expect to measure.
maxVal | float64 | The maximum value, in units, that you expect to measure.
units int32 The units to use to return the measurement.
Value | Description
DAQmx_Val_Seconds | seconds
DAQmx_Val_Ticks | Timebase ticks
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
firstEdge int32 Specifies on which edge of the first signal to start each measurement.

Name | Description
DAQmx_Val_Rising | Start each measurement on the rising edge of the first signal.
DAQmx_Val_Falling | Start each measurement on the falling edge of the first signal.
secondEdge int32 Specifies on which edge of the first signal to stop each measurement.

Name | Description
DAQmx_Val_Rising | Stop each measurement on the rising edge of the second signal.
DAQmx_Val_Falling | Stop each measurement on the falling edge of the second signal.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateCILinEncoderChan

int32 DAQmxCreateCILinEncoderChan (TaskHandle taskHandle, const char counter[], const char nameToAssignToChannel[], int32 decodingType, bool32 ZidxEnable, float64 ZidxVal, int32 ZidxPhase, int32 units, float64 distPerPulse, float64 initialPos, const char customScaleName[]);

Purpose

Creates a channel that uses a linear encoder to measure linear position. You can create only one counter input channel at a time with this function because a task can include only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signals to the default input terminals of the counter unless you select different input terminals.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
counter | const char [] | The name of the counter to use to create virtual channels.
nameToAssignToChannel const char [] The name to assign to the created virtual channel. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
decodingType int32 Specifies how to count and interpret the pulses that the encoder generates on signal A and signal B. DAQmx_Val_X1, DAQmx_Val_X2, and DAQmx_Val_X4 are valid for quadrature encoders only. DAQmx_Val_TwoPulseCounting is valid only for two-pulse encoders.

DAQmx_Val_X2 and DAQmx_Val_X4 decoding are more sensitive to smaller changes in position than DAQmx_Val_X1 encoding, with DAQmx_Val_X4 being the most sensitive. However, more sensitive decoding is more likely to produce erroneous measurements if there is vibration in the encoder or other noise in the signals.

Value | Description
DAQmx_Val_X1 | If signal A leads signal B, count the rising edges of signal A. If signal B leads signal A, count the falling edges of signal A.
DAQmx_Val_X2 | Count the rising and falling edges of signal A.
DAQmx_Val_X4 | Count the rising and falling edges of both signal A and signal B.
DAQmx_Val_TwoPulseCounting | Increment the count on rising edges of signal A. Decrement the count on rising pulses of signal B.
ZidxEnable | bool32 | Specifies whether to enable z indexing for the measurement.
ZidxVal | float64 | The value, in units, to which to reset the measurement when signal Z is high and signal A and signal B are at the states you specify with ZidxPhase.
ZidxPhase int32 The states at which signal A and signal B must be while signal Z is high for NI-DAQmx to reset the measurement. If signal Z is never high while the signal A and signal B are high, for example, you must choose a phase other than DAQmx_Val_AHighBHigh.

When signal Z goes high and how long it stays high varies from encoder to encoder. Refer to the documentation for the encoder to determine the timing of signal Z with respect to signal A and signal B.
Value | Description
DAQmx_Val_AHighBHigh | Reset the measurement when both signal A and signal B are at high logic.
DAQmx_Val_AHighBLow | Reset the measurement when signal A is at high logic and signal B is at low logic.
DAQmx_Val_ALowBHigh | Reset the measurement when signal A is at low logic and signal B is at high logic.
DAQmx_Val_ALowBLow | Reset the measurement when both signal A and signal B are at low logic.
units int32 The units to use to return linear position measurements from the channel.

Name | Description
DAQmx_Val_Meters | Meters.
DAQmx_Val_Inches | Inches.
DAQmx_Val_Ticks | Timebase Ticks.
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
distPerPulse | float64 | The distance measured for each pulse the encoder generates. Specify this value in units.
initialPos | float64 | The position of the encoder when the measurement begins. This value is in units.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateCIAngEncoderChan

int32 DAQmxCreateCIAngEncoderChan (TaskHandle taskHandle, const char counter[], const char nameToAssignToChannel[], int32 decodingType, bool32 ZidxEnable, float64 ZidxVal, int32 ZidxPhase, int32 units, uInt32 pulsesPerRev, float64 initialAngle, const char customScaleName[]);

Purpose

Creates a channel that uses an angular encoder to measure angular position. You can create only one counter input channel at a time with this function because a task can include only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signals to the default input terminals of the counter unless you select different input terminals.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
counter | const char [] | The name of the counter to use to create virtual channels.
nameToAssignToChannel const char [] The name to assign to the created virtual channel. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
decodingType int32 Specifies how to count and interpret the pulses that the encoder generates on signal A and signal B. DAQmx_Val_X1, DAQmx_Val_X2, and DAQmx_Val_X4 are valid for quadrature encoders only. DAQmx_Val_TwoPulseCounting is valid only for two-pulse encoders.

DAQmx_Val_X2 and DAQmx_Val_X4 decoding are more sensitive to smaller changes in position than DAQmx_Val_X1 encoding, with DAQmx_Val_X4 being the most sensitive. However, more sensitive decoding is more likely to produce erroneous measurements if there is vibration in the encoder or other noise in the signals.

Value | Description
DAQmx_Val_X1 | If signal A leads signal B, count the rising edges of signal A. If signal B leads signal A, count the falling edges of signal A.
DAQmx_Val_X2 | Count the rising and falling edges of signal A.
DAQmx_Val_X4 | Count the rising and falling edges of both signal A and signal B.
DAQmx_Val_TwoPulseCounting | Increment the count on rising edges of signal A. Decrement the count on rising pulses of signal B.
ZidxEnable | bool32 | Specifies whether to enable z indexing for the measurement.
ZidxVal | float64 | The value, in units, to which to reset the measurement when signal Z is high and signal A and signal B are at the states you specify with ZidxPhase.
ZidxPhase int32 The states at which signal A and signal B must be while signal Z is high for NI-DAQmx to reset the measurement. If signal Z is never high while the signal A and signal B are high, for example, you must choose a phase other than DAQmx_Val_AHighBHigh.

When signal Z goes high and how long it stays high varies from encoder to encoder. Refer to the documentation for the encoder to determine the timing of signal Z with respect to signal A and signal B.
Value | Description
DAQmx_Val_AHighBHigh | Reset the measurement when both signal A and signal B are at high logic.
DAQmx_Val_AHighBLow | Reset the measurement when signal A is at high logic and signal B is at low logic.
DAQmx_Val_ALowBHigh | Reset the measurement when signal A is at low logic and signal B is at high logic.
DAQmx_Val_ALowBLow | Reset the measurement when both signal A and signal B are at low logic.
units int32 The units to use to return angular position measurements from the channel.

Value | Description
DAQmx_Val_Degrees | Degrees
DAQmx_Val_Radians | Radians
DAQmx_Val_Ticks | Timebase ticks
DAQmx_Val_FromCustomScale | Units a custom scale specifies. Use customScaleName to specify a custom scale.
pulsesPerRev | uInt32 | The number of pulses the encoder generates per revolution. This value is the number of pulses on one of either A signal or B signal, not the total number of pulses on both signal A and signal B.
initialAngle | float64 | The starting angle of the encoder when the measurement begins. Specify this value in units.
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateCIGPSTimestampChan

int32 DAQmxCreateCIGPSTimestampChan (TaskHandle taskHandle, const char counter[], const char nameToAssignToChannel[], int32 units, int32 gpsSyncMethod, const char custScaleName[]);

Purpose

Creates a channel that uses a special-purpose counter to take a timestamp and synchronizes that counter to a GPS receiver.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
counter | const char [] | The name of the counter to use to create virtual channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
units int32 The units to use to return the timestamp.

Value | Description
DAQmx_Val_Seconds | Seconds
DAQmx_Val_FromCustomScale | From custom scale
gpsSyncMethod int32 The method to use to synchronize the counter to a GPS receiver.

Value | Description
DAQmx_Val_IRIGB | IRIG-B
DAQmx_Val_PPS | PPS
DAQmx_Val_None | None
customScaleName | const char [] | The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to NULL.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateCOPulseChanFreq

int32 DAQmxCreateCOPulseChanFreq (TaskHandle taskHandle, const char counter[], const char nameToAssignToChannel[], int32 units, int32 idleState, float64 initialDelay, float64 freq, float64 dutyCycle);

Purpose

Creates channel(s) to generate digital pulses that freq and dutyCycle define and adds the channel to the task you specify with taskHandle. The pulses appear on the default output terminal of the counter unless you select a different output terminal.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
counter | const char [] | The name of the counter to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
units int32 The units in which to specify freq.
Name | Description
DAQmx_Val_Hz | hertz
idleState int32 The resting state of the output terminal.
Value | Description
DAQmx_Val_High | High state.
DAQmx_Val_Low | Low state.
initialDelay | float64 | The amount of time in seconds to wait before generating the first pulse.
freq | float64 | The frequency at which to generate pulses.
dutyCycle | float64 | The width of the pulse divided by the pulse period. NI-DAQmx uses this ratio, combined with frequency, to determine pulse width and the interval between pulses.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateCOPulseChanTicks

int32 DAQmxCreateCOPulseChanTicks (TaskHandle taskHandle, const char counter[], const char nameToAssignToChannel[], const char sourceTerminal[], int32 idleState, int32 initialDelay, int32 lowTicks, int32 highTicks);

Purpose

Creates channel(s) to generate digital pulses defined by the number of timebase ticks that the pulse is at a high state and the number of timebase ticks that the pulse is at a low state and also adds the channel to the task you specify with taskHandle. The pulses appear on the default output terminal of the counter unless you select a different output terminal.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
counter | const char [] | The name of the counter to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
sourceTerminal | const char [] | The terminal to which you connect an external timebase. You also can specify a source terminal by using a terminal name.
idleState int32 The resting state of the output terminal.
Value | Description
DAQmx_Val_High | High state.
DAQmx_Val_Low | Low state.
initialDelay | int32 | The number of timebase ticks to wait before generating the first pulse.
lowTicks | int32 | The number of timebase ticks that the pulse is low.
highTicks | int32 | The number of timebase ticks that the pulse is high.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateCOPulseChanTime

int32 DAQmxCreateCOPulseChanTime (TaskHandle taskHandle, const char counter[], const char nameToAssignToChannel[], int32 units, int32 idleState, float64 initialDelay, float64 lowTime, float64 highTime);

Purpose

Creates channel(s) to generate digital pulses defined by the amount of time the pulse is at a high state and the amount of time the pulse is at a low state and adds the channel to the task you specify with taskHandle. The pulses appear on the default output terminal of the counter unless you select a different output terminal.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to which to add the channels that this function creates.
counter | const char [] | The name of the counter to use to create virtual channels. You can specify a list or range of physical channels.
nameToAssignToChannel const char [] The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.

If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
units int32 The units in which to define pulse high and low time.
Value | Description
DAQmx_Val_Seconds | Seconds
idleState int32 The resting state of the output terminal.
Value | Description
DAQmx_Val_High | High state.
DAQmx_Val_Low | Low state.
initialDelay | float64 | The amount of time in seconds to wait before generating the first pulse.
lowTime | float64 | The amount of time the pulse is low, in seconds.
highTime | float64 | The amount of time the pulse is high, in seconds.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgBurstHandshakingTimingExportClock

int32 DAQmxCfgBurstHandshakingTimingExportClock (TaskHandle taskHandle, int32 sampleMode, uInt64 sampsPerChan, float64 sampleClkRate, const char sampleClkOutpTerm[], int32 sampleClkPulsePolarity, int32 pauseWhen, int32 readyEventActiveLevel);

Purpose

Configures when the DAQ device transfers data to a peripheral device, using the DAQ device's onboard sample clock to control burst handshaking timing.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
sampleMode int32 Specifies whether the task acquires or generates samples continuously or if it acquires or generates a finite number of samples.
Value | Description
DAQmx_Val_FiniteSamps | Acquire or generate a finite number of samples.
DAQmx_Val_ContSamps | Acquire or generate samples until you stop the task.
DAQmx_Val_HWTimedSinglePoint | Acquire or generate samples continuously using hardware timing without a buffer. Hardware timed single point sample mode is supported only for the sample clock and change detection timing types.
sampsPerChan | uInt64 | The number of samples to acquire from each channel if sampleMode is DAQmx_Val_FiniteSamps. If sampleMode is DAQmx_Val_ContSamps, NI-DAQmx uses this value to determine the buffer size.
sampleClkRate | float64 | Specifies the sampling rate in samples per channel per second. If you use an external source for the Sample Clock, set this input to the maximum expected rate of that clock.
sampleClkOutpTerm | const char [] | Specifies the terminal to which to route the Sample Clock.
sampleClkPulsePolarity | int32 | Specifies if the polarity for the exported sample clock is active high or active low.
pauseWhen | int32 | Specifies whether the task pauses while the signal is high or low.
readyEventActiveLevel | int32 | Specifies the polarity for the Ready for Transfer event.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgBurstHandshakingTimingImportClock

int32 DAQmxCfgBurstHandshakingTimingImportClock (TaskHandle taskHandle, int32 sampleMode, uInt64 sampsPerChan, float64 sampleClkRate, const char sampleClkSrc[], int32 sampleClkActiveEdge, int32 pauseWhen, int32 readyEventActiveLevel);

Purpose

Configures when the DAQ device transfers data to a peripheral device, using an imported sample clock to control burst handshaking timing.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
sampleMode int32 Specifies whether the task acquires or generates samples continuously or if it acquires or generates a finite number of samples.
Value | Description
DAQmx_Val_FiniteSamps | Acquire or generate a finite number of samples.
DAQmx_Val_ContSamps | Acquire or generate samples until you stop the task.
DAQmx_Val_HWTimedSinglePoint | Acquire or generate samples continuously using hardware timing without a buffer. Hardware timed single point sample mode is supported only for the sample clock and change detection timing types.
sampsPerChan | uInt64 | The number of samples to acquire from each channel if sampleMode is DAQmx_Val_FiniteSamps. If sampleMode is DAQmx_Val_ContSamps, NI-DAQmx uses this value to determine the buffer size.
sampleClkRate | float64 | Specifies the sampling rate in samples per channel per second. If you use an external source for the Sample Clock, set this input to the maximum expected rate of that clock.
sampleClkSrc | const char [] | Specifies the terminal of the signal to use as the Sample Clock.
sampleClkActiveEdge int32 Specifies on which edge of a clock pulse sampling takes place. This property is useful primarily when the signal you use as the Sample Clock is not a periodic clock.
Value | Description
DAQmx_Val_Rising | Acquire or generate samples on the rising edges of the Sample Clock.
DAQmx_Val_Falling | Acquire or generate samples on the falling edges of the Sample Clock.
pauseWhen | int32 | Specifies whether the task pauses while the signal is high or low.
readyEventActiveLevel | int32 | Specifies the polarity for the Ready for Transfer event.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgChangeDetectionTiming

int32 DAQmxCfgChangeDetectionTiming (TaskHandle taskHandle, const char risingEdgeChan[], const char fallingEdgeChan[], int32 sampleMode, uInt64 sampsPerChan);

Purpose

Configures the task to acquire samples on the rising and/or falling edges of the lines or ports you specify.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
risingEdgeChan | const char [] | The names of the digital lines or ports on which to detect rising edges. You can specify a list or range of channels.
fallingEdgeChan | const char [] | The names of the digital lines or ports on which to detect falling edges. You can specify a list or range of channels.
sampleMode int32 Specifies whether the task acquires samples continuously or if it acquires a finite number of samples.
Value | Description
DAQmx_Val_FiniteSamps | Acquire or generate a finite number of samples.
DAQmx_Val_ContSamps | Acquire or generate samples until you stop the task.
DAQmx_Val_HWTimedSinglePoint | Acquire or generate samples continuously using hardware timing without a buffer. Hardware timed single point sample mode is supported only for the sample clock and change detection timing types.
sampsPerChan | uInt64 | The number of samples to acquire from each channel if sampleMode is DAQmx_Val_FiniteSamps. If sampleMode is DAQmx_Val_ContSamps, NI-DAQmx uses this value to determine the buffer size.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgHandshakingTiming

int32 DAQmxCfgHandshakingTiming (TaskHandle taskHandle, int32 sampleMode, uInt64 sampsPerChanToAcquire);

Purpose

Determines the number of digital samples to acquire or generate using digital handshaking between the device and a peripheral device.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
sampleMode int32 Specifies whether the task acquires or generates samples continuously or if it acquires or generates a finite number of samples.
Value | Description
DAQmx_Val_FiniteSamps | Acquire or generate a finite number of samples.
DAQmx_Val_ContSamps | Acquire or generate samples until you stop the task.
DAQmx_Val_HWTimedSinglePoint | Acquire or generate samples continuously using hardware timing without a buffer. Hardware timed single point sample mode is supported only for the sample clock and change detection timing types.
sampsPerChanToAcquire | uInt64 | The number of samples to acquire or generate for each channel in the task if sampleMode is DAQmx_Val_FiniteSamps. If sampleMode is DAQmx_Val_ContSamps, NI-DAQmx uses this value to determine the buffer size.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgImplicitTiming

int32 DAQmxCfgImplicitTiming (TaskHandle taskHandle, int32 sampleMode, uInt64 sampsPerChanToAcquire);

Purpose

Sets only the number of samples to acquire or generate without specifying timing. Typically, you should use this function when the task does not require sample timing, such as tasks that use counters for buffered frequency measurement, buffered period measurement, or pulse train generation.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
sampleMode int32 Specifies whether the task acquires or generates samples continuously or if it acquires or generates a finite number of samples.
Value | Description
DAQmx_Val_FiniteSamps | Acquire or generate a finite number of samples.
DAQmx_Val_ContSamps | Acquire or generate samples until you stop the task.
DAQmx_Val_HWTimedSinglePoint | Acquire or generate samples continuously using hardware timing without a buffer. Hardware timed single point sample mode is supported only for the sample clock and change detection timing types.
sampsPerChanToAcquire | uInt64 | The number of samples to acquire or generate for each channel in the task if sampleMode is DAQmx_Val_FiniteSamps. If sampleMode is DAQmx_Val_ContSamps, NI-DAQmx uses this value to determine the buffer size.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgPipelinedSampClkTiming

int32 DAQmxCfgPipelinedSampClkTiming (TaskHandle taskHandle, const char source[], float64 rate, int32 activeEdge, int32 sampleMode, uInt64 samplesPerChannel);

Purpose

Sets the source of the Sample Clock, the rate of the Sample Clock, and the number of samples to acquire or generate. The device acquires or generates samples on each Sample Clock edge, but does not respond to certain triggers until a few Sample Clock edges later. Pipelining allows higher data transfer rates at the cost of increased trigger response latency. Refer to the device documentation for information about which triggers pipelining affects.

This timing type allows handshaking using the Pause trigger, the Ready for Transfer event, or the Data Active event. Refer to the device documentation for more information.

This timing type is supported only by the NI 6536 and NI 6537.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
source | const char [] | The source terminal of the Sample Clock. To use the internal clock of the device, use NULL or use OnboardClock.
rate | float64 | The sampling rate in samples per second per channel. If you use an external source for the Sample Clock, set this value to the maximum expected rate of that clock.
activeEdge int32 Specifies on which edge of the clock to acquire or generate samples.
Value | Description
DAQmx_Val_Rising | Acquire or generate samples on the rising edges of the Sample Clock.
DAQmx_Val_Falling | Acquire or generate samples on the falling edges of the Sample Clock.
sampleMode int32 Specifies whether the task acquires or generates samples continuously or if it acquires or generates a finite number of samples.
Value | Description
DAQmx_Val_FiniteSamps | Acquire or generate a finite number of samples.
DAQmx_Val_ContSamps | Acquire or generate samples until you stop the task.
DAQmx_Val_HWTimedSinglePoint | Acquire or generate samples continuously using hardware timing without a buffer. Hardware timed single point sample mode is supported only for the sample clock and change detection timing types.
sampsPerChanToAcquire | uInt64 | The number of samples to acquire or generate for each channel in the task if sampleMode is DAQmx_Val_FiniteSamps. If sampleMode is DAQmx_Val_ContSamps, NI-DAQmx uses this value to determine the buffer size.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgSampClkTiming

int32 DAQmxCfgSampClkTiming (TaskHandle taskHandle, const char source[], float64 rate, int32 activeEdge, int32 sampleMode, uInt64 sampsPerChanToAcquire);

Purpose

Sets the source of the Sample Clock, the rate of the Sample Clock, and the number of samples to acquire or generate.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
source | const char [] | The source terminal of the Sample Clock. To use the internal clock of the device, use NULL or use OnboardClock.
rate | float64 | The sampling rate in samples per second per channel. If you use an external source for the Sample Clock, set this value to the maximum expected rate of that clock.
activeEdge int32 Specifies on which edge of the clock to acquire or generate samples.
Value | Description
DAQmx_Val_Rising | Acquire or generate samples on the rising edges of the Sample Clock.
DAQmx_Val_Falling | Acquire or generate samples on the falling edges of the Sample Clock.
sampleMode int32 Specifies whether the task acquires or generates samples continuously or if it acquires or generates a finite number of samples.
Value | Description
DAQmx_Val_FiniteSamps | Acquire or generate a finite number of samples.
DAQmx_Val_ContSamps | Acquire or generate samples until you stop the task.
DAQmx_Val_HWTimedSinglePoint | Acquire or generate samples continuously using hardware timing without a buffer. Hardware timed single point sample mode is supported only for the sample clock and change detection timing types.
sampsPerChanToAcquire | uInt64 | The number of samples to acquire or generate for each channel in the task if sampleMode is DAQmx_Val_FiniteSamps. If sampleMode is DAQmx_Val_ContSamps, NI-DAQmx uses this value to determine the buffer size.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgAnlgEdgeStartTrig

int32 DAQmxCfgAnlgEdgeStartTrig (TaskHandle taskHandle, const char triggerSource[], int32 triggerSlope, float64 triggerLevel);

Purpose

Configures the task to start acquiring or generating samples when an analog signal crosses the level you specify.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
triggerSource | const char [] | The name of a channel or terminal where there is an analog signal to use as the source of the trigger. For E Series devices, if you use a channel name, the channel must be the first channel in the task. The only terminal you can use for E Series devices is PFI0.
triggerSlope int32 Specifies on which slope of the signal to start acquiring or generating samples when the signal crosses triggerLevel.
Value | Description
DAQmx_Val_RisingSlope | Trigger on the rising slope of the signal.
DAQmx_Val_FallingSlope | Trigger on the falling slope of the signal.
triggerLevel | float64 | The threshold at which to start acquiring or generating samples. Specify this value in the units of the measurement or generation. Use triggerSlope to specify on which slope to trigger at this threshold.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgAnlgWindowStartTrig

int32 DAQmxCfgAnlgWindowStartTrig (TaskHandle taskHandle, const char triggerSource[], int32 triggerWhen, float64 windowTop, float64 windowBottom);

Purpose

Configures the task to start acquiring or generating samples when an analog signal enters or leaves a range you specify.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
triggerSource const char [] The name of a virtual channel or terminal where there is an analog signal to use as the source of the trigger.

For E Series devices, if you use a virtual channel, it must be the first channel in the task. The only terminal you can use for E Series devices is PFI0.
triggerWhen int32 Specifies whether the task starts measuring or generating samples when the signal enters the window or when it leaves the window. Use windowBottom and windowTop to specify the limits of the window.
Value | Description
DAQmx_Val_EnteringWin | Trigger when the signal enters the window.
DAQmx_Val_LeavingWin | Trigger when the signal leaves the window.
windowTop | float64 | The upper limit of the window. Specify this value in the units of the measurement or generation.
windowBottom | float64 | The lower limit of the window. Specify this value in the units of the measurement or generation.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgDigEdgeStartTrig

int32 DAQmxCfgDigEdgeStartTrig (TaskHandle taskHandle, const char triggerSource[], int32 triggerEdge);

Purpose

Configures the task to start acquiring or generating samples on a rising or falling edge of a digital signal.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
triggerSource | const char [] | The name of a terminal where there is a digital signal to use as the source of the trigger.
triggerEdge int32 Specifies on which edge of a digital signal to start acquiring or generating samples.
Value | Description
DAQmx_Val_Rising | Rising edge(s).
DAQmx_Val_Falling | Falling edge(s).

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgDigPatternStartTrig

int32 DAQmxCfgDigPatternStartTrig (TaskHandle taskHandle, const char triggerSource[], const char triggerPattern[], int32 triggerWhen);

Purpose

Configures a task to start acquiring or generating samples when a digital pattern is matched.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
triggerSource | const char [] | Specifies the physical channels to use for pattern matching. The order of the physical channels determines the order of the pattern. If a port is included, the order of the physical channels within the port is in ascending order.
triggerPattern | const char [] | Specifies the digital pattern that must be met for the trigger to occur.
triggerWhen int32 Specifies the conditions under which the trigger occurs.
Value | Description
DAQmx_Val_PatternMatches | Pattern matches
DAQmx_Val_PatternDoesNotMatch | Pattern does not match

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxDisableStartTrig

int32 DAQmxDisableStartTrig (TaskHandle taskHandle);

Purpose

Configures the task to start acquiring or generating samples immediately upon starting the task.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgAnlgEdgeRefTrig

int32 DAQmxCfgAnlgEdgeRefTrig (TaskHandle taskHandle, const char triggerSource[], int32 triggerSlope, float64 triggerLevel, uInt32 pretriggerSamples);

Purpose

Configures the task to stop the acquisition when the device acquires all pretrigger samples, an analog signal reaches the level you specify, and the device acquires all post-trigger samples.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
triggerSource const char [] The name of a virtual channel or terminal where there is an analog signal to use as the source of the trigger.

For E Series devices, if you use a virtual channel, it must be the only channel in the task. The only terminal you can use for E Series devices is PFI0.
triggerSlope int32 Specifies on which slope of the signal the Reference Trigger occurs.
Value | Description
DAQmx_Val_RisingSlope | Trigger on the rising slope of the signal.
DAQmx_Val_FallingSlope | Trigger on the falling slope of the signal.
triggerLevel | float64 | Specifies at what threshold to trigger. Specify this value in the units of the measurement or generation. Use triggerSlope to specify on which slope to trigger at this threshold.
pretriggerSamples | uInt32 | The minimum number of samples per channel to acquire before recognizing the Reference Trigger. The number of posttrigger samples per channel is equal to number of samples per channel in the NI-DAQmx Timing functions minus pretriggerSamples.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgAnlgWindowRefTrig

int32 DAQmxCfgAnlgWindowRefTrig (TaskHandle taskHandle, const char triggerSource[], int32 triggerWhen, float64 windowTop, float64 windowBottom, uInt32 pretriggerSamples);

Purpose

Configures the task to stop the acquisition when the device acquires all pretrigger samples, an analog signal enters or leaves a range you specify, and the device acquires all post-trigger samples.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
triggerSource const char [] The name of a virtual channel or terminal where there is an analog signal to use as the source of the trigger.

For E Series devices, if you use a virtual channel, it must be the only channel in the task. The only terminal you can use for E Series devices is PFI0.
triggerWhen int32 Specifies whether the Reference Trigger occurs when the signal enters the window or when it leaves the window. Use windowBottom and windowTop to specify the limits of the window.
Value | Description
DAQmx_Val_EnteringWin | Trigger when the signal enters the window.
DAQmx_Val_LeavingWin | Trigger when the signal leaves the window.
windowTop | float64 | The upper limit of the window. Specify this value in the units of the measurement or generation.
windowBottom | float64 | The lower limit of the window. Specify this value in the units of the measurement or generation.
pretriggerSamples | uInt32 | The minimum number of samples per channel to acquire before recognizing the Reference Trigger. The number of posttrigger samples per channel is equal to number of samples per channel in the NI-DAQmx Timing functions minus pretriggerSamples.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgDigEdgeRefTrig

int32 DAQmxCfgDigEdgeRefTrig (TaskHandle taskHandle, const char triggerSource[], int32 triggerEdge, uInt32 pretriggerSamples);

Purpose

Configures the task to stop the acquisition when the device acquires all pretrigger samples, detects a rising or falling edge of a digital signal, and acquires all posttrigger samples.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
triggerSource | const char [] | Specifies the name of a terminal where there is a digital signal to use as the source of the trigger.
triggerEdge int32 Specifies on which edge of the digital signal the Reference Trigger occurs.
Value | Description
DAQmx_Val_Rising | Rising edge(s).
DAQmx_Val_Falling | Falling edge(s).
pretriggerSamples | uInt32 | The minimum number of samples per channel to acquire before recognizing the Reference Trigger. The number of posttrigger samples per channel is equal to number of samples per channel in the NI-DAQmx Timing functions minus pretriggerSamples.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgDigPatternRefTrig

int32 DAQmxCfgDigPatternRefTrig (TaskHandle taskHandle, const char triggerSource[], const char triggerPattern[], int32 triggerWhen, uInt32 pretriggerSamples);

Purpose

Configures the task to stop the acquisition when the device acquires all pretrigger samples, matches or does not match a digital pattern, and acquires all posttrigger samples.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
triggerSource | const char [] | Specifies the physical channels to use for pattern matching. The order of the physical channels determines the order of the pattern. If a port is included, the order of the physical channels within the port is in ascending order.
triggerPattern | const char [] | Specifies the digital pattern that must be met for the trigger to occur.
triggerWhen int32 Specifies the conditions under which the trigger occurs.
Value | Description
DAQmx_Val_PatternMatches | Pattern matches
DAQmx_Val_PatternDoesNotMatch | Pattern does not match
pretriggerSamples | uInt32 | The minimum number of samples per channel to acquire before recognizing the Reference Trigger. The number of posttrigger samples per channel is equal to number of samples per channel in the NI-DAQmx Timing functions minus pretriggerSamples.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxDisableRefTrig

int32 DAQmxDisableRefTrig (TaskHandle taskHandle);

Purpose

Disables reference triggering for the measurement or generation.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgDigEdgeAdvTrig

int32 DAQmxCfgDigEdgeAdvTrig (TaskHandle taskHandle, const char triggerSource[], int32 triggerEdge);

Purpose

Configures a switch task to advance to the next entry in a scan list on a rising or falling edge of a digital signal.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
triggerSource | const char [] | The terminal where there is a digital signal to use as the source of the trigger.
triggerEdge int32 Specifies on which edge of a digital signal to advance to the next entry in the scan list.
Value | Description
DAQmx_Val_Rising | Rising edge(s).
DAQmx_Val_Falling | Falling edge(s).

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxDisableAdvTrig

int32 DAQmxDisableAdvTrig (TaskHandle taskHandle);

Purpose

Disables the advance triggering for the task.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSendSoftwareTrigger

int32 DAQmxSendSoftwareTrigger (TaskHandle taskHandle, int32 triggerID);

Purpose

Generates the specified software trigger.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
triggerID int32 Specifies which software trigger to generate.
Value | Description
DAQmx_Val_AdvanceTrigger | Generate the advance trigger

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadAnalogF64

int32 DAQmxReadAnalogF64 (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, bool32 fillMode, float64 readArray[], uInt32 arraySizeInSamps, int32 *sampsPerChanRead, bool32 *reserved);

Purpose

Reads multiple floating-point samples from a task that contains one or more analog input channels.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to read samples from.
numSampsPerChan int32 The number of samples, per channel, to read. The default value of -1 (DAQmx_Val_Auto) reads all available samples. If readArray does not contain enough space, this function returns as many samples as fit in readArray.

NI-DAQmx determines how many samples to read based on whether the task acquires samples continuously or acquires a finite number of samples.

If the task acquires samples continuously and you set this parameter to -1, this function reads all the samples currently available in the buffer.

If the task acquires a finite number of samples and you set this parameter to -1, the function waits for the task to acquire all requested samples, then reads those samples. If you set the Read All Available Samples property to TRUE, the function reads the samples currently available in the buffer and does not wait for the task to acquire all requested samples.
timeout float64 The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
fillMode bool32 Specifies whether or not the samples are interleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (non-interleaved)
DAQmx_Val_GroupByScanNumber | Group by scan number (interleaved)
arraySizeInSamps | uInt32 | The size of the array, in samples, into which samples are read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
readArray | float64 [] | The array to read samples into, organized according to fillMode.
sampsPerChanRead | int32 * | The actual number of samples read from each channel.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadAnalogScalarF64

int32 DAQmxReadAnalogScalarF64 (TaskHandle taskHandle, float64 timeout, float64 *value, bool32 *reserved);

Purpose

Reads a single floating-point sample from a task that contains a single analog input channel.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to read the sample from.
timeout | float64 | The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses. A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
value | float64 * | The sample read from the task.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadBinaryI16

int32 DAQmxReadBinaryI16 (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, bool32 fillMode, int16 readArray[], uInt32 arraySizeInSamps, int32 *sampsPerChanRead, bool32 *reserved);

Purpose

Reads multiple unscaled, signed 16-bit integer samples from a task that contains one or more analog input channels.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to read samples from.
numSampsPerChan int32 The number of samples, per channel, to read. The default value of -1 (DAQmx_Val_Auto) reads all available samples. If readArray does not contain enough space, this function returns as many samples as fit in readArray.

NI-DAQmx determines how many samples to read based on whether the task acquires samples continuously or acquires a finite number of samples.

If the task acquires samples continuously and you set this parameter to -1, this function reads all the samples currently available in the buffer.

If the task acquires a finite number of samples and you set this parameter to -1, the function waits for the task to acquire all requested samples, then reads those samples. If you set the Read All Available Samples property to TRUE, the function reads the samples currently available in the buffer and does not wait for the task to acquire all requested samples.
timeout float64 The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
fillMode bool32 Specifies whether or not the samples are interleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (non-interleaved)
DAQmx_Val_GroupByScanNumber | Group by scan number (interleaved)
arraySizeInSamps | uInt32 | The size of the array, in samples, into which samples are read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
readArray | int16 [] | The array to read samples into, organized according to fillMode.
sampsPerChanRead | int32 * | The actual number of samples read from each channel.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadBinaryI32

int32 DAQmxReadBinaryI32 (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, bool32 fillMode, int32 readArray[], uInt32 arraySizeInSamps, int32 *sampsPerChanRead, bool32 *reserved);

Purpose

Reads one or more unscaled 32-bit signed integer samples from a task that contains one or more analog input channels.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
numSampsPerChan int32 The number of samples, per channel, to read. The default value of -1 (DAQmx_Val_Auto) reads all available samples. If readArray does not contain enough space, this function returns as many samples as fit in readArray.

NI-DAQmx determines how many samples to read based on whether the task acquires samples continuously or acquires a finite number of samples.

If the task acquires samples continuously and you set this parameter to -1, this function reads all the samples currently available in the buffer.

If the task acquires a finite number of samples and you set this parameter to -1, the function waits for the task to acquire all requested samples, then reads those samples. If you set the Read All Available Samples property to TRUE, the function reads the samples currently available in the buffer and does not wait for the task to acquire all requested samples.
timeout float64 The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
fillMode bool32 Specifies whether or not the samples are interleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (non-interleaved)
DAQmx_Val_GroupByScanNumber | Group by scan number (interleaved)
arraySizeInSamps | uInt32 | The size of the array, in samples, into which samples are read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
readArray | int32 [] | The array to read samples into, organized according to fillMode.
sampsPerChanRead | int32 * | The actual number of samples read from each channel.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadBinaryU16

int32 DAQmxReadBinaryU16 (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, bool32 fillMode, uInt16 readArray[], uInt32 arraySizeInSamps, int32 *sampsPerChanRead, bool32 *reserved);

Purpose

Reads multiple unscaled, unsigned 16-bit integer samples from a task that contains one or more analog input channels.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to read samples from.
numSampsPerChan int32 The number of samples, per channel, to read. The default value of -1 (DAQmx_Val_Auto) reads all available samples. If readArray does not contain enough space, this function returns as many samples as fit in readArray.

NI-DAQmx determines how many samples to read based on whether the task acquires samples continuously or acquires a finite number of samples.

If the task acquires samples continuously and you set this parameter to -1, this function reads all the samples currently available in the buffer.

If the task acquires a finite number of samples and you set this parameter to -1, the function waits for the task to acquire all requested samples, then reads those samples. If you set the Read All Available Samples property to TRUE, the function reads the samples currently available in the buffer and does not wait for the task to acquire all requested samples.
timeout float64 The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
fillMode bool32 Specifies whether or not the samples are interleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (non-interleaved)
DAQmx_Val_GroupByScanNumber | Group by scan number (interleaved)
arraySizeInSamps | uInt32 | The size of the array, in samples, into which samples are read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
readArray | uInt16 [] | The array to read samples into, organized according to fillMode.
sampsPerChanRead | int32 * | The actual number of samples read from each channel.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadBinaryU32

int32 DAQmxReadBinaryU32 (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, bool32 fillMode, uInt32 readArray[], uInt32 arraySizeInSamps, int32 *sampsPerChanRead, bool32 *reserved);

Purpose

Reads one or more unscaled 32-bit unsigned integer samples from a task that contains one or more analog input channels.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
numSampsPerChan int32 The number of samples, per channel, to read. The default value of -1 (DAQmx_Val_Auto) reads all available samples. If readArray does not contain enough space, this function returns as many samples as fit in readArray.

NI-DAQmx determines how many samples to read based on whether the task acquires samples continuously or acquires a finite number of samples.

If the task acquires samples continuously and you set this parameter to -1, this function reads all the samples currently available in the buffer.

If the task acquires a finite number of samples and you set this parameter to -1, the function waits for the task to acquire all requested samples, then reads those samples. If you set the Read All Available Samples property to TRUE, the function reads the samples currently available in the buffer and does not wait for the task to acquire all requested samples.
timeout float64 The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
fillMode bool32 Specifies whether or not the samples are interleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (non-interleaved)
DAQmx_Val_GroupByScanNumber | Group by scan number (interleaved)
arraySizeInSamps | uInt32 | The size of the array, in samples, into which samples are read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
readArray | uInt32 [] | The array to read samples into, organized according to fillMode.
sampsPerChanRead | int32 * | The actual number of samples read from each channel.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadCounterF64

int32 DAQmxReadCounterF64 (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, float64 readArray[], uInt32 arraySizeInSamps, int32 *sampsPerChanRead, bool32 *reserved);

Purpose

Reads multiple floating-point samples from a counter task. Use this function when counter samples are scaled to a floating-point value, such as for frequency and period measurements.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to read samples from.
numSampsPerChan | int32 | The number of samples, per channel, to read. The default value of -1 (DAQmx_Val_Auto) reads all available samples. If readArray does not contain enough space, this function returns as many samples as fit in readArray. NI-DAQmx determines how many samples to read based on whether the task acquires samples continuously or acquires a finite number of samples. If the task acquires samples continuously and you set this parameter to -1, this function reads all the samples currently available in the buffer. If the task acquires a finite number of samples and you set this parameter to -1, the function waits for the task to acquire all requested samples, then reads those samples. If you set the Read All Available Samples property to TRUE, the function reads the samples currently available in the buffer and does not wait for the task to acquire all requested samples.
timeout | float64 | The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses. A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
arraySizeInSamps | uInt32 | The size of the array, in samples, into which samples are read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
readArray | float64 [] | The array to read samples into.
sampsPerChanRead | int32 * | The actual number of samples read from each channel.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadCounterScalarF64

int32 DAQmxReadCounterScalarF64 (TaskHandle taskHandle, float64 timeout, float64 *value, bool32 *reserved);

Purpose

Reads a single floating-point sample from a counter task. Use this function when the counter sample is scaled to a floating-point value, such as for frequency and period measurement.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to read the sample from.
timeout | float64 | The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses. A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
value | float64 * | The sample read from the task.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadCounterScalarU32

int32 DAQmxReadCounterScalarU32 (TaskHandle taskHandle, float64 timeout, uInt32 *value, bool32 *reserved);

Purpose

Reads a 32-bit integer sample from a counter task. Use this function when the counter sample is returned unscaled, such as for edge counting.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to read the sample from.
timeout | float64 | The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses. A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
value | uInt32 * | The sample read from the task.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadCounterU32

int32 DAQmxReadCounterU32 (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, uInt32 readArray[], uInt32 arraySizeInSamps, int32 *sampsPerChanRead, bool32 *reserved);

Purpose

Reads multiple 32-bit integer samples from a counter task. Use this function when counter samples are returned unscaled, such as for edge counting.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to read samples from.
numSampsPerChan | int32 | The number of samples, per channel, to read. The default value of -1 (DAQmx_Val_Auto) reads all available samples. If readArray does not contain enough space, this function returns as many samples as fit in readArray. NI-DAQmx determines how many samples to read based on whether the task acquires samples continuously or acquires a finite number of samples. If the task acquires samples continuously and you set this parameter to -1, this function reads all the samples currently available in the buffer. If the task acquires a finite number of samples and you set this parameter to -1, the function waits for the task to acquire all requested samples, then reads those samples. If you set the Read All Available Samples property to TRUE, the function reads the samples currently available in the buffer and does not wait for the task to acquire all requested samples.
timeout | float64 | The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses. A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
arraySizeInSamps | uInt32 | The size of the array, in samples, into which samples are read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
readArray | uInt32 [] | The array to read samples into.
sampsPerChanRead | int32 * | The actual number of samples read from each channel.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadDigitalLines

int32 DAQmxReadDigitalLines (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, bool32 fillMode, uInt8 readArray[], uInt32 arraySizeInBytes, int32 *sampsPerChanRead, int32 *numBytesPerSamp, bool32 *reserved);

Purpose

Reads multiple samples from each digital line in a task. Each line in a channel gets one byte per sample.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to read samples from.
numSampsPerChan int32 The number of samples, per channel, to read. The default value of -1 (DAQmx_Val_Auto) reads all available samples. If readArray does not contain enough space, this function returns as many samples as fit in readArray.

NI-DAQmx determines how many samples to read based on whether the task acquires samples continuously or acquires a finite number of samples.

If the task acquires samples continuously and you set this parameter to -1, this function reads all the samples currently available in the buffer.

If the task acquires a finite number of samples and you set this parameter to -1, the function waits for the task to acquire all requested samples, then reads those samples. If you set the Read All Available Data property to TRUE, the function reads the samples currently available in the buffer and does not wait for the task to acquire all requested samples.
timeout float64 The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
fillMode bool32 Specifies whether or not the samples are interleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (non-interleaved)
DAQmx_Val_GroupByScanNumber | Group by scan number (interleaved)
arraySizeInBytes | uInt32 | The size of the array, in samples, into which samples are read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
readArray | uInt8 [] | The array to read samples into. Each numBytesPerSamp corresponds to one sample per channel, with each element in that grouping corresponding to a line in that channel, up to the number of lines contained in the channel.
sampsPerChanRead | int32 * | The actual number of samples read from each channel.
numBytesPerSamp | int32 * | The number of elements in readArray that constitutes a sample per channel. For each sample per channel, numBytesPerSamp is the number of bytes that channel consists of.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadDigitalScalarU32

int32 DAQmxReadDigitalScalarU32 (TaskHandle taskHandle, float64 timeout, uInt32 *value, bool32 *reserved);

Purpose

Reads a single 32-bit integer sample from a task that contains a single digital input channel. Use this function for devices with up to 32 lines per port. The sample is returned in unsigned integer format.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to read the sample from.
timeout | float64 | The amount of time, in seconds, to wait for the function to read the sample. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses. A value of 0 indicates to try once to read the requested sample. If the entire requested sample is read, the function is successful. Otherwise, the function returns a timeout error and returns what was actually read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
value | uInt32 * | The sample read from the task.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadDigitalU8

int32 DAQmxReadDigitalU8 (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, bool32 fillMode, uInt8 readArray[], uInt32 arraySizeInSamps, int32 *sampsPerChanRead, bool32 *reserved);

Purpose

Reads multiple 8-bit integer samples from a task that has one or more multiple digital input channels. Use this function for devices with up to 8 lines per port. The samples are returned in unsigned byte format.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write samples to.
numSampsPerChan int32 The number of samples, per channel, to read. The default value of -1 (DAQmx_Val_Auto) reads all available samples. If readArray does not contain enough space, this function returns as many samples as fit in readArray.

NI-DAQmx determines how many samples to read based on whether the task acquires samples continuously or acquires a finite number of samples.

If the task acquires samples continuously and you set this parameter to -1, this function reads all the samples currently available in the buffer.

If the task acquires a finite number of samples and you set this parameter to -1, the function waits for the task to acquire all requested samples, then reads those samples. If you set the Read All Available Samples property to TRUE, the function reads the samples currently available in the buffer and does not wait for the task to acquire all requested samples.
timeout float64 The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
fillMode bool32 Specifies whether or not the samples are interleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (non-interleaved)
DAQmx_Val_GroupByScanNumber | Group by scan number (interleaved)
arraySizeInSamps | uInt32 | The size of the array, in samples, into which samples are read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
readArray | uInt8 [] | The array to read samples into, organized according to fillMode.
sampsPerChanRead | int32 * | The actual number of samples read from each channel.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadDigitalU16

int32 DAQmxReadDigitalU16 (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, bool32 fillMode, uInt16 readArray[], uInt32 arraySizeInSamps, int32 *sampsPerChanRead, bool32 *reserved);

Purpose

Reads multiple 16-bit integer samples from a task that contains one or more digital input channels. Use this function for devices with up to 16 lines per port. The samples are returned in unsigned integer format.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to read samples from.
numSampsPerChan int32 The number of samples, per channel, to read. The default value of -1 (DAQmx_Val_Auto) reads all available samples. If readArray does not contain enough space, this function returns as many samples as fit in readArray.

NI-DAQmx determines how many samples to read based on whether the task acquires samples continuously or acquires a finite number of samples.

If the task acquires samples continuously and you set this parameter to -1, this function reads all the samples currently available in the buffer.

If the task acquires a finite number of samples and you set this parameter to -1, the function waits for the task to acquire all requested samples, then reads those samples. If you set the Read All Available Samples property to TRUE, the function reads the samples currently available in the buffer and does not wait for the task to acquire all requested samples.
timeout float64 The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
fillMode bool32 Specifies whether or not the samples are interleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (non-interleaved)
DAQmx_Val_GroupByScanNumber | Group by scan number (interleaved)
arraySizeInSamps | uInt32 | The size of the array, in samples, into which samples are read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
readArray | uInt16 [] | The array to read samples into, organized according to fillMode.
sampsPerChanRead | int32 * | The actual number of samples read from each channel.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxReadDigitalU32

int32 DAQmxReadDigitalU32 (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, bool32 fillMode, uInt32 readArray[], uInt32 arraySizeInSamps, int32 *sampsPerChanRead, bool32 *reserved);

Purpose

Reads multiple 32-bit integer samples from a task that contains one or more digital input channels. Use this function for devices with up to 32 lines per port. The samples are returned in unsigned integer format.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to read samples from.
numSampsPerChan int32 The number of samples, per channel, to read. The default value of -1 (DAQmx_Val_Auto) reads all available samples. If readArray does not contain enough space, this function returns as many samples as fit in readArray.

NI-DAQmx determines how many samples to read based on whether the task acquires samples continuously or acquires a finite number of samples.

If the task acquires samples continuously and you set this parameter to -1, this function reads all the samples currently available in the buffer.

If the task acquires a finite number of samples and you set this parameter to -1, the function waits for the task to acquire all requested samples, then reads those samples. If you set the Read All Available Samples property to TRUE, the function reads the samples currently available in the buffer and does not wait for the task to acquire all requested samples.
timeout float64 The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
fillMode bool32 Specifies whether or not the samples are interleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (non-interleaved)
DAQmx_Val_GroupByScanNumber | Group by scan number (interleaved)
arraySizeInSamps | uInt32 | The size of the array, in samples, into which samples are read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
readArray | uInt32 [] | The array to read samples into, organized according to fillMode.
sampsPerChanRead | int32 * | The actual number of samples read from each channel.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxGetNthTaskReadChannel

int32 DAQmxGetNthTaskReadChannel (TaskHandle taskHandle, uInt32 index, char buffer[], int32 bufferSize);

Purpose

Takes a task, an index, and a user declared buffer with size. It fills out the buffer with the Nth channel as requested by the user in the index. This comes from all the channels in the task. Indexing starts at 1.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
index | uInt32 | The Nth channel to return. The index starts at 1.
bufferSize | int32 | The size, in bytes, of buffer. If you pass 0, this function returns the number of bytes needed to allocate.
Output
buffer | char [] | The Nth channel in the index. If you pass NULL, this function returns the number of bytes needed to allocate.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A negative value indicates an error. For this function, if you pass NULL for the buffer or 0 for the buffer size, this function returns the number of bytes needed to allocate.


DAQmxReadRaw

int32 DAQmxReadRaw (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, void *readArray, uInt32 arraySizeInBytes, int32 *sampsRead, int32 *numBytesPerSamp, bool32 *reserved);

Purpose

Reads raw samples directly from the input lines. There is no scaling, parsing, or separation of the samples. Refer to the specifications for your device to determine the format of the incoming samples.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to read samples from.
numSampsPerChan | int32 | The number of samples, per channel, to read. If you set this parameter to -1 (DAQmx_Val_Auto), NI-DAQmx determines how many samples to read based on whether the task acquires samples continuously or acquires a finite number of samples. If the task acquires samples continuously and you set this parameter to -1, this function reads all the samples currently available in the buffer. If readArray does not contain enough space, this function returns as many samples as fit in readArray. If the task acquires a finite number of samples and you set this parameter to -1, the function waits for the task to acquire all requested samples, then reads those samples. If you set the Read All Available Data property to TRUE, the function reads the samples currently available in the buffer and does not wait for the task to acquire all requested samples.
timeout | float64 | The amount of time, in seconds, to wait for the function to read the sample(s). The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses. A value of 0 indicates to try once to read the requested samples. If all the requested samples are read, the function is successful. Otherwise, the function returns a timeout error and returns the samples that were actually read.
arraySizeInBytes | uInt32 | The size of the array into which samples are read.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
readArray | void * | The array into which samples are read.
sampsRead | int32 * | The actual number of bytes read into the array per scan.
numBytesPerSamp | int32 * | The number of elements in readArray that constitutes a sample. This value takes into account all channels that are read. For example, five channels giving 12 bytes for one entire scan return 12 bytes. The value is not divided along channel lines.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteAnalogF64

int32 DAQmxWriteAnalogF64 (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout, float64 writeArray[], int32 *sampsPerChanWritten, bool32 *reserved);

Purpose

Writes multiple floating-point samples to a task that contains one or more analog output channels.

Note If you configured timing for your task, your write is considered a buffered write. Buffered writes require a minimum buffer size of 2 samples. If you do not configure the buffer size using DAQmxCfgOutputBuffer, NI-DAQmx automatically configures the buffer when you configure sample timing. If you attempt to write one sample for a buffered write without configuring the buffer, you will receive an error.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write samples to.
numSampsPerChan | int32 | The number of samples, per channel, to write. You must pass in a value of 0 or more in order for the sample to write. If you pass a negative number, this function returns an error.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout float64 The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
dataLayout bool32 Specifies how the samples are arranged, either interleaved or noninterleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (noninterleaved)
DAQmx_Val_GroupByScanNumber | Group by sample (interleaved)
writeArray | float64 [] | The array of 64-bit samples to write to the task.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
sampsPerChanWritten | int32 * | The actual number of samples per channel successfully written to the buffer.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteAnalogScalarF64

int32 DAQmxWriteAnalogScalarF64 (TaskHandle taskHandle, bool32 autoStart, float64 timeout, float64 value, bool32 *reserved);

Purpose

Writes a floating-point sample to a task that contains a single analog output channel.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write the sample to.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout | float64 | The amount of time, in seconds, to wait for this function to write the value. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses. A value of 0 indicates to try once to write the value. If this function successfully writes the value, it does not return an error. Otherwise, the function returns a timeout error.
value | float64 | A 64-bit sample to write to the task.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteBinaryI16

int32 DAQmxWriteBinaryI16 (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout, int16 writeArray[], int32 *sampsPerChanWritten, bool32 *reserved);

Purpose

Writes unscaled signed integer samples to the task.

Note If you configured timing for your task, your write is considered a buffered write. Buffered writes require a minimum buffer size of 2 samples. If you do not configure the buffer size using DAQmxCfgOutputBuffer, NI-DAQmx automatically configures the buffer when you configure sample timing. If you attempt to write one sample for a buffered write without configuring the buffer, you will receive an error.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write samples to.
numSampsPerChan | int32 | The number of samples, per channel, to write. You must pass in a value of 0 or more in order for the sample to write. If you pass a negative number, this function returns an error.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout float64 The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
dataLayout bool32 Specifies how the samples are arranged, either interleaved or noninterleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (noninterleaved)
DAQmx_Val_GroupByScanNumber | Group by sample (interleaved)
writeArray | int16 [] | The array of 16-bit samples to write to the task.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
sampsPerChanWritten | int32 * | The actual number of samples per channel successfully written to the buffer.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteBinaryU16

int32 DAQmxWriteBinaryU16 (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout, uInt16 writeArray[], int32 *sampsPerChanWritten, bool32 *reserved);

Purpose

Writes unscaled, unsigned 16-bit integer samples to the task.

Note If you configured timing for your task, your write is considered a buffered write. Buffered writes require a minimum buffer size of 2 samples. If you do not configure the buffer size using DAQmxCfgOutputBuffer, NI-DAQmx automatically configures the buffer when you configure sample timing. If you attempt to write one sample for a buffered write without configuring the buffer, you will receive an error.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write samples to.
numSampsPerChan | int32 | The number of samples, per channel, to write. You must pass in a value of 0 or more in order for the sample to write. If you pass a negative number, this function returns an error.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout float64 The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
dataLayout bool32 Specifies how the samples are arranged, either interleaved or noninterleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (noninterleaved)
DAQmx_Val_GroupByScanNumber | Group by sample (interleaved)
writeArray | uInt16 [] | The array of 16-bit samples to write to the task.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
sampsPerChanWritten | int32 * | The actual number of samples per channel successfully written to the buffer.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteCtrFreq

int32 DAQmxWriteCtrFreq (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout, float64 frequency[], float64 dutyCycle[], int32 *numSampsPerChanWritten, bool32 *reserved);

Purpose

Writes a new pulse frequency and duty cycle to each channel in a continuous counter output task that contains one or more channels.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write samples to.
numSampsPerChan | int32 | The number of samples, per channel, to write. You must pass in a value of 0 or more in order for the sample to write. If you pass a negative number, this function returns an error.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout float64 The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
dataLayout bool32 Specifies how the samples are arranged, either interleaved or noninterleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (noninterleaved)
DAQmx_Val_GroupByScanNumber | Group by sample (interleaved)
frequency | float64 [] | Specifies at what frequency to generate pulses.
dutyCycle | float64 [] | The width of the pulse divided by the pulse period. NI-DAQmx uses this ratio, combined with frequency, to determine both pulse width and pulse delay.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
numSampsPerChanWritten | int32 * | The actual number of samples per channel successfully written to the buffer.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteCtrFreqScalar

int32 DAQmxWriteCtrFreqScalar (TaskHandle taskHandle, bool32 autoStart, float64 timeout, float64 frequency, float64 dutyCycle, bool32 *reserved);

Purpose

Writes a new pulse frequency and duty cycle to a continuous counter output task that contains a single channel.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write the sample to.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout | float64 | The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses. A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
frequency | float64 | Specifies at what frequency to generate pulses.
dutyCycle | float64 | The width of the pulse divided by the pulse period. NI-DAQmx uses this ratio, combined with frequency, to determine both pulse width and pulse delay.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteCtrTicks

int32 DAQmxWriteCtrTicks (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout, uInt32 highTicks[], uInt32 lowTicks[], int32 *numSampsPerChanWritten, bool32 *reserved);

Purpose

Writes new pulse high tick counts and low tick counts to each channel in a continuous counter output task that contains one or more channels.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write samples to.
numSampsPerChan | int32 | The number of samples, per channel, to write. You must pass in a value of 0 or more in order for the sample to write. If you pass a negative number, this function returns an error.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout float64 The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
dataLayout bool32 Specifies how the samples are arranged, either interleaved or noninterleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (noninterleaved)
DAQmx_Val_GroupByScanNumber | Group by sample (interleaved)
highTicks | uInt32 [] | The number of timebase ticks the pulse is high.
lowTicks | uInt32 [] | The number of timebase ticks the pulse is low.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
numSampsPerChanWritten | int32 * | The actual number of samples per channel successfully written to the buffer.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteCtrTicksScalar

int32 DAQmxWriteCtrTicksScalar (TaskHandle taskHandle, bool32 autoStart, float64 timeout, uInt32 highTicks, uInt32 lowTicks, bool32 *reserved);

Purpose

Writes a new pulse high tick count and low tick count to a continuous counter output task that contains a single channel.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write the sample to.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout | float64 | The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses. A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
highTicks | uInt32 | The number of timebase ticks the pulse is high.
lowTicks | uInt32 | The number of timebase ticks the pulse is low.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteCtrTime

int32 DAQmxWriteCtrTime (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout, float64 highTime[], float64 lowTime[], int32 *numSampsPerChanWritten, bool32 *reserved);

Purpose

Writes a new pulse high time and low time to each channel in a continuous counter output task that contains one or more channels.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write samples to.
numSampsPerChan | int32 | The number of samples, per channel, to write. You must pass in a value of 0 or more in order for the sample to write. If you pass a negative number, this function returns an error.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout float64 The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
dataLayout bool32 Specifies how the samples are arranged, either interleaved or noninterleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (noninterleaved)
DAQmx_Val_GroupByScanNumber | Group by sample (interleaved)
highTime | float64 [] | The amount of time the pulse is high.
lowTime | float64 [] | The amount of time the pulse is low.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
numSampsPerChanWritten | int32 * | The actual number of samples per channel successfully written to the buffer.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteCtrTimeScalar

int32 DAQmxWriteCtrTimeScalar (TaskHandle taskHandle, bool32 autoStart, float64 timeout, float64 highTime, float64 lowTime, bool32 *reserved);

Purpose

Writes a new pulse high time and low time to a continuous counter output task that contains a single channel.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write the sample to.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout | float64 | The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses. A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
highTime | float64 | The amount of time the pulse is high.
lowTime | float64 | The amount of time the pulse is low.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteDigitalLines

int32 DAQmxWriteDigitalLines (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout, uInt8 writeArray[], int32 *sampsPerChanWritten, bool32 *reserved);

Purpose

Writes multiple samples to each digital line in a task. When you create your write array, each sample per channel must contain the number of bytes returned by the DAQmx_Read_DigitalLines_BytesPerChan property.

Note If you configured timing for your task, your write is considered a buffered write. Buffered writes require a minimum buffer size of 2 samples. If you do not configure the buffer size using DAQmxCfgOutputBuffer, NI-DAQmx automatically configures the buffer when you configure sample timing. If you attempt to write one sample for a buffered write without configuring the buffer, you will receive an error.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write samples to.
numSampsPerChan | int32 | The number of samples, per channel, to write. You must pass in a value of 0 or more in order for the sample to write. If you pass a negative number, this function returns an error.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout float64 The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
dataLayout bool32 Specifies how the samples are arranged, either interleaved or noninterleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (noninterleaved)
DAQmx_Val_GroupByScanNumber | Group by sample (interleaved)
writeArray | uInt8 [] | The samples to write to the task.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
sampsPerChanWritten | int32 * | The actual number of samples per channel successfully written to the buffer.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteDigitalScalarU32

int32 DAQmxWriteDigitalScalarU32 (TaskHandle taskHandle, bool32 autoStart, float64 timeout, uInt32 value, bool32 *reserved);

Purpose

Writes a single 32-bit unsigned integer sample to a task that contains a single digital output channel. Use this format for devices with up to 32 lines per port.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write the sample to.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout | float64 | The amount of time, in seconds, to wait for this function to write the value. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses. A value of 0 indicates to try once to write the value. If this function successfully writes the value, it does not return an error. Otherwise, the function returns a timeout error.
value | uInt32 | A 32-bit integer sample to write to the task.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteDigitalU8

int32 DAQmxWriteDigitalU8 (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout, uInt8 writeArray[], int32 *sampsPerChanWritten, bool32 *reserved);

Purpose

Writes multiple 8-bit unsigned integer samples to a task that contains one or more digital output channels. Use this format for devices with up to 8 lines per port.

Note If you configured timing for your task, your write is considered a buffered write. Buffered writes require a minimum buffer size of two samples. If you do not configure the buffer size using DAQmxCfgOutputBuffer, NI-DAQmx automatically configures the buffer when you configure sample timing. If you attempt to write one sample for a buffered write without configuring the buffer, you will receive an error.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write samples to.
numSampsPerChan | int32 | The number of samples, per channel, to write. You must pass in a value of 0 or more in order for the sample to write. If you pass a negative number, this function returns an error.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout float64 The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
dataLayout bool32 Specifies how the samples are arranged, either interleaved or noninterleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (noninterleaved)
DAQmx_Val_GroupByScanNumber | Group by sample (interleaved)
writeArray | uInt8 [] | The array of 8-bit integer samples to write to the task.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
sampsPerChanWritten | int32 * | The actual number of samples per channel successfully written to the buffer.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteDigitalU16

int32 DAQmxWriteDigitalU16 (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout, uInt16 writeArray[], int32 *sampsPerChanWritten, bool32 *reserved);

Purpose

Writes multiple 16-bit unsigned integer samples to a task that contains one or more digital output channels. Use this format for devices with up to 16 lines per port.

Note If you configured timing for your task, your write is considered a buffered write. Buffered writes require a minimum buffer size of two samples. If you do not configure the buffer size using DAQmxCfgOutputBuffer, NI-DAQmx automatically configures the buffer when you configure sample timing. If you attempt to write one sample for a buffered write without configuring the buffer, you will receive an error.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write samples to.
numSampsPerChan | int32 | The number of samples, per channel, to write. You must pass in a value of 0 or more in order for the sample to write. If you pass a negative number, this function returns an error.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout float64 The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
dataLayout bool32 Specifies how the samples are arranged, either interleaved or noninterleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (noninterleaved)
DAQmx_Val_GroupByScanNumber | Group by sample (interleaved)
writeArray | uInt16 [] | The array of 16-bit integer samples to write to the task.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
sampsPerChanWritten | int32 * | The actual number of samples per channel successfully written to the buffer.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteDigitalU32

int32 DAQmxWriteDigitalU32 (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout, uInt32 writeArray[], int32 *sampsPerChanWritten, bool32 *reserved);

Purpose

Writes multiple 32-bit unsigned integer samples to a task that contains one or more digital output channels. Use this format for devices with up to 32 lines per port.

Note If you configured timing for your task, your write is considered a buffered write. Buffered writes require a minimum buffer size of two samples. If you do not configure the buffer size using DAQmxCfgOutputBuffer, NI-DAQmx automatically configures the buffer when you configure sample timing. If you attempt to write one sample for a buffered write without configuring the buffer, you will receive an error.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write samples to.
numSampsPerChan | int32 | The number of samples, per channel, to write. You must pass in a value of 0 or more in order for the sample to write. If you pass a negative number, this function returns an error.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout float64 The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses.

A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
dataLayout bool32 Specifies how the samples are arranged, either interleaved or noninterleaved.
Value | Description
DAQmx_Val_GroupByChannel | Group by channel (noninterleaved)
DAQmx_Val_GroupByScanNumber | Group by sample (interleaved)
writeArray | uInt32 [] | The array of 32-bit integer samples to write to the task.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
sampsPerChanWritten | int32 * | The actual number of samples per channel successfully written to the buffer.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteRaw

int32 DAQmxWriteRaw (TaskHandle taskHandle, int32 numSamps, bool32 autoStart, float64 timeout, void *writeArray, int32 *sampsPerChanWritten, bool32 *reserved);

Purpose

Writes raw samples to a task. There is no scaling, parsing, or separation of the samples. Refer to the specifications for your instrument to determine the format of the incoming samples.

Note If you configured timing for your task, your write is considered a buffered write. Buffered writes require a minimum buffer size of 2 samples. If you do not configure the buffer size using DAQmxCfgOutputBuffer, NI-DAQmx automatically configures the buffer when you configure sample timing. If you attempt to write one sample for a buffered write without configuring the buffer, you will receive an error.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to write samples to.
numSamps | int32 | The number of samples per channel to write. You must pass in a value of 0 or more in order for the sample to write. If you pass a negative number, you will receive an error.
autoStart | bool32 | Specifies whether or not this function automatically starts the task if you do not start it.
timeout | float64 | The amount of time, in seconds, to wait for this function to write all the samples. The default value is 10.0 seconds. To specify an infinite wait, pass -1 (DAQmx_Val_WaitInfinitely). This function returns an error if the timeout elapses. A value of 0 indicates to try once to write the submitted samples. If this function successfully writes all submitted samples, it does not return an error. Otherwise, the function returns a timeout error and returns the number of samples actually written.
writeArray | void * | The raw samples to write to the task.
reserved | bool32 * | Reserved for future use. Pass NULL to this parameter.
Output
Name | Type | Description
sampsPerChanWritten | int32 * | The actual number of samples per channel successfully written to the buffer.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxExportSignal

int32 DAQmxExportSignal (TaskHandle taskHandle, int32 signalID, const char outputTerminal[]);

Purpose

Routes a control signal to the specified terminal. The output terminal can reside on the device that generates the control signal or on a different device. Use this function to share clocks and triggers between multiple tasks and devices. The routes created by this function are task-based routes.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
signalID int32 The name of the trigger, clock, or event to export.
Value | Description
DAQmx_Val_AIConvertClock | Clock that causes an analog-to-digital conversion on an E Series or M Series device. One conversion corresponds to a single sample from one channel.
DAQmx_Val_10MHzRefClock | Output of an oscillator that you can use to synchronize multiple devices.
DAQmx_Val_20MHzTimebaseClock | Output of an oscillator that is the onboard source of the Master Timebase. Other timebases are derived from this clock.
DAQmx_Val_SampleClock | Clock the device uses to time each sample.
DAQmx_Val_AdvanceTrigger | Trigger that moves a switch to the next entry in a scan list.
DAQmx_Val_ReferenceTrigger | Trigger that establishes the reference point between pretrigger and posttrigger samples.
DAQmx_Val_StartTrigger | Trigger that begins a measurement or generation.
DAQmx_Val_AdvCmpltEvent | Signal that a switch product generates after it both executes the command(s) in a scan list entry and waits for the settling time to elapse.
DAQmx_Val_AIHoldCmpltEvent | Signal that an E Series or M Series device generates when the device latches analog input data (the ADC enters "hold" mode) and it is safe for any external switching hardware to remove the signal and replace it with the next signal. This event does not indicate the completion of the actual analog-to-digital conversion.
DAQmx_Val_CounterOutputEvent | Signal that a counter generates. Each time the counter reaches terminal count, this signal toggles or pulses.
DAQmx_Val_ChangeDetectionEvent | Signal that a static DIO device generates when the device detects a rising or falling edge on any of the lines or ports you selected when you configured change detection timing.
DAQmx_Val_WDTExpiredEvent | Signal that a static DIO device generates when the watchdog timer expires.
outputTerminal | const char [] | The destination terminal of the exported signal.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCalculateReversePolyCoeff

int32 DAQmxCalculateReversePolyCoeff (float64 forwardCoeffs[], uInt32 numForwardCoeffsIn, float64 minValX, float64 maxValX, int32 numPointsToCompute, int32 reversePolyOrder, float64 reverseCoeffs[]);

Purpose

Computes a set of coefficients for a polynomial that approximates the inverse of the polynomial with the coefficients you specify with forwardCoeffs. The function generates a table of x versus y values over the range of x. The function then finds a polynomial fit, using the least squares method to compute a polynomial that computes an x given a y.

Parameters

Input
Name | Type | Description
forwardCoeffs | float64 [] | The array of the forward coefficients for the polynomial that computes y given a value of x. Each element of the array corresponds to a term of the equation. For example, if index 3 of the array is 9, the fourth term of the equation is 9x3.
numForwardCoeffsIn | uInt32 | The number of elements in forwardCoeff.
minValX | float64 | The minimum value of x for which you use the polynomial. This is the smallest value of x for which the function generates a y value in the table.
maxValX | float64 | The maximum value of x for which you use the polynomial. This is the largest value of x for which the function generates a y value in the table.
numPointsToCompute | int32 | The number of points in the table of x versus y values. The function spaces the values evenly between minValX and maxValX.
reversePolyOrder | int32 | The order of the reverse polynomial to compute. For example, an input of 3 indicates a 3rd order polynomial. An input of -1 indicates to compute a reverse polynomial of the same order as the forward polynomial.
Output
reverseCoeffs | float64 [] | The array of the reverse coefficients of the polynomial. Each element of the array corresponds to a term of the equation. For example, if index 3 of the array is 9, the fourth term of the equation is 9y3. reverseCoeffs will be one greater than what you passed for reversePolyOrder. If you pass -1 for reversePolyOrder, the array must be the size of forwardCoeffs. Otherwise, the behavior is undefined.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateLinScale

int32 DAQmxCreateLinScale (const char name[], float64 slope, float64 yIntercept, int32 preScaledUnits, const char scaledUnits[]);

Purpose

Creates and configures a scale that uses the equation y=mx+b, where x is the prescaled value and y is the scaled value. The equation is identical for input and output. If your equation is in the form x=my+b, you must first solve for y in terms of x.

Parameters

Input
Name | Type | Description
name | const char [] | Identifies the custom scale for later use, such as when you create channels.
slope | float64 | The slope, m, in the equation.
yIntercept | float64 | The y-intercept, b, in the equation.
preScaledUnits int32 The units of the values to scale.
Value | Description
DAQmx_Val_Volts | volts
DAQmx_Val_Amps | amperes
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegR | degrees Rankine
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_Strain | strain
DAQmx_Val_Ohms | ohms
DAQmx_Val_Hz | hertz
DAQmx_Val_Seconds | seconds
DAQmx_Val_Meters | meters
DAQmx_Val_Inches | inches
DAQmx_Val_Degrees | degrees
DAQmx_Val_Radians | radians
DAQmx_Val_g | G. 1 g is approximately equal to 9.81 m/s2.
DAQmx_Val_Pascals | pascals
DAQmx_Val_FromTEDS | Units defined by TEDS information associated with the channel.
scaledUnits | const char [] | The units you want to use for the scaled value. You can use an arbitrary value.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateMapScale

int32 DAQmxCreateMapScale (const char name[], float64 prescaledMin, float64 prescaledMax, float64 scaledMin, float64 scaledMax, int32 preScaledUnits, const char scaledUnits[]);

Purpose

Creates and configures a scale that scales values proportionally from a range of prescaled values to a range of scaled values.

Parameters

Input
Name | Type | Description
name | const char [] | Identifies the custom scale for later use, such as when you create channels.
prescaledMin | float64 | The smallest value in the range of prescaled values. NI-DAQmx maps this value to scaledMin.
prescaledMax | float64 | The largest value in the range of prescaled values. NI-DAQmx maps this value to scaledMax.
scaledMin | float64 | The smallest value in the range of scaled values. NI-DAQmx maps this value to prescaledMin. Read operations clip samples that are smaller than this value. Write operations generate errors for samples that are smaller than this value.
scaledMax | float64 | The largest value in the range of scaled values. NI-DAQmx maps this value to prescaledMax. Read operations clip samples that are larger than this value. Write operations generate errors for samples that are larger than this value.
preScaledUnits int32 The units of the values to scale.
Value | Description
DAQmx_Val_Volts | volts
DAQmx_Val_Amps | amperes
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegR | degrees Rankine
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_Strain | strain
DAQmx_Val_Ohms | ohms
DAQmx_Val_Hz | hertz
DAQmx_Val_Seconds | seconds
DAQmx_Val_Meters | meters
DAQmx_Val_Inches | inches
DAQmx_Val_Degrees | degrees
DAQmx_Val_Radians | radians
DAQmx_Val_g | G. 1 g is approximately equal to 9.81 m/s2.
DAQmx_Val_Pascals | pascals
DAQmx_Val_FromTEDS | Units defined by TEDS information associated with the channel.
scaledUnits | const char [] | The units you want to use for the scaled value. You can use an arbitrary value.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreatePolynomialScale

int32 DAQmxCreatePolynomialScale (const char name[], float64 forwardCoeffs[], uInt32 numForwardCoeffsIn, float64 reverseCoeffs[], uInt32 numReverseCoeffsIn, int32 preScaledUnits, const char scaledUnits[]);

Purpose

Creates and configures a scale that uses an nth order polynomial equation. NI-DAQmx requires both a polynomial to convert prescaled values to scaled values (forward) and a polynomial to convert scaled values to prescaled values (reverse). If you know only one set of coefficients, use DAQmxCalculateReversePolyCoeff to generate the other set.

Parameters

Input
Name | Type | Description
name | const char [] | Identifies the custom scale for later use, such as when you create channels.
forwardCoeffs | float64 [] | An array of coefficients for the polynomial that converts prescaled values to scaled values. Each element of the array corresponds to a term of the equation. For example, if index 3 of the array is 9, the fourth term of the equation is 9x3.
numForwardCoeffsIn | uInt32 | The number of elements in forwardCoeff.
reverseCoeffs | float64 [] | An array of coefficients for the polynomial that converts scaled values to prescaled values. Each element of the array corresponds to a term of the equation. For example, if index 3 of the array is 9, the fourth term of the equation is 9y3.
numReverseCoeffsIn | uInt32 | The number of elements in reverseCoeff.
preScaledUnits int32 The units of the values to scale.
Value | Description
DAQmx_Val_Volts | volts
DAQmx_Val_Amps | amperes
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegR | degrees Rankine
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_Strain | strain
DAQmx_Val_Ohms | ohms
DAQmx_Val_Hz | hertz
DAQmx_Val_Seconds | seconds
DAQmx_Val_Meters | meters
DAQmx_Val_Inches | inches
DAQmx_Val_Degrees | degrees
DAQmx_Val_Radians | radians
DAQmx_Val_g | G. 1 g is approximately equal to 9.81 m/s2.
DAQmx_Val_Pascals | pascals
DAQmx_Val_FromTEDS | Units defined by TEDS information associated with the channel.
scaledUnits | const char [] | The units you want to use for the scaled value. You can use an arbitrary value.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateTableScale

int32 DAQmxCreateTableScale (const char name[], float64 prescaledVals[], uInt32 numPrescaledValsIn, float64 scaledVals[], uInt32 numScaledValsIn, int32 preScaledUnits, const char scaledUnits[]);

Purpose

Creates and configures a scale that maps an array of prescaled values to an array of corresponding scaled values. NI-DAQmx applies linear interpolation to values that fall between the values in the table. Read operations clip scaled samples that are outside the maximum and minimum scaled values found in the table. Write operations generate errors for samples that are outside the minimum and maximum scaled values found in the table.

Parameters

Input
Name | Type | Description
name | const char [] | Identifies the custom scale for later use, such as when you create channels.
prescaledVals | float64 [] | An array of prescaled values. These values map directly to the values in scaledVals.
numPrescaledValsIn | uInt32 | The number of elements in prescaledVals.
scaledVals | float64 [] | An array of scaled values. These values map directly to the values in prescaledVals.
numScaledValsIn | uInt32 | The number of elements in scaledVals.
preScaledUnits int32 The units of the values to scale.
Value | Description
DAQmx_Val_Volts | volts
DAQmx_Val_Amps | amperes
DAQmx_Val_DegF | degrees Fahrenheit
DAQmx_Val_DegC | degrees Celsius
DAQmx_Val_DegR | degrees Rankine
DAQmx_Val_Kelvins | kelvins
DAQmx_Val_Strain | strain
DAQmx_Val_Ohms | ohms
DAQmx_Val_Hz | hertz
DAQmx_Val_Seconds | seconds
DAQmx_Val_Meters | meters
DAQmx_Val_Inches | inches
DAQmx_Val_Degrees | degrees
DAQmx_Val_Radians | radians
DAQmx_Val_g | G. 1 g is approximately equal to 9.81 m/s2.
DAQmx_Val_Pascals | pascals
DAQmx_Val_FromTEDS | Units defined by TEDS information associated with the channel.
scaledUnits | const char [] | The units you want to use for the scaled value. You can use an arbitrary value.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgInputBuffer

int32 DAQmxCfgInputBuffer (TaskHandle taskHandle, uInt32 numSampsPerChan);

Purpose

Overrides the automatic input buffer allocation that NI-DAQmx performs.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
numSampsPerChan | uInt32 | The number of samples the buffer can hold for each channel in the task. Zero indicates no buffer should be allocated. Use a buffer size of 0 to perform a hardware-timed operation without using a buffer.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCfgOutputBuffer

int32 DAQmxCfgOutputBuffer (TaskHandle taskHandle, uInt32 numSampsPerChan);

Purpose

Overrides the automatic output buffer allocation that NI-DAQmx performs.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
numSampsPerChan | uInt32 | The number of samples the buffer can hold for each channel in the task. Zero indicates no buffer should be allocated. Use a buffer size of 0 to perform a hardware-timed operation without using a buffer.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWaitForNextSampleClock

int32 DAQmxWaitForNextSampleClock (TaskHandle taskHandle, float64 timeout, bool32 *isLate);

Purpose

Waits until the next pulse of the Sample Clock occurs. If an extra Sample Clock pulse occurs between calls to this function, the second call returns an error or warning and waits for the next Sample Clock pulse. Use the get/set/reset functions for the RealTimeConvLateErrorsToWarnings property to specify whether this function returns errors or warnings.

Use this function to ensure I/O cycles complete within Sample Clock periods. National Instruments recommends you use this function for certain applications only.

Use the DAQmx Real-Time properties to configure error reporting and waiting options.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
timeout | float64 | The maximum amount of time, in seconds, to wait for the next Sample Clock pulse. If the time elapses, this VI returns an error. The default timeout is 10 seconds. If you set timeout to -1, this VI waits indefinitely.
Output
Name | Type | Description
isLate | int32 | A value of 0 indicates the read or write function executed in real time. A value of 1 indicates the function did not execute in real time.

Return Value

Name | Type | Description
isLate | int32 | Indicates if this function detected an extra Sample Clock pulse after the specified number of warmup iterations execute. Use DAQmxSetRealTimeNumOfWarmupIters to specify the number of warmup iterations. This output is always FALSE until that number of loop iterations execute.


DAQmxWaitUntilTaskDone

int32 DAQmxWaitUntilTaskDone (TaskHandle taskHandle, float64 timeToWait);

Purpose

Waits for the measurement or generation to complete. Use this function to ensure that the specified operation is complete before you stop the task.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
timeToWait | float64 | The maximum amount of time, in seconds, to wait for the measurement or generation to complete. The function returns an error if the time elapses before the measurement or generation is complete. A value of -1 (DAQmx_Val_WaitInfinitely) means to wait indefinitely. If you set timeToWait to 0, the function checks once and returns an error if the measurement or generation is not done.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxIsReadOrWriteLate

bool32 DAQmxIsReadOrWriteLate (int32 errorCode);

Purpose

Note This function is obsolete and now always returns zero. The information below no longer applies but is provided for reference.

Returns TRUE if a DAQmx Read function or DAQmx Write function did not execute in real time.

Parameters

Input
Name | Type | Description
errorCode | int32 | An error code or warning returned by one of the NI-DAQmx Library Read or Write functions.

Return Value

Name | Type | Description
isLate | int32 | A value of 0 indicates the read or write function executed in real time. A value of 1 indicates the function did not execute in real time.


DAQmxSwitchCloseRelays

int32 DAQmxSwitchCloseRelays (const char relays[], bool32 waitForSettling);

Purpose

Closes the specified relays. If you set waitForSettling to TRUE, this function waits only after closing all relays. If you want to wait for settling after closing each relay, use this function multiple times to close each relay separately.

When you operate relays directly, you circumvent the protection that channel usage types offer. Avoid using this function when you use the DAQmxSwitchConnect function or the DAQmxSwitchDisconnect function. This function does not pass the changes you make to those functions.

Parameters

Input
Name | Type | Description
relays | const char [] | A set of relays to close.
waitForSettling | bool32 | If TRUE, this function waits for the switches to settle before returning. If FALSE, the function returns immediately after the operation.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSwitchConnect

int32 DAQmxSwitchConnect (const char switchChannel1[], const char switchChannel2[], bool32 waitForSettling);

Purpose

Makes a connection between two switch channels. When using this function, specify only the two connection endpoints using switchChannel1 and switchChannel2. The function then attempts to find an available path between the two channels.

Parameters

Input
Name | Type | Description
switchChannel1 | const char [] | The first channel to connect.
switchChannel2 | const char [] | The second channel to connect.
waitForSettling | bool32 | If TRUE, this function waits for the switches to settle before returning. If FALSE, the function returns immediately after the operation.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSwitchConnectMulti

int32 DAQmxSwitchConnectMulti (const char connectionList[], bool32 waitForSettling);

Purpose

Makes one or more connections specified by a connection list. You can specify only the two endpoints, or you can specify the explicit path between two endpoints. This function can make connections on multiple devices, but each connection must reside on a single device. In the event of an error, connecting stops at the point in the list where the error occurred. If you set waitForSettling to TRUE, this function returns only after making all connections. If you want to wait for settling between connections, use this function multiple times to make connections separately.

Parameters

Input
Name | Type | Description
connectionList | const char [] | A list of connections, using a special syntax, to make between switch channels.
waitForSettling | bool32 | If TRUE, this function waits for the switches to settle before returning. If FALSE, the function returns immediately after the operation.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSwitchCreateScanList

int32 DAQmxSwitchCreateScanList (const char scanList[], TaskHandle *taskHandle);

Purpose

Creates a new switch scanning task that uses the specified scan list and applies it to the specified task.

Parameters

Input
Name | Type | Description
scanList | const char [] | Uses a special syntax to specify the sequence of connections and disconnections for the task.
Output
Name | Type | Description
taskHandle | TaskHandle * | The task created by this function.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSwitchDisconnect

int32 DAQmxSwitchDisconnect (const char switchChannel1[], const char switchChannel2[], bool32 waitForSettling);

Purpose

Disconnects two switch channels. When using this function, specify only the two connection endpoints switchChannel1 and switchChannel2.

Parameters

Input
Name | Type | Description
switchChannel1 | const char [] | The first channel to disconnect.
switchChannel2 | const char [] | The second channel to disconnect.
waitForSettling | bool32 | If TRUE, this function waits for the switches to settle before returning. If FALSE, the function returns immediately after the operation.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSwitchDisconnectAll

int32 DAQmxSwitchDisconnectAll (const char deviceName[], bool32 waitForSettling);

Purpose

Terminates all active connections on the device, which places the relays into the topology reset state. You can use this function to terminate connections made by DAQmxSwitchConnect, DAQmxSwitchOpenRelays, or DAQmxSwitchCloseRelays. This function does not alter the settling time or channel usage settings. To reset those settings, use DAQmxResetDevice or DAQmxSwitchSetTopologyAndReset.

If you set waitForSettling to TRUE, this function returns only after terminating all connections. If you want to wait for settling between disconnections, use the DAQmxSwitchDisconnect function multiple times to terminate connections separately.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.
waitForSettling | bool32 | If TRUE, this function waits for the switches to settle before returning. If FALSE, the function returns immediately after the operation.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSwitchDisconnectMulti

int32 DAQmxSwitchDisconnectMulti (const char connectionList[], bool32 waitForSettling);

Purpose

Terminates one or more connections specified by a connection list. This function can terminate connections on multiple devices. In the event of an error, the function stops at the point in the list where the error occurred. If you set waitForSettling to TRUE, this function returns only after terminating all connections. If you want to wait for settling between disconnections, use this function multiple times to terminate connections separately.

Parameters

Input
Name | Type | Description
connectionList | const char [] | Uses a special syntax to specify the list of switch connections to terminate.
waitForSettling | bool32 | If TRUE, this function waits for the switches to settle before returning. If FALSE, the function returns immediately after the operation.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSwitchFindPath

int32 DAQmxSwitchFindPath (const char switchChannel1[], const char switchChannel2[], char path[], uInt32 pathBufferSize, int32 *pathStatus);

Purpose

Returns information about the path between switchChannel1 and switchChannel2. If the channels are connected, this function returns the path by which they are connected. If the channels are not connected, the function returns a path by which they could be connected, if one is available.

Parameters

Input
Name | Type | Description
switchChannel1 | const char [] | The first channel to connect.
switchChannel2 | const char [] | The second channel to connect.
pathBufferSize | uInt32 | The size of path. If you pass 0, this function returns the size of the buffer needed to allocate.
Output
Name | Type | Description
path | char [] | The existing path or an available path between switchChannel1 and switchChannel2. This path uses the same syntax as a connection or disconnection list. If you pass NULL, this function returns the size of the buffer needed to allocate.
pathStatus int32 * The status of the requested path. The following values can be returned:

Value | Description
DAQmx_Val_PathCapability_Available | path returns the available path between the channels.
DAQmx_Val_PathCapability_AlreadyExists | The channels are already connected by path.
DAQmx_Val_PathCapability_Unsupported | No path is available between the channels. You might need to reserve more channels for routing to create an available path.
DAQmx_Val_PathCapability_ChannelInUse | Path between the two endpoints is not available because another connection is already using a channel needed for routing.
DAQmx_Val_PathCapability_ChannelSourceConflict | No path is available between the two channels because connecting the channels would directly or indirectly connect two source channels.
DAQmx_Val_PathCapability_ChannelReservedForRouting | One of the endpoint channels is reserved for routing.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A negative value indicates an error. For this function, if you pass NULL for the buffer or 0 for the buffer size, this function returns the number of bytes needed to allocate.


DAQmxSwitchGetMultiRelayCount

int32 DAQmxSwitchGetMultiRelayCount (const char relayList[], uInt32 count[], uInt32 countArraySize, uInt32 *numRelayCountsRead);

Purpose

Returns the number of times a set of relays have been actuated. Use this function to track relay lifetime and usage. You must set the waitForSettling parameter of Switch functions to TRUE to obtain an accurate relay count.

Parameters

Input
Name | Type | Description
relayList | const char [] | The set of relays you want to query.
countArraySize | uInt32 | The size of count. If you pass 0, this function returns the number of samples needed to allocate.
Output
Name | Type | Description
count | uInt32 [] | Number of times each specified relay has been actuated. The order of this array depends on the order of relayList. If you pass NULL, this function returns the number of samples needed to allocate.
numRelayCountsRead | uInt32 * | The number of relay counts read by the function.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A negative value indicates an error. For this function, if you pass NULL for the buffer or 0 for the buffer size, this function returns the number of samples needed to allocate. For example, malloc (n*sizeof(uInt32));


DAQmxSwitchGetMultiRelayPos

int32 DAQmxSwitchGetMultiRelayPos (const char relayList[], uInt32 relayPos[], uInt32 relayPosArraySize, uInt32 *numRelayPosRead);

Purpose

Returns the current position of a set of relays.

Parameters

Input
Name | Type | Description
relayList | const char [] | The set of relays you want to query.
relayPosArraySize | uInt32 | The size of relayPos. If you pass 0, this function returns the number of samples needed to allocate.
Output
Name | Type | Description
relayPos uInt32 [] The position of each specified relay. The order of this array corresponds to the order of relayList. If you pass NULL, this function returns the number of samples needed to allocate.
Value | Description
DAQmx_Val_Open | Relay is open.
DAQmx_Val_Closed | Relay is closed.
numRelayPosRead | uInt32 * | The number of relay positions read by the function.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A negative value indicates an error. For this function, if you pass NULL for the buffer or 0 for the buffer size, this function returns the number of samples needed to allocate. For example, malloc (n*sizeof(uInt32));


DAQmxSwitchGetSingleRelayCount

int32 DAQmxSwitchGetSingleRelayCount (const char relayName[], uInt32 *count);

Purpose

Returns the number of times a single relay has been actuated. Use this function to track relay lifetime and usage. You must set the waitForSettling parameter of Switch functions to TRUE to obtain an accurate relay count.

Parameters

Input
Name | Type | Description
relayName | const char [] | The relay you want to query.
Output
Name | Type | Description
count | uInt32 * | The number of times the relay has been actuated.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSwitchGetSingleRelayPos

int32 DAQmxSwitchGetSingleRelayPos (const char relayName[], uInt32 *relayPos);

Purpose

Returns the current position of a single relay.

Parameters

Input
Name | Type | Description
relayName | const char [] | The relay you want to query.
Output
Name | Type | Description
relayPos uInt32 * The position of the relay.
Value | Description
DAQmx_Val_Open | Relay is open.
DAQmx_Val_Closed | Relay is closed.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSwitchOpenRelays

int32 DAQmxSwitchOpenRelays (const char relays[], bool32 waitForSettling);

Purpose

Opens the specified relays. If you set waitForSettling to TRUE, this function waits only after opening all relays. If you want to wait for settling after opening each relay, use this function multiple times to open each relay separately.

When you operate relays directly, you circumvent the protection offered channel usage types. Avoid using this function when you use DAQmxSwitchConnect and DAQmxSwitchDisconnect. This function does not pass the changes you make to those functions.

Parameters

Input
Name | Type | Description
relays | const char [] | A set of relays to open.
waitForSettling | bool32 | If TRUE, this function waits for the switches to settle before returning. If FALSE, the function returns immediately after the operation.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSwitchSetTopologyAndReset

int32 DAQmxSwitchSetTopologyAndReset (const char deviceName[], const char newTopology[]);

Purpose

Resets a switch device and sets its topology to the one specified with newTopology. Use this function to initialize a switch device before scanning or making connections to ensure the initial state of that switch.

This function differs from DAQmxResetDevice because it uses the input topology name rather than the one you specify in MAX. This function does not modify the channel usage defaults you configure in MAX.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.
newTopology const char [] The switch topology to use on the device. The following table lists examples.

Value | Description
DAQmx_Val_Switch_Topology_1127_1_Wire_64x1_Mux | 1127/1-Wire 64x1 Mux
DAQmx_Val_Switch_Topology_1127_2_Wire_32x1_Mux | 1127/2-Wire 32x1 Mux
DAQmx_Val_Switch_Topology_1127_2_Wire_4x8_Matrix | 1127/2-Wire 4x8 Matrix
DAQmx_Val_Switch_Topology_1127_4_Wire_16x1_Mux | 1127/4-Wire 16x1 Mux
DAQmx_Val_Switch_Topology_1127_Independent | 1127/Independent
DAQmx_Val_Switch_Topology_1128_1_Wire_64x1_Mux | 1128/1-Wire 64x1 Mux
DAQmx_Val_Switch_Topology_1128_2_Wire_32x1_Mux | 1128/2-Wire 32x1 Mux
DAQmx_Val_Switch_Topology_1128_2_Wire_4x8_Matrix | 1128/2-Wire 4x8 Matrix
DAQmx_Val_Switch_Topology_1128_4_Wire_16x1_Mux | 1128/4-Wire 16x1 Mux
DAQmx_Val_Switch_Topology_1128_Independent | 1128/Independent
DAQmx_Val_Switch_Topology_1129_2_Wire_16x16_Matrix | 1129/2-Wire 16x16 Matrix
DAQmx_Val_Switch_Topology_1129_2_Wire_8x32_Matrix | 1129/2-Wire 8x32 Matrix
DAQmx_Val_Switch_Topology_1129_2_Wire_4x64_Matrix | 1129/2-Wire 4x64 Matrix
DAQmx_Val_Switch_Topology_1129_2_Wire_Dual_8x16_Matrix | 1129/2-Wire Dual 8x16 Matrix
DAQmx_Val_Switch_Topology_1129_2_Wire_Dual_4x32_Matrix | 1129/2-Wire Dual 4x32 Matrix
DAQmx_Val_Switch_Topology_1129_2_Wire_Quad_4x16_Matrix | 1129/2-Wire Quad 4x16 Matrix
DAQmx_Val_Switch_Topology_1130_1_Wire_256x1_Mux | 1130/1-Wire 256x1 Mux
DAQmx_Val_Switch_Topology_1130_1_Wire_Dual_128x1_Mux | 1130/1-Wire Dual 128x1 Mux
DAQmx_Val_Switch_Topology_1130_2_Wire_128x1_Mux | 1130/2-Wire 128x1 Mux
DAQmx_Val_Switch_Topology_1130_4_Wire_64x1_Mux | 1130/4-Wire 64x1 Mux
DAQmx_Val_Switch_Topology_1130_1_Wire_4x64_Matrix | 1130/1-Wire 4x64 Matrix
DAQmx_Val_Switch_Topology_1130_1_Wire_8x32_Matrix | 1130/1-Wire 8x32 Matrix
DAQmx_Val_Switch_Topology_1130_1_Wire_Octal_32x1_Mux | 1130/1-Wire Octal 32x1 Mux
DAQmx_Val_Switch_Topology_1130_1_Wire_Quad_64x1_Mux | 1130/1-Wire Quad 64x1 Mux
DAQmx_Val_Switch_Topology_1130_1_Wire_Sixteen_16x1_Mux | 1130/1-Wire Sixteen 16x1 Mux
DAQmx_Val_Switch_Topology_1130_2_Wire_4x32_Matrix | 1130/2-Wire 4x32 Matrix
DAQmx_Val_Switch_Topology_1130_2_Wire_Octal_16x1_Mux | 1130/2-Wire Octal 16x1 Mux
DAQmx_Val_Switch_Topology_1130_2_Wire_Quad_32x1_Mux | 1130/2-Wire Quad 32x1 Mux
DAQmx_Val_Switch_Topology_1130_4_Wire_Quad_16x1_Mux | 1130/4-Wire Quad 16x1 Mux
DAQmx_Val_Switch_Topology_1130_Independent | 1130/Independent
DAQmx_Val_Switch_Topology_1160_16_SPDT | 1160/16-SPDT
DAQmx_Val_Switch_Topology_1161_8_SPDT | 1161/8-SPDT
DAQmx_Val_Switch_Topology_1163R_Octal_4x1_Mux | 1163R/Octal 4x1 Mux
DAQmx_Val_Switch_Topology_1166_32_SPDT | 1166/32-SPDT
DAQmx_Val_Switch_Topology_1167_Independent | 1167/Independent
DAQmx_Val_Switch_Topology_1169_100_SPST | 1169/100-SPST
DAQmx_Val_Switch_Topology_1175_1_Wire_196x1_Mux | 1175/1-Wire 196x1 Mux
DAQmx_Val_Switch_Topology_1175_2_Wire_98x1_Mux | 1175/2-Wire 98x1 Mux
DAQmx_Val_Switch_Topology_1175_2_Wire_95x1_Mux | 1175/2-Wire 95x1 Mux
DAQmx_Val_Switch_Topology_1190_Quad_4x1_Mux | 1190/Quad 4x1 Mux
DAQmx_Val_Switch_Topology_1191_Quad_4x1_Mux | 1191/Quad 4x1 Mux
DAQmx_Val_Switch_Topology_1192_8_SPDT | 1192/8-SPDT
DAQmx_Val_Switch_Topology_1193_32x1_Mux | 1193/32x1 Mux
DAQmx_Val_Switch_Topology_1193_Dual_16x1_Mux | 1193/Dual 16x1 Mux
DAQmx_Val_Switch_Topology_1193_Quad_8x1_Mux | 1193/Quad 8x1 Mux
DAQmx_Val_Switch_Topology_1193_16x1_Terminated_Mux | 1193/16x1 Terminated Mux
DAQmx_Val_Switch_Topology_1193_Dual_8x1_Terminated_Mux | 1193/Dual 8x1 Terminated Mux
DAQmx_Val_Switch_Topology_1193_Quad_4x1_Terminated_Mux | 1193/Quad 4x1 Terminated Mux
DAQmx_Val_Switch_Topology_1193_Independent | 1193/Independent
DAQmx_Val_Switch_Topology_1194_Quad_4x1_Mux | 1194/Quad 4x1 Mux
DAQmx_Val_Switch_Topology_1195_Quad_4x1_Mux | 1195/Quad 4x1 Mux
DAQmx_Val_Switch_Topology_2501_1_Wire_48x1_Mux | 2501/1-Wire 48x1 Mux
DAQmx_Val_Switch_Topology_2501_1_Wire_48x1_Amplified_Mux | 2501/1-Wire 48x1 Amplified Mux
DAQmx_Val_Switch_Topology_2501_2_Wire_24x1_Mux | 2501/2-Wire 24x1 Mux
DAQmx_Val_Switch_Topology_2501_2_Wire_24x1_Amplified_Mux | 2501/2-Wire 24x1 Amplified Mux
DAQmx_Val_Switch_Topology_2501_2_Wire_Dual_12x1_Mux | 2501/2-Wire Dual 12x1 Mux
DAQmx_Val_Switch_Topology_2501_2_Wire_Quad_6x1_Mux | 2501/2-Wire Quad 6x1 Mux
DAQmx_Val_Switch_Topology_2501_2_Wire_4x6_Matrix | 2501/2-Wire 4x6 Matrix
DAQmx_Val_Switch_Topology_2501_4_Wire_12x1_Mux | 2501/4-Wire 12x1 Mux
DAQmx_Val_Switch_Topology_2503_1_Wire_48x1_Mux | 2503/1-Wire 48x1 Mux
DAQmx_Val_Switch_Topology_2503_2_Wire_24x1_Mux | 2503/2-Wire 24x1 Mux
DAQmx_Val_Switch_Topology_2503_2_Wire_Dual_12x1_Mux | 2503/2-Wire Dual 12x1 Mux
DAQmx_Val_Switch_Topology_2503_2_Wire_Quad_6x1_Mux | 2503/2-Wire Quad 6x1 Mux
DAQmx_Val_Switch_Topology_2503_2_Wire_4x6_Matrix | 2503/2-Wire 4x6 Matrix
DAQmx_Val_Switch_Topology_2503_4_Wire_12x1_Mux | 2503/4-Wire 12x1 Mux
DAQmx_Val_Switch_Topology_2527_1_Wire_64x1_Mux | 2527/1-Wire 64x1 Mux
DAQmx_Val_Switch_Topology_2527_1_Wire_Dual_32x1_Mux | 2527/1-Wire Dual 32x1 Mux
DAQmx_Val_Switch_Topology_2527_2_Wire_32x1_Mux | 2527/2-Wire 32x1 Mux
DAQmx_Val_Switch_Topology_2527_2_Wire_Dual_16x1_Mux | 2527/2-Wire Dual 16x1 Mux
DAQmx_Val_Switch_Topology_2527_4_Wire_16x1_Mux | 2527/4-Wire 16x1 Mux
DAQmx_Val_Switch_Topology_2527_Independent | 2527/Independent
DAQmx_Val_Switch_Topology_2529_2_Wire_8x16_Matrix | 2529/2-Wire 8x16 Matrix
DAQmx_Val_Switch_Topology_2529_2_Wire_4x32_Matrix | 2529/2-Wire 4x32 Matrix
DAQmx_Val_Switch_Topology_2529_2_Wire_Dual_4x16_Matrix | 2529/2-Wire Dual 4x16 Matrix
DAQmx_Val_Switch_Topology_2530_1_Wire_128x1_Mux | 2530/1-Wire 128x1 Mux
DAQmx_Val_Switch_Topology_2530_1_Wire_Dual_64x1_Mux | 2530/1-Wire Dual 64x1 Mux
DAQmx_Val_Switch_Topology_2530_2_Wire_64x1_Mux | 2530/2-Wire 64x1 Mux
DAQmx_Val_Switch_Topology_2530_4_Wire_32x1_Mux | 2530/4-Wire 32x1 Mux
DAQmx_Val_Switch_Topology_2530_1_Wire_4x32_Matrix | 2530/1-Wire 4x32 Matrix
DAQmx_Val_Switch_Topology_2530_1_Wire_8x16_Matrix | 2530/1-Wire 8x16 Matrix
DAQmx_Val_Switch_Topology_2530_1_Wire_Octal_16x1_Mux | 2530/1-Wire Octal 16x1 Mux
DAQmx_Val_Switch_Topology_2530_1_Wire_Quad_32x1_Mux | 2530/1-Wire Quad 32x1 Mux
DAQmx_Val_Switch_Topology_2530_2_Wire_4x16_Matrix | 2530/2-Wire 4x16 Matrix
DAQmx_Val_Switch_Topology_2530_2_Wire_Dual_32x1_Mux | 2530/2-Wire Dual 32x1 Mux
DAQmx_Val_Switch_Topology_2530_2_Wire_Quad_16x1_Mux | 2530/2-Wire Quad 16x1 Mux
DAQmx_Val_Switch_Topology_2530_4_Wire_Dual_16x1_Mux | 2530/4-Wire Dual 16x1 Mux
DAQmx_Val_Switch_Topology_2530_Independent | 2530/Independent
DAQmx_Val_Switch_Topology_2532_1_Wire_16x32_Matrix | 2532/1-Wire 16x32 Matrix
DAQmx_Val_Switch_Topology_2532_1_Wire_4x128_Matrix | 2532/1-Wire 4x128 Matrix
DAQmx_Val_Switch_Topology_2532_1_Wire_8x64_Matrix | 2532/1-Wire 8x64 Matrix
DAQmx_Val_Switch_Topology_2532_1_Wire_Dual_16x16_Matrix | 2532/1-Wire Dual 16x16 Matrix
DAQmx_Val_Switch_Topology_2532_1_Wire_Dual_4x64_Matrix | 2532/1-Wire Dual 4x64 Matrix
DAQmx_Val_Switch_Topology_2532_1_Wire_Dual_8x32_Matrix | 2532/1-Wire Dual 8x32 Matrix
DAQmx_Val_Switch_Topology_2532_1_Wire_Sixteen_2x16_Matrix | 2532/1-Wire Sixteen 2x16 Matrix
DAQmx_Val_Switch_Topology_2532_2_Wire_16x16_Matrix | 2532/2-Wire 16x16 Matrix
DAQmx_Val_Switch_Topology_2532_2_Wire_4x64_Matrix | 2532/2-Wire 4x64 Matrix
DAQmx_Val_Switch_Topology_2532_2_Wire_8x32_Matrix | 2532/2-Wire 8x32 Matrix
DAQmx_Val_Switch_Topology_2564_16_SPST | 2564/16-SPST
DAQmx_Val_Switch_Topology_2565_16_SPST | 2565/16-SPST
DAQmx_Val_Switch_Topology_2566_16_SPDT | 2566/16-SPDT
DAQmx_Val_Switch_Topology_2567_Independent | 2567/Independent
DAQmx_Val_Switch_Topology_2568_31_SPST | 2568/31-SPST
DAQmx_Val_Switch_Topology_2569_100_SPST | 2569/100-SPST
DAQmx_Val_Switch_Topology_2570_40_SPDT | 2570/40-SPDT
DAQmx_Val_Switch_Topology_2575_1_Wire_196x1_Mux | 2575/1-Wire 196x1 Mux
DAQmx_Val_Switch_Topology_2575_2_Wire_98x1_Mux | 2575/2-Wire 98x1 Mux
DAQmx_Val_Switch_Topology_2575_2_Wire_95x1_Mux | 2575/2-Wire 95x1 Mux
DAQmx_Val_Switch_Topology_2576_2_Wire_64x1_Mux | 2576/2-Wire 64x1 Mux
DAQmx_Val_Switch_Topology_2576_2_Wire_Dual_32x1_Mux | 2576/2-Wire Dual 32x1 Mux
DAQmx_Val_Switch_Topology_2576_2_Wire_Octal_8x1_Mux | 2576/2-Wire Octal 8x1 Mux
DAQmx_Val_Switch_Topology_2576_2_Wire_Quad_16x1_Mux | 2576/2-Wire Quad 16x1 Mux
DAQmx_Val_Switch_Topology_2576_2_Wire_Sixteen_4x1_Mux | 2576/2-Wire Sixteen 4x1 Mux
DAQmx_Val_Switch_Topology_2576_Independent | 2576/Independent
DAQmx_Val_Switch_Topology_2584_1_Wire_15x1_Mux | 2584/1-Wire 15x1 Mux
DAQmx_Val_Switch_Topology_2585_1_Wire_10x1_Mux | 2585/1-Wire 10x1 Mux
DAQmx_Val_Switch_Topology_2586_10_SPST | 2586/10-SPST
DAQmx_Val_Switch_Topology_2590_4x1_Mux | 2590/4x1 Mux
DAQmx_Val_Switch_Topology_2591_4x1_Mux | 2591/4x1 Mux
DAQmx_Val_Switch_Topology_2593_16x1_Mux | 2593/16x1 Mux
DAQmx_Val_Switch_Topology_2593_Dual_8x1_Mux | 2593/Dual 8x1 Mux
DAQmx_Val_Switch_Topology_2593_8x1_Terminated_Mux | 2593/8x1 Terminated Mux
DAQmx_Val_Switch_Topology_2593_Dual_4x1_Terminated_Mux | 2593/Dual 4x1 Terminated Mux
DAQmx_Val_Switch_Topology_2593_Independent | 2593/Independent
DAQmx_Val_Switch_Topology_2594_4x1_Mux | 2594/4x1 Mux
DAQmx_Val_Switch_Topology_2595_4x1_Mux | 2595/4x1 Mux
DAQmx_Val_Switch_Topology_2596_Dual_6x1_Mux | 2596/Dual 6x1 Mux
DAQmx_Val_Switch_Topology_2597_6x1_Terminated_Mux | 2597/6x1 Terminated Mux
DAQmx_Val_Switch_Topology_2598_Dual_Transfer | 2598/Dual Transfer
DAQmx_Val_Switch_Topology_2599_2_SPDT | 2599/2-SPDT

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSwitchWaitForSettling

int32 DAQmxSwitchWaitForSettling (const char deviceName[]);

Purpose

Waits for the settling time on the device to expire. The device resets this time and begins counting down again when the device performs an operation. This function can return immediately if no operation happened recently.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxConnectTerms

int32 DAQmxConnectTerms (const char sourceTerminal[], const char destinationTerminal[], int32 signalModifiers);

Purpose

Creates a route between a source and destination terminal. The route can carry a variety of digital signals, such as triggers, clocks, and hardware events.

These source and destination terminals can be on different devices as long as a connecting public bus, such as RTSI or the PXI backplane, is available. DAQmxConnectTerms does not modify a task. When DAQmxConnectTerms runs, the route is immediately reserved and committed to hardware. This type of routing is called immediate routing.

Parameters

Input
Name | Type | Description
sourceTerminal | const char [] | The originating terminal of the route. You can specify a terminal name.
destinationTerminal | const char [] | The receiving terminal of the route. You can specify a terminal name.
signalModifiers int32 Specifies whether or not to invert the signal routed from the sourceTerminal to the destinationTerminal. If the device is not capable of signal inversion or if a previous route reserved the inversion circuitry in an incompatible configuration, attempting to invert the signal causes an error.
Value | Description
DAQmx_Val_DoNotInvertPolarity | Do not invert the signal.
DAQmx_Val_InvertPolarity | Invert the signal.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxDisconnectTerms

int32 DAQmxDisconnectTerms (const char sourceTerminal[], const char destinationTerminal[]);

Purpose

Removes signal routes previously created using DAQmxConnectTerms. DAQmxDisconnectTerms cannot remove task-based routes, such as those created through timing and triggering configuration.

When this function executes, the route is unreserved immediately. For this reason, this type of routing is called immediate routing.

Parameters

Input
Name | Type | Description
sourceTerminal | const char [] | The originating terminal of the route. You can specify a terminal name.
destinationTerminal | const char [] | The receiving terminal of the route. You can specify a terminal name.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxTristateOutputTerm

int32 DAQmxTristateOutputTerm (const char outputTerminal[]);

Purpose

Sets a terminal to high-impedance state. If you connect an external signal to a terminal on the I/O connector, the terminal must be in high-impedance state. Otherwise, the device could double-drive the terminal and damage the hardware. If you use this function on a terminal in an active route, the function fails and returns an error.

DAQmxResetDevice sets all terminals on the I/O connector to high-impedance state but aborts any running tasks associated with the device.

Parameters

Input
Name | Type | Description
outputTerminal | const char [] | The terminal on the I/O connector to set to high-impedance state. You can specify a terminal name.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxResetDevice

int32 DAQmxResetDevice (const char deviceName[]);

Purpose

Immediately aborts all tasks associated with a device and returns the device to an initialized state. Aborting a task stops and releases any resources the task reserved.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxControlWatchdogTask

int32 DAQmxControlWatchdogTask (TaskHandle taskHandle, int32 action);

Purpose

Controls the watchdog task according to the action you specify.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
action int32 Specifies how to control the watchdog task.

Value | Description
DAQmx_Val_ResetTimer | Resets the internal timer to 0. You must continually reset the internal timer to prevent it from timing out and locking out the device.
DAQmx_Val_ClearExpiration | Unlocks a device whose watchdog expired.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCreateWatchdogTimerTask

int32 DAQmxCreateWatchdogTimerTask (const char deviceName[], const char taskName[], TaskHandle *taskHandle, float64 timeout, const char channelName[], int32 expState, ...);

Purpose

Creates and configures a task that controls the watchdog timer of a device. The timer activates when you start the task.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.
taskName | const char [] | The name to assign to the task. If you use this function in a loop and specify a name for the task, you must use DAQmxClearTask within the loop after you are finished with the task. Otherwise, NI-DAQmx attempts to create multiple tasks with the same name, which results in an error.
timeout float64 The time, in seconds, until the watchdog timer expires. A value of DAQmx_Val_WaitInfinitely indicates that the internal timer never expires. Use DAQmx_Val_WaitInfinitely when you use a trigger to signal an expiration of the timer. If this time elapses, the device sets the physical channels to the states you specify in expState.

Use DAQmxControlWatchdogTask with action set to DAQmx_Val_ResetTimer to prevent the watchdog timer from expiring.
channelName | const char [] | The digital line or port to modify. You cannot modify dedicated digital input lines. You can specify a list or range of physical channels
expState int32 The state to which to set the digital physical channel when the watchdog timer expires.

Value | Description
DAQmx_Val_High | High logic.
DAQmx_Val_Low | Low logic.
DAQmx_Val_Tristate | High-impedance state. You can select this state only on devices with bidirectional ports, and you can select it only for entire ports. You cannot select this state for dedicated digital output lines.
DAQmx_Val_NoChange | Expiration does not affect the port. Do not change the state of any lines in the port, and do not lock the port. For example, if a line is high when the timer expires, that line stays high, and you can write new values to the line. You can select this value only for entire ports.
moreChannelsAndStates any type (passed by value) Pairs of additional channels and the states to set the channels to when the device powers up or when the device is reset. You must pass NULL at the end of the argument list.

If you do not want to pass additional channels and states, the function call can be similar to the following example:

DAQmxCreateWatchdogTimerTask ("Dev1", "myTask", *taskHandle, DAQmx_Val_WaitInfinitely, "Dev1/do0", DAQmx_Val_High, NULL);

If you pass additional channels and states, the function call can be similar to the following example:

DAQmxCreateWatchdogTimerTask ("Dev1", "myTask", *taskHandle, DAQmx_Val_WaitInfinitely, "Dev1/do0", DAQmx_Val_High, "Dev1/do1", DAQmx_Val_Tristate, NULL);
Output
taskHandle | TaskHandle * | A reference to the new task.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAOSeriesCalAdjust

DAQmxAOSeriesCalAdjust (uInt32 calHandle, float64 referenceVoltage);

Purpose

Adjusts the external calibration constants on an AO Series device. You must supply a known voltage to the device and specify that voltage with referenceVoltage.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
referenceVoltage | float64 | The known voltage, in volts, to use as a reference for calibration. This voltage should be between +6.000 V and +9.999 V.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxESeriesCalAdjust

int32 DAQmxESeriesCalAdjust (uInt32 calHandle, float64 referenceVoltage);

Purpose

Adjusts the external calibration constants on an E-Series device. You must supply a known voltage to the device and specify that voltage with referenceVoltage.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
referenceVoltage | float64 | The known voltage, in volts, to use as a reference for calibration. This voltage should be between +6.000 V and +9.999 V.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxGetAIChanCalCalDate

int32 DAQmxGetAIChanCalCalDate (TaskHandle taskHandle, const char channelName[], uInt32 *year, uInt32 *month, uInt32 *day, uInt32 *hour, uInt32 *minute);

Purpose

Indicates the last date and time that the channel underwent a channel calibration.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
channelName | const char [] | Name of the local or global channel to query calibration for.
Output
Name | Type | Description
year | uInt32 * | The last year that the channel underwent a channel calibration.
month | uInt32 * | The last month that the channel underwent a channel calibration.
day | uInt32 * | The last day that the channel underwent a channel calibration.
hour | uInt32 * | The last hour, on a 24-hour clock, that the channel underwent a channel calibration.
minute | uInt32 * | The last minute that the channel underwent a channel calibration.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxGetAIChanCalExpDate

int32 DAQmxGetAIChanCalExpDate (TaskHandle taskHandle, const char channelName[], uInt32 *year, uInt32 *month, uInt32 *day, uInt32 *hour, uInt32 *minute);

Purpose

Indicates the last date and time that the channel underwent an external channel calibration.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
channelName | const char [] | Name of the local or global channel to query calibration for.
Output
Name | Type | Description
year | uInt32 * | The last year that the channel underwent an external channel calibration.
month | uInt32 * | The last month that the channel underwent an external channel calibration.
day | uInt32 * | The last day that the channel underwent an external channel calibration.
hour | uInt32 * | The last hour, on a 24-hour clock, that the channel underwent an external channel calibration.
minute | uInt32 * | The last minute that the channel underwent an external channel calibration.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxGetExtCalLastDateAndTime

int32 DAQmxGetExtCalLastDateAndTime (const char deviceName[], uInt32 *year, uInt32 *month, uInt32 *day, uInt32 *hour, uInt32 *minute);

Purpose

Indicates the last date and time that the device underwent an external calibration.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.
Output
Name | Type | Description
year | uInt32 * | The last year that the device underwent an external calibration.
month | uInt32 * | The last month that the device underwent an external calibration.
day | uInt32 * | The last day that the device underwent an external calibration.
hour | uInt32 * | The last hour, on a 24-hour clock, that the device underwent an external calibration.
minute | uInt32 * | The last minute that the device underwent an external calibration.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxGetSelfCalLastDateAndTime

int32 DAQmxGetSelfCalLastDateAndTime (const char deviceName[], uInt32 *year, uInt32 *month, uInt32 *day, uInt32 *hour, uInt32 *minute);

Purpose

Indicates the last date and time that the device underwent a self calibration.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.
Output
Name | Type | Description
year | uInt32 * | The last year that the device underwent a self-calibration.
month | uInt32 * | The last month that the device underwent a self-calibration.
day | uInt32 * | The last day that the device underwent a self-calibration.
hour | uInt32 * | The last hour, on a 24-hour clock, that the device underwent a self-calibration.
minute | uInt32 * | The last minute that the device underwent a self-calibration.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxMSeriesCalAdjust

int32 DAQmxMSeriesCalAdjust (uInt32 calHandle, float64 referenceVoltage);

Purpose

Adjusts the external calibration constants for an M Series device. You must connect a known voltage to the device and specify that voltage with referenceVoltage.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
referenceVoltage | float64 | The known voltage, in volts, to use as a reference for calibration. This voltage should be between +6.000 V and +9.999 V.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxPerformBridgeOffsetNullingCal

int32 DAQmxPerformBridgeOffsetNullingCal (TaskHandle taskHandle, const char channel[])

Purpose

Performs a bridge offset nulling calibration on the channels in the task. If the task measures both bridge-based sensors and non-bridge-based sensors, specify the names of the channels that measure bridge-based sensors in the channel parameter.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
channel | const char [] | A subset of virtual channels in the task that you want to calibrate. Use this parameter if you do not want to calibrate all the channels in the task or if some channels in the task measure non-bridge-based sensors.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxRestoreLastExtCalConst

int32 DAQmxRestoreLastExtCalConst (const char deviceName[]);

Purpose

Sets the self calibration constants of the device to the the current external calibration constants. National Instruments sets the external calibration constants at the factory, and those constants remain in effect until you perform a new external calibration on the device.

This function nullifies any self calibration you perform on the device. If you have never performed a self calibration on the device, this function has no effect.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSCBaseboardCalAdjust

int32 DAQmxSCBaseboardCalAdjust (uInt32 calHandle, float64 referenceVoltage);

Purpose

Adjusts the external calibration constants on for the baseboard of an SC Series device. You must connect a known voltage to the device and specify that voltage with referenceVoltage.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
referenceVoltage | float64 | The known voltage, in volts, to use as a reference for calibration. This voltage should be between +6.000 V and +9.999 V.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSelfCal

int32 DAQmxSelfCal (const char deviceName[]);

Purpose

Measures the onboard reference voltage of the device and adjusts the self-calibration constants to account for any errors caused by short-term fluctuations in the operating environment. When you self calibrate a device, no external signal connections are necessary.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSetAIChanCalCalDate

int32 DAQmxSetAIChanCalCalDate (TaskHandle taskHandle, const char channelName[], uInt32 *year, uInt32 *month, uInt32 *day, uInt32 *hour, uInt32 *minute);

Purpose

Sets the date and time that the channel underwent a channel calibration.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
channelName | const char [] | Name of the local or global channel to calibrate.
year | uInt32 | The last year that the channel underwent a channel calibration.
month | uInt32 | The last month that the channel underwent a channel calibration.
day | uInt32 | The last day that the channel underwent a channel calibration.
hour | uInt32 | The last hour, on a 24-hour clock, that the channel underwent a channel calibration.
minute | uInt32 | The last minute that the channel underwent a channel calibration.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSetAIChanCalExpDate

int32 DAQmxSetAIChanCalExpDate (TaskHandle taskHandle, const char channelName[], uInt32 *year, uInt32 *month, uInt32 *day, uInt32 *hour, uInt32 *minute);

Purpose

Sets the date and time that the channel underwent an external channel calibration.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task used in this function.
channelName | const char [] | Name of the local or global channel to calibrate.
year | uInt32 | The last year that the channel underwent an external channel calibration.
month | uInt32 | The last month that the channel underwent an external channel calibration.
day | uInt32 | The last day that the channel underwent an external channel calibration.
hour | uInt32 | The last hour, on a 24-hour clock, that the channel underwent an external channel calibration.
minute | uInt32 | The last minute that the channel underwent an external channel calibration.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSSeriesCalAdjust

int32 DAQmxSSeriesCalAdjust (uInt32 calHandle, float64 referenceVoltage);

Purpose

Adjusts the external calibration constants for an S Series device. You must connect a known voltage to the device and specify that voltage with referenceVoltage.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
referenceVoltage | float64 | The known voltage, in volts, to use as a reference for calibration. This voltage should be between +6.000 V and +9.999 V.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxChangeExtCalPassword

int32 DAQmxChangeExtCalPassword (const char deviceName[], const char password[], const char newPassword[]);

Purpose

Changes the external calibration password of the device.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.
password | const char [] | The current calibration password for the device. This password is case sensitive. The default password for all NI products is NI.
newPassword | const char [] | The new password for the device. This password can be no longer than four characters.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxCloseExtCal

int32 DAQmxCloseExtCal (uInt32 calHandle, int32 action);

Purpose

Closes an open external calibration session.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
action int32 Specifies how to close the calibration session.
Value | Description
DAQmx_Val_Action_Commit | Saves the calibration changes made in the session
DAQmx_Val_Action_Cancel | Closes the session without saving any calibration changes

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxInitExtCal

int32 DAQmxInitExtCal (const char deviceName[], const char password[], uInt32 *calHandle);

Purpose

Starts an external calibration session on a device.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.
password | const char [] | The current calibration password for the device. This password is case sensitive. The default password for all NI products is NI.
Output
Name | Type | Description
calHandle | uInt32 * | A reference to the calibration session.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjustDSAAICal

int32 DAQmxAdjustDSAAICal (uInt32 calHandle, float64 referenceVoltage);

Purpose

Adjusts the external calibration constants for the analog input section of a DSA device. You must connect a known voltage to the device and specify that voltage with the referenceVoltage parameter.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
referenceVoltage | float64 | The known voltage, in volts, to use as a reference for calibration. This voltage should be between +4.9 V and +9.1 V.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjustDSAAOCal

int32 DAQmxAdjustDSAAOCal (uInt32 calHandle, uInt32 channel, float64 requestedLowVoltage, float64 actualLowVoltage, float64 requestedHighVoltage, float64 actualHighVoltage, float64 gainSetting);

Purpose

Adjusts the external calibration constants for the analog output section of a DSA device. You must use the device to generate a high voltage and low voltage at a specified gain, measure the high and low voltages, then specify the requested high voltage, low voltage, and gain along with the actual high voltage and low voltage.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
channel | uInt32 | The number of the channel to calibrate. This number is the numeric portion of the physical channel name, not the full physical channel name.
requestedLowVoltage | float64 | The low voltage you attempted to generate at the gain setting you specified.
actualLowVoltage | float64 | The actual low voltage as measured by an external sensor.
requestedHighVoltage | float64 | The high voltage you attempted to generate at the gain setting you specified.
actualHighVoltage | float64 | The actual high voltage as measured by an external sensor.
gainSetting | float64 | The gain setting you used when you attempted to generate the requested high voltage and requested low voltage.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjustDSATimebaseCal

int32 DAQmxAdjustDSATimebaseCal (uInt32 calHandle, float64 referenceFrequency);

Purpose

Adjusts the external calibration constant for the timebase of a DSA device with an adjustable oscillator. You must connect a sinusoidal signal with a known frequency to the device and specify that frequency with referenceFrequency.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
referenceFrequency | float64 | The frequency, in hertz, of the signal to use as a reference for calibration.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjust4204Cal

int32 DAQmxAdjust4204Cal (uInt32 calHandle, const char channelNames[], float64 lowPassFreq, bool32 trackHoldEnabled, float64 inputVal);

Purpose

Adjusts the internal and external calibration constants for the SCMP pod on the PXI-4204 device. You must supply a known voltage to the device and specify that voltage with inputVal.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
channelNames | const char [] | The physical channel(s) to calibrate.
lowPassFreq | float64 | The low pass cutoff frequency, in hertz, (6 or 10000) on the SCMP pod to calibrate.
trackHoldEnabled | bool32 | Specifies whether calibrating for trackHold is enabled or disabled.
inputVal | float64 | The known voltage, in volts, to use as a reference for calibration.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjust4220Cal

int32 DAQmxAdjust4220Cal (uInt32 calHandle, const char channelNames[], float64 gain, float64 inputVal);

Purpose

Adjusts the internal and external calibration constants for the SCMP pod on the PXI-4220 device. You must supply a known voltage to the device and specify that voltage with inputVal.

This device needs reference signals of 0.0 volts at gains of 1, 15, 20, and 310 on a particular channel in order to perform an offset calibration for that channel. If those points are not manually supplied, they will be automatically measured internally with sample and hold enabled.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
channelNames | const char [] | The physical channel(s) to calibrate.
gain | float64 | The gain value on the SCMP pod to calibrate.
inputVal | float64 | The known voltage, in volts, to use as a reference for calibration.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjust4224Cal

int32 DAQmxAdjust4224Cal (uInt32 calHandle, const char channelNames[], float64 gain, float64 inputVal);

Purpose

Adjusts the internal and external calibration constants for the SCMP pod on the PXI-4224 device. You must supply a known voltage to the device and specify that voltage with inputVal.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
channelNames | const char [] | The physical channel(s) to calibrate.
gain | float64 | The gain value on the SCMP pod to calibrate.
inputVal | float64 | The known voltage, in volts, to use as a reference for calibration.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjust1102Cal

int32 DAQmxAdjust1102Cal (uInt32 calHandle, float64 refVoltage, float64 measOutput);

Purpose

Adjusts the external calibration constants for the SCXI-1102 module. You must supply a known voltage to the device and specify that voltage with refVoltage.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
refVoltage | float64 | The known voltage, in volts, to use as a reference for calibration.
measOutput | float64 | The voltage measured at the output of the module.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjust1104Cal

int32 DAQmxAdjust1104Cal (uInt32 calHandle, float64 refVoltage, float64 measOutput);

Purpose

Adjusts the calibration constants for the SCXI-1104 module. You must measure the voltage generated by a previous call to the DAQmxSetup1104Cal function and specify the measurement with measured output.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
refVoltage | float64 | The known voltage, in volts, to use as a reference for calibration.
measOutput | float64 | The voltage measured at the output of the module.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjust1112Cal

int32 DAQmxAdjust1112Cal (uInt32 calHandle, float64 refVoltage, float64 measOutput);

Purpose

Adjusts the calibration constants for the SCXI-1112 module. You must measure the voltage generated by a previous call to the DAQmxSetup1112Cal function and specify the measurement with measOutput.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
refVoltage | float64 | The known voltage, in volts, to use as a reference for calibration.
measOutput | float64 | The voltage measured at the output of the module.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjust1124Cal

int32 DAQmxAdjust1124Cal (uInt32 calHandle, float64 measOutput);

Purpose

Adjusts the calibration constants for the SCXI-1124 module. You must measure the voltage or current generated by a previous call to the DAQmxSetup1124Cal function and specify the measurement with measOutput.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
measOutput | float64 | The voltage or current measured at the output channel specified in a previous call to the DAQmxSetup1124Cal function.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjust1125Cal

int32 DAQmxAdjust1125Cal (uInt32 calHandle, float64 refVoltage, float64 measOutput);

Purpose

Adjusts the external calibration constants for the SCXI-1125 module. You must supply a known voltage to the device and specify that voltage with refVoltage.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
refVoltage | float64 | The known voltage, in volts, to use as a reference for calibration.
measOutput | float64 | The voltage measured at the output of the module.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjust1502Cal

int32 DAQmxAdjust1502Cal (uInt32 calHandle, float64 refVoltage, float64 measOutput);

Purpose

Adjusts the calibration constants for the SCXI-1502 module. You must supply a known voltage to the device and specify that voltage with refVoltage.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
refVoltage | float64 | The known voltage, in volts, to use as a reference for calibration.
measOutput | float64 | The voltage measured at the output of the module.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjust1503Cal

int32 DAQmxAdjust1503Cal (uInt32 calHandle, float64 refVoltage, float64 measOutput);

Purpose

Adjusts the calibration constants for the SCXI-1503 module. You must supply a known voltage to the device and specify that voltage with refVoltage.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
refVoltage | float64 | The known voltage, in volts, to use as a reference for calibration.
measOutput | float64 | The voltage measured at the output of the module.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjust1503CurrentCal

int32 DAQmxAdjust1503CurrentCal (uInt32 calHandle, const char channelName[], float64 measOutput);

Purpose

Adjusts the current calibration constants for the SCXI-1503 module.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
channelName | const char [] | The physical channel to calibrate.
measOutput | float64 | The current measured at the output of the module.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxAdjust1520Cal

int32 DAQmxAdjust1520Cal (uInt32 calHandle, float64 refVoltage, float64 measOutput);

Purpose

Adjusts the external calibration constants for the SCXI-1520 module. You must supply a known voltage to the device and specify that voltage with refVoltage.

This device needs reference signals of 0.0 volts at gains of 1, 15, 20, and 310 on a particular channel in order to perform an offset calibration for that channel.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
refVoltage | float64 | The known voltage, in volts, to use as a reference for calibration.
measOutput | float64 | The voltage measured at the output of the module.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSetup1102Cal

int32 DAQmxSetup1102Cal (uInt32 calHandle, const char channelNames[], float64 gain);

Purpose

Sets the SCXI-1102 module to the specified gain value. Calibration input/output points can be measured by supplying reference signals to the specified channel and measuring the outputs. Each of these points should be specified using the DAQmxAdjust1102Cal function.

Note The terminal where module output is measured will depend on the configuration of the module in MAX. National Instruments recommends cabling the module to the digitizer so that the output appears on the MCH0+/- pins of the rear signal connector. Please refer to the module user manual for more information on the routing of module output.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
channelNames | const char [] | The physical channel(s) to calibrate.
gain | float64 | The gain value to calibrate.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSetup1104Cal

int32 DAQmxSetup1104Cal (uInt32 calHandle, const char channel[]);

Purpose

Specifies the channel on the SCXI-1104 module for calibration. Measure calibration input/output points by supplying reference signals to the specified channel and measuring the outputs. Specify each of these points using the DAQmxAdjust1104Cal function.

Note The terminal where module output is measured depends on the configuration of the module in MAX. National Instruments recommends cabling the module to the digitizer so that the output appears on the MCH0+/- pins of the rear signal connector. Refer to the module user manual for more information on the routing of module output.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
channel | const char [] | The physical channel to calibrate.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSetup1112Cal

int32 DAQmxSetup1112Cal (uInt32 calHandle, const char channel[]);

Purpose

Specifies the channel on the SCXI-1112 module for calibration. Measure calibration input/output points by supplying reference signals to the specified channel and measuring the outputs. Specify each of these points using the DAQmxAdjust1112Cal function.

Note The terminal where module output is measured depends on the configuration of the module in MAX. National Instruments recommends cabling the module to the digitizer so that the output appears on the MCH0+/- pins of the rear signal connector. Refer to the module user manual for more information on the routing of module output.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
channel | const char [] | The physical channel to calibrate.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSetup1124Cal

int32 DAQmxSetup1124Cal (uInt32 calHandle, const char channelName[], int32 range, uInt32 dacValue);

Purpose

Writes the specified binary value to the D/A circuitry on the specified channel at the specified range. Measure and specify the voltage or current generated in a subsequent call to the DAQmxAdjust1124Cal function.

Note Specify at least two calibration points for each channel/range being calibrated. The recommended binary data to use for voltage ranges are 0 and 4095. The recommended binary data to use for the current range is 255 and 4095.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
channelName | const char [] | The physical channel to calibrate.
range | int32 | The range to calibrate.
dacValue | uInt32 | The binary number to write to the DAC circuitry.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSetup1125Cal

int32 DAQmxSetup1125Cal (uInt32 calHandle, const char channelNames[], float64 gain);

Purpose

Sets the SCXI-1125 module to the specified gain value. Calibration input/output points can be measured by supplying reference signals to the specified channel and measuring the outputs. Each of these points should be specified using the DAQmxAdjust1125Cal function.

Note The terminal where module output is measured will depend on the configuration of the module in MAX. National Instruments recommends cabling the module to the digitizer so that the output appears on the MCH0+/- pins of the rear signal connector. Please refer to the module user manual for more information on the routing of module output.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
channelNames | const char [] | The physical channel(s) to calibrate.
gain | float64 | The gain value to calibrate.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSetup1502Cal

int32 DAQmxSetup1502Cal (uInt32 calHandle, const char channelName[], float64 gain);

Purpose

Sets the SCXI-1502 module to the specified gain value. Calibration I/O points can be measured by supplying reference signals to the specified channel and measuring the outputs. Specify each of these points using the DAQmxAdjust1502Cal function.

Note The terminal where the module output is measured depends on the configuration of the module in MAX. National Instruments recommends cabling the module to the digitizer so that the output appears on the MCH0± pins of the rear signal connector. Refer to the module user manual for more information on the routing of module output.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
channelName | const char [] | The physical channel to calibrate.
gain | float64 | The gain value to calibrate.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSetup1503Cal

int32 DAQmxSetup1503Cal (uInt32 calHandle, const char channelName[], float64 gain);

Purpose

Sets the SCXI-1503 module to the specified gain value. Calibration I/O points can be measured by supplying reference signals to the specified channel and measuring the outputs. Specify each of these points using the DAQmxAdjust1503Cal function.

Note The terminal where the module output is measured depends on the configuration of the module in MAX. National Instruments recommends cabling the module to the digitizer so that the output appears on the MCH0± pins of the rear signal connector. Refer to the module user manual for more information on the routing of module output.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
channelName | const char [] | The physical channel to calibrate.
gain | float64 | The gain value to calibrate.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSetup1520Cal

int32 DAQmxSetup1520Cal (uInt32 calHandle, const char channelNames[], float64 gain);

Purpose

Sets the SCXI-1520 module to the specified gain value. Calibration input/output points can be measured by supplying reference signals to the specified channel and measuring the outputs. Each of these points should be specified using the DAQmxAdjust1520Cal function. This function will also disable sample and hold on the module so that the output can be measured by external devices that cannot supply the appropriate sample and hold timing signals.

Note The terminal where module output is measured will depend on the configuration of the module in MAX. National Instruments recommends cabling the module to the digitizer so that the output appears on the MCH0+/- pins of the rear signal connector. Please refer to the module user manual for more information on the routing of module output.

Parameters

Input
Name | Type | Description
calHandle | uInt32 | A reference to the calibration session that you created using the DAQmxInitExtCal function.
channelNames | const char [] | The physical channel(s) to calibrate.
gain | float64 | The gain value to calibrate.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxDeleteSavedGlobalChan

int32 DAQmxDeleteSavedGlobalChan (const char channelName[]);

Purpose

Deletes the specified global virtual channel from MAX. This function does not remove the global virtual channel from tasks that use it.

Parameters

Input
Name | Type | Description
channelName | const char [] | Name of the global virtual channel to delete.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxDeleteSavedScale

int32 DAQmxDeleteSavedScale (const char scaleName[]);

Purpose

Deletes the specified custom scale from MAX. This function does not remove the custom scale from virtual channels that use it.

Parameters

Input
Name | Type | Description
scaleName | const char [] | Name of the custom scale to delete.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxDeleteSavedTask

int32 DAQmxDeleteSavedTask (const char taskName[]);

Purpose

Deletes the specified task from MAX. This function does not clear the copy of the task stored in memory. Use DAQmxClearTask to clear the copy of the task.

Parameters

Input
Name | Type | Description
taskName | const char [] | Name of the task to delete.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSaveGlobalChan

int32 DAQmxSaveGlobalChan (TaskHandle taskHandle, const char channelName[], const char saveAs[], const char author[], uInt32 options);

Purpose

Saves the specified local or global virtual channel to MAX as a global virtual channel. You must specify both the local or global virtual channel to save and a task that contains that channel.

Programmatically saved global virtual channels cannot be viewed in the DAQ Assistant for versions of NI-DAQ earlier than 7.4. To view a programmatically saved global virtual channel in an earlier version of NI-DAQ, first use the DAQ Assistant in NI-DAQ 7.4 or later to save the global virtual channel.

Visit the DAQmx Professional Developer Tools website for more information and examples of programmatically saving global virtual channels.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task that contains the local or global virtual channel you want to save.
channelName | const char [] | Name of the local or global virtual channel to save.
saveAs | const char [] | Name to save the global virtual channel as. If you pass an empty string ("") or NULL, the name currently assigned to the global virtual channel will be used.
author | const char [] | Name to store with the global virtual channel.
options uInt32 Use this parameter to set certain options. You can combine options with the bitwise-OR operator ('|') to set multiple options. Pass a value of zero if no options need to be set.
Value | Description
DAQmx_Val_Save_Overwrite | Overwrite a global virtual channel of the same name if one is already saved in MAX. If you do not set this flag and a global virtual channel of the same name is already saved in MAX, the function returns an error.
DAQmx_Val_Save_AllowInteractiveEditing | Allow the global virtual channel to be edited in the DAQ Assistant. If you set this flag, the DAQ Assistant must support all global virtual channel settings.
DAQmx_Val_Save_AllowInteractiveDeletion | Allow the global virtual channel to be deleted through MAX.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSaveScale

int32 DAQmxSaveScale (const char scaleName[], const char saveAs[], const char author[], uInt32 options);

Purpose

Saves the specified custom scale to MAX.

Visit the DAQmx Professional Developer Tools website for more information and examples of programmatically saving global channels.

Parameters

Input
Name | Type | Description
scaleName | const char [] | Name of the custom scale to save.
saveAs | const char [] | Name to save the custom scale as. If you pass an empty string ("") or NULL, the name currently assigned to the scale is used.
author | const char [] | Name to store with the custom scale.
options uInt32 Use this parameter to set certain options. You can combine options with the bitwise-OR operator ('|') to set multiple options. Pass a value of zero if no options need to be set.
Value | Description
DAQmx_Val_Save_Overwrite | Overwrite a custom scale of the same name if one is already saved in MAX. If you do not set this flag and a custom scale of the same name is already saved in MAX, the function returns an error.
DAQmx_Val_Save_AllowInteractiveEditing | Allow the custom scale to be edited in the DAQ Assistant.
DAQmx_Val_Save_AllowInteractiveDeletion | Allow the custom scale to be deleted through MAX.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSaveTask

int32 DAQmxSaveTask (TaskHandle taskHandle, const char saveAs[], const char author[], uInt32 options);

Purpose

Saves the specified task and any local channels it contains to MAX. This function does not save global channels. Use DAQmxSaveGlobalChan to save global channels.

Programmatically saved tasks cannot be viewed in the DAQ Assistant for versions of NI-DAQ earlier than 7.4. To view a programmatically saved task in an earlier version of NI-DAQ, first use the DAQ Assistant in NI-DAQ 7.4 or later to save the task.

Visit the DAQmx Professional Developer Tools website for more information and examples of programmatically saving global channels.

Parameters

Input
Name | Type | Description
taskHandle | TaskHandle | The task to save.
saveAs | const char [] | Name to save the task as. If you pass an empty string ("") or NULL, the name currently assigned to the task will be used.
author | const char [] | Name to store with the task.
options uInt32 Use this parameter to set certain options. You can combine options with the bitwise-OR operator ('|') to set multiple options. Pass a value of zero if no options need to be set.
Value | Description
DAQmx_Val_Save_Overwrite | Overwrite a task of the same name if one is already saved in MAX. If you do not set this flag and a task of the same name is already saved in MAX, the function returns an error.
DAQmx_Val_Save_AllowInteractiveEditing | Allow the task to be edited in the DAQ Assistant. If you set this flag, the DAQ Assistant must support all task settings.
DAQmx_Val_Save_AllowInteractiveDeletion | Allow the task to be deleted through MAX.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxClearTEDS

int32 DAQmxClearTEDS (const char physicalChannel[]);

Purpose

Removes TEDS information from the physical channel you specify. This function temporarily overrides any TEDS configuration for the physical channel that you performed in MAX.

Parameters

Input
Name | Type | Description
physicalChannel | const char[] | The name of the physical channel you want to clear.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxConfigureTEDS

int32 DAQmxConfigureTEDS (const char physicalChannel[], const char filePath[]);

Purpose

Associates TEDS information with the physical channel you specify. If you do not specify the filename of a data sheet in the filePath parameter, this function attempts to find a TEDS sensor connected to the physical channel. This function temporarily overrides any TEDS configuration for the physical channel that you performed in MAX.

Parameters

Input
Name | Type | Description
physicalChannel | const char [] | The name of the physical channel you want to configure.
filePath | const char [] | The path to a Virtual TEDS data sheet that you want to associate with the physical channel. If you do not specify the filename of a data sheet, this function attempts to find a TEDS sensor connected to the physical channel.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteToTEDSFromArray

int32 DAQmxWriteToTEDSFromArray (const char physicalChannel[], uInt8 bitstream[], uInt32 arraySize, int32 basicTEDSOptions);

Purpose

Writes TEDS data, stored as a 1D array of 8-bit unsigned integers, to the sensor connected to the physical channel you specify.

Parameters

Input
Name | Type | Description
physicalChannel | const char [] | The name of the physical channel you want to configure.
bitstream | uInt8 | Represents the TEDS bitstream to write to the sensor. This bitstream must be constructed according to the IEEE 1451.4 specification.
arraySize | uInt32 | Number of bytes in the bitstream.
basicTEDSOptions int32 Specifies how to handle basic TEDS data in the bitstream.
Value | Description
Do Not Write | Ignore basic TEDS data.
Write to EEPROM | Write basic TEDS data to the EEPROM, even if the sensor includes a PROM. You cannot write basic TEDS data if the PROM contains data.
Write to PROM | Write basic TEDS data to the PROM. Any subsequent attempts to write basic TEDS data result in an error.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxWriteToTEDSFromFile

int32 DAQmxWriteToTEDSFromFile (const char physicalChannel[], const char filePath[], int32 basicTEDSOptions);

Purpose

Writes TEDS data from a virtual TEDS file to the sensor connected to the physical channel you specify.

Parameters

Input
Name | Type | Description
physicalChannel | const char [] | The name of the physical channel you want to configure.
filePath | const char [] | Specifies the filename of a virtual TEDS file that contains the bitstream to write.
basicTEDSOptions int32 Specifies how to handle basic TEDS data in the bitstream.
Value | Description
Do Not Write | Ignore basic TEDS data.
Write to EEPROM | Write basic TEDS data to the EEPROM, even if the sensor includes a PROM. You cannot write basic TEDS data if the PROM contains data.
Write to PROM | Write basic TEDS data to the PROM. Any subsequent attempts to write basic TEDS data result in an error.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSetAnalogPowerUpStates

int32 DAQmxSetAnalogPowerUpStates (const char deviceName[], const char channelNames[], float64 state, int32 channelType, ...);

Purpose

Updates the states that analog physical channels on a device are set to when the device powers up or when the device is reset. Power-up states are stored in EEPROMs that you can write to only a limited number of times. Therefore, you should use this function as infrequently as possible. This function writes to the EEPROM only if a setting you request is different from the one currently stored on the EEPROM. This function writes power-up states in sequential order. Therefore, if a physical channel has multiple entries, the last entry is used.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.
channelNames | const char [] | The physical channel to modify. You can specify a list or range of channels.
state float64 The power-up state to set for the channel(s) in channelNames.
channelType int32 The channel type for the channel(s) in channelNames.

Value | Description
DAQmx_Val_ChannelVoltage | Voltage output. You can set voltage power-up states only for physical channels that support voltage output.
DAQmx_Val_ChannelCurrent | Current output. You can set current power-up states only for physical channels that support current output.
moreChannelsStatesAndTypes any type (passed by value) Combinations of additional channels and states and types to set the channels to when the device powers up or when the device is reset. You must pass NULL at the end of the argument list.

If you do not want to pass additional channels and states, the function call can be similar to the following example:

DAQmxSetAnalogPowerUpStates ("Dev1", "Dev1/ao0", 0.0, DAQmx_Val_ChannelVoltage, NULL);

If you pass additional channels and states, the function call can be similar to the following example:

DAQmxSetAnalogPowerUpStates ("Dev1", "Dev1/ao0", 0.0, DAQmx_Val_ChannelVoltage, "Dev1/ao1", 1.0, DAQmx_Val_ChannelCurrent, NULL);

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSetDigitalLogicFamilyPowerUpState

int32 DAQmxSetDigitalLogicFamilyPowerUpState (const char deviceName[], int32 logicFamily);

Purpose

Sets the digital logic family to use when the device powers up.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.
logicFamily int32 Specifies the logic family to set the device to when it powers up. A logic family corresponds to voltage thresholds that are compatible with a group of voltage standards. Refer to device documentation for information on the logic high and logic low voltages for these logic families.
Value | Description
DAQmx_Val_2point5V | 2.5 V (compatible with CMOS signals)
DAQmx_Val_3point3V | 3.3 V (compatible with LVTTL and LVCMOS signals)
DAQmx_Val_5V | 5 V (compatible with TTL and CMOS signals)

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxSetDigitalPowerUpStates

int32 DAQmxSetDigitalPowerUpStates (const char deviceName[], const char channelNames[], int32 state, ...);

Purpose

Updates the state that digital physical channels on static DIO devices are set to when the device powers up or when the device is reset. Power-up states are stored in EEPROMs that you can write to only a limited number of times. Therefore, you should use this function as infrequently as possible. This function writes to the EEPROM only if a setting you request is different from the one currently stored on the EEPROM. This function writes power-up states in sequential order. Therefore, if a physical channel has multiple entries, the last entry is used.

Parameters

Input
Name | Type | Description
deviceName | const char [] | The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.
channelNames | const char [] | The digital line or port to modify. You cannot set power-up states for dedicated digital input lines. You can specify a list or range of channels.
state int32 The power-up state to set for the channel(s) in channelNames.

Value | Description
DAQmx_Val_High | High logic
DAQmx_Val_Low | Low logic
DAQmx_Val_Tristate | High-impedance state. You can set this power-up state only on devices with bidirectional ports, and you can set it only on entire ports. You cannot set this power-up state on dedicated digital output lines.
moreChannelsAndStates any type (passed by value) Pairs of additional channels and the states to set the channels to when the device powers up or when the device is reset. You must pass NULL at the end of the argument list.

If you do not want to pass additional channels and states, the function call can be similar to the following example:

DAQmxSetDigitalPowerUpStates ("Dev1", "Dev1/do0", DAQmx_Val_High, NULL);

If you pass additional channels and states, the function call can be similar to the following example:

DAQmxSetDigitalPowerUpStates ("Dev1", "Dev1/do0", DAQmx_Val_High, "Dev1/do1", DAQmx_Val_Tristate, NULL);

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.


DAQmxGetErrorString

int32 DAQmxGetErrorString (int32 errorCode, char errorString[], uInt32 bufferSize);

Purpose

Converts the error number returned by an NI-DAQmx function into a meaningful error message.

If you pass in a valid value for errorString and its bufferSize, this function returns as much of the available data as possible.

If you pass NULL for errorString or 0 for bufferSize, this function returns the number of bytes you need to allocate.

Parameters

Input
Name | Type | Description
errorCode | int32 | An error code or warning returned by one of the NI-DAQmx Library functions.
bufferSize | uInt32 | The size, in bytes, of the buffer passed in the errorString. If you pass 0, this function returns the number of bytes you need to allocate.
Output
errorString | char [] | The meaningful error message for the error number. If you pass NULL, this function returns the number of bytes you need to allocate.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A negative value indicates an error. If you pass in a valid value for errorString and its bufferSize, this function returns as much of the available data as possible. If you pass NULL for errorString or 0 for bufferSize, this function returns the number of bytes you need to allocate.


DAQmxGetExtendedErrorInfo

int32 DAQmxGetExtendedErrorInfo (char errorString[], uInt32 bufferSize);

Purpose

Returns dynamic, specific error information. This function is valid only for the last function that failed; additional NI-DAQmx calls may invalidate this information.

If you pass valid values for errorString and bufferSize, this function returns as much of the available data as possible.

If you pass NULL for errorString or 0 for bufferSize, this function returns the number of bytes you need to allocate.

Parameters

Input
Name | Type | Description
bufferSize | uInt32 | The size, in bytes, of errorString. If you pass 0, this function returns the number of bytes you need to allocate.
Output
Name | Type | Description
errorString | char [] | Dynamic error information. If you pass NULL, this function returns the number of bytes you need to allocate.

Return Value

Name | Type | Description
status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A negative value indicates an error. If you pass in a valid value for errorString and its bufferSize, this function returns as much of the available data as possible. If you pass NULL for errorString or 0 for bufferSize, this function returns the number of bytes you need to allocate.