LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem opening sub VI

Solved!
Go to solution

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

Download All
0 Kudos
Message 1 of 5
(3,199 Views)

Hi Matt_NH,

yes this is correct. Think about the data flow!

 

Please explain what you try to do.

 

Mike

0 Kudos
Message 2 of 5
(3,191 Views)
Solution
Accepted by topic author Matt_NH

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,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 3 of 5
(3,190 Views)

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

 

 

0 Kudos
Message 4 of 5
(3,162 Views)

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,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 5 of 5
(3,157 Views)