Example Code

Synchronous Analog and Encoder Inputs

Code and Documents

Attachment

Overview


This VI shows how to fully synchronize an analog input acquisition with two angular encoder measurements.

This VI was written to synchronize the acquisition of one analog input as well as two angular encoders using a PCI-6221.  This example should also work with any other M-Series Multifunction DAQ board. A Producer/Consumer architecture has been implemented to allow for efficient data logging to file. The implementation of the program shares a common clock between all the tasks and uses arm start triggers to start the encoder acquisitions. This ensures the acquired samples are synchronized. 

The front panel is designed to allow you easy access to all the configuration settings of the acquisition.

   

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors