DAQmxBaseCreateCIPulseWidthChan
int32 DAQmxBaseCreateCIPulseWidthChan (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 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.
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 such as Dev1/ctr0. |
nameToAssignToChannel
|
const char [ ]
|
Pass NULL for this parameter. NI-DAQmx Base
currently ignores this parameter. |
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 |
|
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 [ ]
|
Pass NULL for 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. |
|