ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

begginer's GUI trouble

Hi everybody! I use the following sequence to launch a subvi. This vi is meant to popup on screen and display status info about the functionality of the main vi. This part works ok.
 
I need to do one more thing, though. I need to keep control on the main vi as long as the monitor is being displayed. As it is, I can go back and manipulate the main vi only after I colse the subvi.
 
Can anyone help me here, please? I can't figure out what I need to do.

Message Edited by louis_nichols on 12-09-2006 04:52 AM

0 Kudos
Message 1 of 6
(3,280 Views)

If you're a beginner, you probably should not be writing stuff which is important enough to be that confidential (at least that's the way I understand those censoring black marks).

As for your question, the loop will not continue running until the subVI ends execution. That's the nature of dataflow.

What you need to do is run the VI as a seperate process.
You can do this, for example, by having a second loop waiting to receive a command to run the VI or (better)
by calling the VI dynamically using the functions in the Application Control palette.
Search the help and example finder for "VI server" and "Dynamic" to find more data.

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
0 Kudos
Message 2 of 6
(3,254 Views)
Hi TST!
 
Thank you very much for your response! I did find a solution starting from your reply. I ended up making a separate loop for each VI that needs to be opened. Each of them looks something like this:
So far, it works as I want it to. I hope it won't create any later surprises. Well, I did include waits in each loop, to allow the CPU to breathe.
 
As for the censoring, well... you can't mess with company rules, can you? Smiley Very Happy And, you know, I told them I'm not experienced enough to be writing stuff like this, but do they listen? Nooooooo!!!!!
 
Anyways, I'm not THAT much of a beginner. It's just that I haven't had to make good GUI's before.
 
Now, I do have one more problem though. I'm thinking it might not be possible, but it's worth asking. Let's say I do something like this:
The idea is that, while the called vi is displayed, I should be able to turn it off from the calling vi, by switching the value of "stop test". This would very useful in many ways and many places of my application. But it doesn't work. Is there a way I can make it to work?

Message Edited by louis_nichols on 12-11-2006 04:04 AM

Download All
0 Kudos
Message 3 of 6
(3,221 Views)
Hi Louis,

first option: use a global variable to send the value from the main vi to the subvi.
2nd option: use references of the main vi's controls. Check the value of the controls by reference/property node in the sub-vi.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(3,211 Views)

Great, man! Thanks a lot! Smiley Happy

Now things work just as I want them to and I can really make a nice working GUI.

0 Kudos
Message 5 of 6
(3,204 Views)

One important advice would be to give your VIs icons (at the very least text ones) and to fill in their descriptions.

Also, adding a seperate loop for each VI is not very nice. Loops should be for constant processes. If your process is dynamic, you should call the VI dynamically. Check out those tutorials.


___________________
Try to take over the world!
0 Kudos
Message 6 of 6
(3,192 Views)