To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example VI continuously acquires an analog voltage and generates a single counter pulse output when an analog comparison event occurs.
Description
In this example the same analog input line is used for the physical channel of the AI Voltage Task and the trigger source of the Analog Edge Start Trigger. Due to the location of the Analog Trigger Detection on M-series DAQ cards this method does not work when there are multiple analog input channels. To bypass this, use an APFI line for the analog trigger source which duplicates the analog input signal.
Also, the counter pulse is retriggerable so that it will occur on the edge of every analog comparison event. However, to begin the analog acquisition at the start it is necessary to first trigger the analog comparison event.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**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.
Unfortunately, it triggers on rising and falling edges of analog comparison event (even if you specify the polarity on DAQmx Start Trigger Digital)... How would you do to bypass this and be able to choose either rising or falling edges?
Thanks
Chris