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.
|
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. |