11-17-2011 06:39 PM
I have a USB-6351 and what I would like to do is monitor an analog input channel and set my AO0 output based on what level the analog input is. For example, if the input is above 0.5V I would like to output 1V at AO0; if the input is less than 0.5V then I would like the output to be 0v. The input signal is sampled around 100kHz and is varying and I would like to monitor it continuously and adjust AO0 based on what level it is. Any ideas would be much appreciated.
-bini
11-18-2011 11:52 AM
Take a look at the LabVIEW shipping example Multi-Function-Synch-AI-AO.vi. It's in the NI Example Finder in the Hardware Input and Output>>DAQmx>>Synchronization>>Multi-Function directory. It's a bit different than what you're specifically looking to do, but does provide a good architecture for running AI and AO tasks in the same VI. You'll probably need to switch up how the DAQmx Write is configured and placed on the block diagram in addition to adding some logic for when you want your AO to output.
Tim W.
Applications Engineering
National Instruments
11-22-2011 05:26 PM
Thanks Tim.
Is there a way to trigger an event when the analog trigger has been triggered?
-proper
11-22-2011 05:32 PM
Try making it retriggerable. Here's some resources that might help:
Retriggerable Analog Acquisition in NI-DAQmx
Community Example: Retriggerable Analog Output with Analog Trigger LV 2010
Tim W.
Applications Engineering
National Instruments