03-25-2010 05:55 AM
I am having a problem calling a VI.
The VI runs as expected by its self.
When I call it from an upper VI it seams to run buthangs the Upper VI.
Thanks,
Matt
Solved! Go to Solution.
03-25-2010 06:13 AM
Hi Matt_NH,
yes this is correct. Think about the data flow!
Please explain what you try to do.
Mike
03-25-2010 06:16 AM
Dear Matt,
thank you so much for your post on our webforum.
With highlight execution you will be able to see how your VI is running; you can select highlight execution on the toolbar from the block diagram. You will notice (see attachment) a green arrow on your sub VI; this means that your sub VI is running. If you press the stop button in your main VI; the button will be handles when your sub VI has stopped running. Your sub VI will also output his data when it stopped running.
Because there is a while loop in your sub VI, and the while loop can only be stopped with a stop button on your sub VI; your sub VI will never stop executing. It is best to remove the while loop in your sub VI and for your purposes only to use the for loop in the main VI.
Again; your VI 'doesn't hang; it is only busy in the sub VI.
Best regards,
03-25-2010 08:09 AM
Thanks, that was it. I removed the while loop and the calling VI now gets the data at 1hz.
To answer the first reply:
I am trying to set up three VI to simulate data coming into a DA system at different rates.
This first VI is one set at 1hz I will have data from a PLC coming in at 2 hz and a cRio feeding at 20hz.
Next issue, if I have the three VI's running at different loop rates how do I get the calling VI to run at a much faster rate?
When I removed the while loop from the telemetry VI the display VI is waiting for the telemetry VI to update and only looping at 1 hz.
What I would like is for the display VI to be able to run much faster.
Thanks,
Matt
03-25-2010 08:36 AM
Dear Matt,
please notice that you are generating only with 1 Hz with the simulated signal express VI; the VI waits until this sample has been generated by the simulated signal express VI. So this causes to run your loop at only one Hz. With a multiple loop architecture you can run multiple loops at multiple rates at the same time.
Best regards,