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.
In questo sito non sono utilizzati cookie per la profilazione degli utenti. Utilizza cookie di sessione, necessari per il corretto funzionamento dello stesso e per gestire l'autenticazione ai servizi on-line, alla intranet e alle aree riservate... leggi tutto