08-01-2012 05:23 PM
Can you use a case structure to control what kind of signal is outputted by the DAQ? I am trying to output either a sine wave, constant 5V, or no signal based on a three option string control, but I can't arrange the simulate signal and daq assistant in any way that allows me to only generate the selected signal. Please advise. Thank you!
08-01-2012 11:39 PM
Show us what you've tried.
Assuming different functions are used to generate each type of signal, you just need to put each of those in there own case of the case structure.
08-02-2012 09:45 AM
Attached is the method that I thought should work with a case structure, and what I have settled with using for now. Thank you!
08-02-2012 10:22 AM
I would put the DAQ assistant outside the case structure.
Inside the case structure, you have one case simulate a sine wave, another case simulate another wave. For no signal, just have a signal that outpus zero volts.
The reason you don't get anything on Analog input is that that loop doesn't run until the first loop ends. You've created a data dependency between the two while loops by having the boolean wire go from the first analog output loop to the second analog input loop.
That is a basic principle of Dataflow programming. I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
To have the two loops run simultaneously, you need to eliminate that wire between them.
08-02-2012 10:27 AM
Thanks for the response. I figured out several of the things you pointed out between my last post and now, but thank you for including an explanation - I made the changes but wasn't positive why they worked. I just went through the 6 hour tutorial yesterday actually, so hopefully just more practice will make things easier. Thanks again for your explanations!