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

DAQmxBaseReadCounterF64

int32 DAQmxBaseReadCounterF64 (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 data. If readArray does not contain enough space, this function returns as much data as fits in readArray.

NI-DAQmx Base 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, and then reads those samples.
timeout float64 The amount of time, in seconds, to wait for the function to read the sample(s). This function returns an error if the timeout elapses.

arraySizeInSamps uInt32 The size of the array, in samples, into which data is read.
reserved bool32 * Reserved for future use. Pass NULL to this parameter.
Output
Name Type Description
readArray float64 [ ] The array to read data 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.
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)