LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I change execution properties of a SubVi programatically

Hello,

I have a Vi that calls a SubVi from within several While loops. For that reason, the SubVi should be defined as Reentrant. The Re-entrant property works for the last version of the program but makes the debugging more difficult so, while I develop the program I don't set the Re-entrant property of the Vi.

Questions:

1) Is there a way to set the Re-entrant property programatically, in the initialization part of the program? That way I can use a Boolean variable called "Simulation" that is ON for debugging and OFF for using the program in the real world. That Boolean would be set at the beginning of the program, or maybe in the Registry, and would define, within a Case, the Re-entrant property of the SubVi. By the way, I'm already using the Simulation Boolean in two cases, 1) to set IP address of TCP/IP communication (real address for real application and 127.0.0.1 for simulation) and 2) to call a SubVi with calls to ImPort and OutPort in the real application and calls to a simulation SubVi when debugging.

2) In the same program, the main Vi calls a Re-entrant SubVi. The Re-entrant SubVi calls a set of other SubVis but only once in the SubVi. Shpuld the "second generation SubVis, sons of the Re-entrant, should also be Re-entrant? Several instances of those "second generation" SubVis may be running at the same time but each one called by a different process of the Re-entrant.

Thanks much,

Marce
0 Kudos
Message 1 of 2
(2,772 Views)
Hi Marce,
You can change the execution properties of a subvi by using the Application Control tools. Open a reference to your VI. Use the application property node -> select class -> VI server -> VI and select 'Execution'.

Not sure on reentrant subvis but you can read this thread for some info.
http://forums.ni.com/ni/board/message?board.id=170&message.id=70767
0 Kudos
Message 2 of 2
(2,743 Views)