To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example allows you to read a period measurement from your counter pin at the same rate as your analog input.
Description:
As described, the VI would read a period measurement and match the rate of the usage of the analog input. It will hold the previous period value (stale data) until the next period is completed. This will get around the error, "The requested Samples have not yet been acquired", when trying to run a buffered period measurement faster than the frequency of the signal of interest.
Basically, this VI allows you to perform a buffered period measurement at whatever rate you would like, and the value returned will be old data until the new period has completed.
This allows you to log data for period 1 to 1 with the analog input data.
Things to keep in mind:
Steps to Implement or Execute Code
To implement this example:
To execute this example:
Requirements
Software
LabVIEW 2012 or compatible
NI-DAQmx 9.0 or compatible
Hardware
cDAQ with C series Counter Input and Analog Input Module
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.