09-20-2018 02:27 AM
Hi Labview users,
I have a VI and I want to use it in a larger VI.
Larger VI is s-w-parameter
I want to use Spectrum VI instead of bgs VI.
Spectrum Vi works well in itself.
But when I want to use it instead of bgs VI, the input and output data is a problem.
I need some experts help.
Thanks
09-20-2018 02:39 AM
Hope you need t go through basic LabVIEW tutorials. Though calling a VI inside another VI is pretty simple to explain, you should understand basics.
09-20-2018 02:52 AM
just simply make an llb from llb manager and whenever you need insert the vi by select vi in blockdiagram by right click
09-20-2018 03:13 AM
@jyot445 wrote:
just simply make an llb from llb manager and whenever you need insert the vi by select vi in blockdiagram by right click
It's been 15 years since I last heard someone recommend using an llb. Even then, usually followed by the advice not to use them.
.llbs used to be terrible instable. One write error, and the entire llb is corrupt. That might have improved. Still using the project explorer, combined with libraries (.lvlibs), classes, (virual) folders, really eliminates all the needs for .llbs. That provides a much better drag\drop experience.
So there are quite a few ways to get a subvi into a diagram:
Probably a few more.
LabVIEW Programming ((make LV more popular, read this)
09-20-2018 07:59 AM
Really, brother! How could I not think? Tutorials!!! Oh my god!! You have a brilliant brain. This message does not require much IQ to look at the files and tell what went wrong.
09-20-2018 08:08 AM
@AnnihilationSpectrum wrote:
But when I want to use it instead of bgs VI, the input and output data is a problem.
It does take a lot of brain power to understand your message. You have a lot of large VI's that are difficult to follow, and you have not clearly stated what your problem is in that sentence of yours.
The entire message comes across as "I don't know how to use subVI's", and the only solution to that is to take the tutorials. If you have a specific more complicated problem than that, then you need to clearly show what the problem is. Throwing a bunch of busy VI's into a message won't help anyone help you solve your problem.
09-20-2018 08:52 AM - edited 09-20-2018 08:53 AM
@AnnihilationSpectrum wrote:
Really, brother! How could I not think? Tutorials!!! Oh my god!! You have a brilliant brain. This message does not require much IQ to look at the files and tell what went wrong.
Uhmm… You've been looking at those files as well?
In general, it's not wise to bite the hand that feeds you. Nor nice. Not even if you don't like the food.
LabVIEW Programming ((make LV more popular, read this)
09-20-2018 09:37 AM - edited 09-20-2018 09:39 AM
@AnnihilationSpectrum wrote:
Really, brother! How could I not think? Tutorials!!! Oh my god!! You have a brilliant brain. This message does not require much IQ to look at the files and tell what went wrong.
Judging by your question and your code, I would say taking a few tutorials is advice you should not ignore.
09-20-2018 10:20 AM
Looking at your code, the Spectrum VI performs a lot more functionality than the bgs VI. As you said, you can run Spectrum VI standalone just fine.
Spectrum VI isn't a direct replacement for bgs VI, so it makes sense why the output data doesn't match up.
If you need to dynamically swap between bgs VI and Spectrum VI, I would recommend modifying bgs VI to encapsulate more of the functionality (where you are formatting the spectrum graph) into that subVI itself.
Basically what you are proposing to do is fit a square peg in a round hole. You need to modify one thing or the other to get it to work for your needs.
I also agree that some tutorials might describe how to better encapsulate your code and provide structure to allow for you to make this application more modular if that is your desire.
09-20-2018 10:32 AM
@AnnihilationSpectrum wrote:
Really, brother! How could I not think? Tutorials!!! Oh my god!! You have a brilliant brain. This message does not require much IQ to look at the files and tell what went wrong.
Thanks for the compliment!
Your problem statement made me to think how to use a VI inside a larger VI (using sub vi inside a calling VI)
Hope many provided useful suggestions, ultimately goal is to find the solution, not about finding individual IQ level.