11-09-2012 05:33 AM
Hi all,
I am trying to call a vi from a main one, I succedded to call the vi but I could not stop the main vi and the called vi does not stop and dissappeared. Where did I do wrong?
Solved! Go to Solution.
11-09-2012 05:42 AM
Please post your subvi as well.
11-09-2012 05:44 AM - edited 11-09-2012 05:44 AM
sorry for that. I have forgotten to post it. here it is.
11-09-2012
05:56 AM
- last edited on
05-16-2025
01:44 PM
by
Content Cleaner
LabVIEW follows a dataflow model for running VIs. A block diagram node executes when it receives all required inputs. When a node executes, it produces output data and passes the data to the next node in the dataflow path. The movement of data through the nodes determines the execution order of the VIs and functions on the block diagram. Source
Once you have called your subVI, your main VI is waiting for it to finish before it can move to the next state in the state machine which is why it won't stop. If you want to run a separate VI, you can call one asynchronously
11-09-2012 06:08 AM
Its because you are back in the same case before you issue a stop command.
So basically your vi finishes execution and because click and run state is selected it runs again. So you need to make sure that you receive data back from the subvi and then based on that set the next state.
11-09-2012
06:15 AM
- last edited on
05-16-2025
01:44 PM
by
Content Cleaner
@LewG wrote:
LabVIEW follows a dataflow model for running VIs. A block diagram node executes when it receives all required inputs. When a node executes, it produces output data and passes the data to the next node in the dataflow path. The movement of data through the nodes determines the execution order of the VIs and functions on the block diagram. Source
Once you have called your subVI, your main VI is waiting for it to finish before it can move to the next state in the state machine which is why it won't stop. If you want to run a separate VI, you can call one asynchronously
Actually all I want to do is to regulate my main vi to prevent it run immediately in execution mode to adjust parameter. I opened a thread about it here. When I build a standalone application and run it into another PC without labview, it runs immediately. It causes problems because there are alot of parameters on it to be adjusted before running. So I am trying to find a solution to adjust this vi in this way. Could you show me a way to do this? I do not know about asynchronously calling of vis so I will read articles about it.
.
11-09-2012 06:56 AM
@.aCe. wrote:
Its because you are back in the same case before you issue a stop command.
So basically your vi finishes execution and because click and run state is selected it runs again. So you need to make sure that you receive data back from the subvi and then based on that set the next state.
I get your suggestions and modify the vi. It works well. Thank you all.