Home
NI DAQmx Base C API reference Prev Page Prev Page
NI-DAQmx Base 3.x C Function Reference Help
Conventions
Related Documentation
Key Concepts
Clocks
Terminal Names
Task Configuration/Control
DAQmxBaseClearTask
DAQmxBaseCreateTask
DAQmxBaseIsTaskDone
DAQmxBaseLoadTask
DAQmxBaseResetDevice
DAQmxBaseStartTask
DAQmxBaseStopTask
Channel Configuration/Creation
Create Analog Input Channels
DAQmxBaseCreateAIThrmcplChan
DAQmxBaseCreateAIVoltageChan
Create Analog Output Channel
DAQmxBaseCreateAOVoltageChan
Create Digital Input Channels
DAQmxBaseCreateDIChan
Create Digital Output Channels
DAQmxBaseCreateDOChan
Create Counter Input Channels
DAQmxBaseCreateCIPeriodChan
DAQmxBaseCreateCICountEdgesChan
DAQmxBaseCreateCIPulseWidthChan
Position
DAQmxBaseCreateCILinEncoderChan
DAQmxBaseCreateCIAngEncoderChan
Create Counter Output Channels
DAQmxBaseCreateCOPulseChanFreq
Timing
DAQmxBaseCfgSampClkTiming
DAQmxBaseCfgImplicitTiming
Triggering
Start Trigger
DAQmxBaseDisableStartTrig
DAQmxBaseCfgDigEdgeStartTrig
DAQmxBaseCfgAnlgEdgeStartTrig
Reference Trigger
DAQmxBaseCfgAnlgEdgeRefTrig
DAQmxBaseCfgDigEdgeRefTrig
DAQmxBaseDisableRefTrig
Read Functions
DAQmxBaseReadAnalogF64
DAQmxBaseReadBinaryI16
DAQmxBaseReadCounterF64
DAQmxBaseReadCounterScalarF64
DAQmxBaseReadCounterScalarU32
DAQmxBaseReadCounterU32
DAQmxBaseReadDigitalScalarU32
DAQmxBaseReadDigitalU32
DAQmxBaseReadDigitalU8
Write Functions
DAQmxBaseWriteAnalogF64
DAQmxBaseWriteDigitalU8
DAQmxBaseWriteDigitalU32
DAQmxBaseWriteDigitalScalarU32
Export HW Signals
DAQmxBaseExportSignal
Internal Buffer Configuration
DAQmxBaseCfgInputBuffer
Error Handling
DAQmxBaseGetExtendedErrorInfo
Glossary
Important Information
Warranty
Copyright
Trademarks
Patents
WARNING REGARDING USE OF NATIONAL INSTRUMENTS PRODUCTS
Environmental Management
Technical Support and Professional Services

DAQmxBaseCreateCIPeriodChan

int32 DAQmxBaseCreateCIPeriodChan (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.

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
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 Always pass DAQmx_Val_LowFreq1Ctr.
Value Description
DAQmx_Val_LowFreq1Ctr Use one counter that uses a constant timebase to measure the input signal.
measTime float64 Always pass 0 for this parameter.

Warning  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 Always pass 1 for this parameter.
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.
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)