LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I change the order SubVIs are loaded?

Hello,

 

I have a SubVI which needs to be called before any other SubVI. I tried to put that SubVI in another VI which again calls a second SubVI with the rest of the application:

 

MainSubVI  --- call ---> 'Need-to-be-loaded-first-VI'

            |

            '- call ---> 'Start-VI'

                             |

                             '- call ---> 'Rest-of-application-VI'

 

The problem is that there is one SubVI - saved in 'Rest-of-application-VI' - which is loaded before the 'Need-to-be-loaded-first-VI'.

 

How can I change the order SubVIs are loaded?

 

Thanks,

Johannes

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

If your vis have error clusters, wire the 'Need-to-be-loaded-first-VI' error out to the 'Start-VI' error in.

Also you can use a flat sequence. First frame 'Need-to-be-loaded-first-VI' , second  frame 'Start-VI'

Message 2 of 6
(3,025 Views)

I had already tried the sequence - did not work as I believe the sequence is only usefull at runtime and not when the VIs are loaded.

 

I also tried to wire all the VIs together so that they are all data dependent but the same result as with the sequence - has probably also an effect at runtime only.

 

VIs are still loaded in the wrong order.

0 Kudos
Message 3 of 6
(3,017 Views)

No !

Vis are running (not loading) in the right order, always.

Something else is wrong with your code. Post a simplified example if possible.

Message 4 of 6
(2,996 Views)

The load order should make no difference at all unless you have a cross linking issue. Why do you want to load the VIs in a particular order?

 

P.S. Regardless of the why, I think that the only way you can do this deterministically is by loading the VI dynamically.


___________________
Try to take over the world!
Message 5 of 6
(2,995 Views)

Hai,

 

If you wish to load the VI into memory or block the VI from loading the memory immediatly after the parent VI loads....Use "Call by referance Node" with call setup as "Reload for each call" which will load theVI into memory only when the VI is supposed to execute.

 

With regards,

JK

Message Edited by JK1 on 09-10-2008 05:07 AM
With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Message 6 of 6
(2,986 Views)