06-01-2012 07:13 AM
Hello,
I am writing a program where I am reading out images from a camera. This is done by a SubVI. While I am doing that, I would like to be able to change parameters, which are located on the main VI. However as soon as I start the SubVi, the Main VI window is frozen and I can't change anything. I searched for a solution and I found that two parallel structures could be the solution. I tried this, but it does not seem to work (see attached picture). Can someone help me with this? Thanks!
Laurent
06-01-2012 07:28 AM
Why not run the camera in a second loop?
06-01-2012 07:31 AM
Maybe try to play around with "Start Asynchronous Call"?
There is also a property node that allows similar behaviour but i forgot the name...
06-01-2012 07:34 AM
You should NOT have two event structures. Only one loop should have the event structure, handling the user interface. The other loop should be whatever needs to be running continuously. I would suggest looking at the producer-consumer and master-slave programming architectures so you learn what this means.
An alternative is to launch the VI dynamically using the VI server. And before you ask, this has been shown MANY times in this forum, so please search. You can also look at the LabVIEW examples.
06-01-2012 07:51 AM
Hmmm... indeed... having two event structure can (not always though) be dangerous.
In you case, having 2 loops or launching the acquisition VI as a parallel process is possible but I'm not sure it is necessary, let me suggest this type of architecture (more simple than parallel processes, if it doesn't suite your needs then we'll talk about another architecture.
This PNG is a snippet, you can download the PNG file onto your computer and drag it into you block diagram to have the code.
Hope this helps
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus