LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a custom Run-Time menu in Reentrant Sub-vi?

I have done a “Reentrant” Sub-vi (VI Properties>>Execution>>normal priority>>Reentrant execution) and in this Sub-vi I would want to create a custom Run-Time menu. Is possible to choose in “Reentrant” mode only a “Default” or “Minimal” Run-Time menu? Any people has the similar experience to do this? Thanks a lot in advance! Simone Saracini
0 Kudos
Message 1 of 6
(3,980 Views)
You shouldn't really have any menu for a reentrant VI.
A reentrant VI is not supposed to be accessed by user, because it creates many instances, all connected to the same front panel.
What is it exactly that you want to accomplish with this VI?

___________________
Try to take over the world!
Message 2 of 6
(3,974 Views)
I agree with tst.

Also, I fail to understand why you would want a menu to be part of a re-entrant sub-vi.

Do you want to change the selection based on previously-made selection? As in customizing the menu items based on previous selections?

JLV
Message 3 of 6
(3,964 Views)
The problem is this:
in my main program I have a acquisition of images and during the acquisition I would want call a Sub-vi with a front panel to control the acquisition, without stopping or slow down the acquisition itself. To make it I call the sub-vi with “Invoke Node”, metods: Open FP, Set Control Value, Run VI. Following this strategy the main program and the Sub-vi “live” simultaneously without problems each other.
When I have runned the program LabVIEW advises the following error:
“Possible reason(s): LabVIEW: (Hex 0x4AE) The VI is not in a state compatible with this operation. Please change the execution mode of the referenced VI to reentrant for this operation.”

Once I have changed to the “Reentrant mode” the Sub-vi works properly but I have lost my custom Run-Time menu for the sub-vi.

N.B. The call for Sub-vi is made in this type (inside the “Event Structure” of the main program):
There is a “Static VI Reference” (with the reference of my Sub-vi) connects to “Invoke Node” (the setting is to Methods>>Open FP). This “Invoke Node” is connected to an other (the setting is to Methods>>Set Control Value). Finally in the last “Invoke Node” the setting is Methods>>Run VI. Thanks a lot in advance! Simone Saracini
0 Kudos
Message 4 of 6
(3,953 Views)
You can't use multiple instances of a reentrant VI for user interface.

What you need to do is to make the VI a template, saving it with the VIT extension. When you open a reference to a template, a new, independant copy of the VI is created in memory and the custom menus are available for user.


LabVIEW, C'est LabVIEW

Message 5 of 6
(3,943 Views)
Thanks Jean-Pierre Drolet, I have resolved the problem. Furthermore I have found some example, bye-bye
0 Kudos
Message 6 of 6
(3,920 Views)