LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically calling multiple reentrant sub vis in exe

Solved!
Go to solution

I have this sub vi which is beign run multiple times. 

 

multicall.PNG

 

Each time its run, it gets a queue and comm cluster then it monitors a single PLC.  This way I can dynamically add PLC's to my system by just adding more vlaues to a configuration file. 

 

This is the first time I have run someting like this but it appears that if the VI dosn't have a front pannel (if the invoke node->state=Hidden) or it is a compiled exe (this will end up being deployed on a computer with only the LVRTE) it freaks out. 

 

Any suggestions on how to programatacally create objects like this that will run in paralell to my main process, and how best to get information (queue refs, comm info, status outputs) are FG's and some complex sorting opperation my only option? 

0 Kudos
Message 1 of 3
(3,036 Views)
Solution
Accepted by topic author Taylor.Kendall

What you're actually doing is OK, and the fact that you're using the static VI reference to get the path is even better, so the only thing you need is for the FP to be in memory. Luckily, this is very easy - just create a property node for one of the controls in the subVI. You don't have to do anything with the property node, as having it in the code is enough to keep the FP, even when building an EXE. Just make sure to place a comment next to it, so that it's not deleted by accident.

 

 

One other point is that setting the control value will be a lot easier if you use the VI's Control Value.Set method, which will save you the need to search through the controls.

 

For the future, this idea is marked as being in beta, so hopefully when LV 2011 comes out in 5 months you will no longer have to resort to these tricks.


___________________
Try to take over the world!
Message 2 of 3
(3,014 Views)

Thanks, that helped alot. 

 

Yes that looks really wonderful for 2011.... now if I can just get us off of 8.6.1 that would be good. 

 

I hate it when people are scared of change. 

0 Kudos
Message 3 of 3
(3,002 Views)