09-03-2010 06:30 AM
Hello,
I have two problems with a software oscilloscope that I downloaded from a post on this forums. The library (Oscilloscopes.llb) containing the oscilloscope called main.vi is given as an attached file.
My first problem comes when I insert the main.vi into another vi, called Pulsed_LED.vi (see attached file). I am using Pulsed_LED.vi to drive a LED with a periodic pulsed modulated square signal and I record another optical signal using a detector. The recorded signal is also periodic with the same period that the excitation signal. My hardware is a DAQmx NI USB-6211. I inserted the main.vi of the oscilloscope.llb into my Pulsed_ LED.vi in order not to use two different vi, one to drive the hardware and one to record and see the detected signal. The problem is that I do not manage to see any signal on the graph of Pulsed_LED.vi while the experiment is running. It is only when I open the original main.vi from the oscilloscope.llb that I can see my signal ON the graph of main.vi but still not on the graph of Pulsed_LED.vi. What is the problem with my Pulsed_LED.vi? What should I do to avoid to open the main.vi to see the signal.
The other problem is the triggering. The main reason I have been trying to use this "soft" oscillosppe is the possibility to trigger on a digital signal (the one driving my pulsed LED). I would like, like in a hardware oscilloscope, to be able to see a "static" signal when the software trigg, for example the rising edge of my digital input triggering. Instead, the detected signal is defilating on the graph, and it does not matter what I am doing with the triggering option and so on.
Thank you in advance for the help,
Gregory
09-03-2010 09:39 AM
You don't understand LabVIEW and data flow. The reason you don't see anything from the scope VI is simply that it has to finish before it will return anything to your main program. Have you looked at the scope VI's block diagram? It has a while loop that must be terminated first and you have no way to terminate it since you did not program it to show it's front panel where someone can click the stop button.
I don't understand the term 'defilating'.
09-03-2010 02:06 PM
Hello,
and thanks for the answer. I can see something from the scope, but only when I run the original scope (when I run main.vi), but not when it is inserted as a sub-vi in another vi (I do not see anything when I run Pulsed_LED.vi where main.vi is inserted as a sub vi). I did look at the main.vi and there is a while loop with a programmed stop, but I am sorry I do not understand your explanation. How do I programmed the vi (I understand the Pulse_LED.vi?) "to show it's front panel where someone can click the stop button".
Gregory
09-03-2010 02:26 PM
To show a VI's front panel you hve to go to VI Properties>Window Appearance>Customize. This not affect anything on your main VI, of course. That indicator will not update until you stop the subVI unless you do some rewriting. If you do not want to retain the user interaction with the subVI, get rid of the while loop and event structure. Then you do not need to change the VI appearance. You would have to place the subVI inside the while loop in order to do a capture with each iteration of the loop.
Before you do any of this, I would strongly recomend that you take the LabVIEW 101 tutorial. This should explain some of the basics of what I've said. Once you master these, you can get a little fancier if you want. This would require a few advanced concepts such as control references.