LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make a "property node" for a VI?

Hello!
 
If I add a boolean button on the FP then I am able to make a property node for that button in the Block Diagram. But how can I make a property node for a VI? I have several VI:s an that together is one program. What I need to do is to verify what kind of VI some of my VI:s is. I need to verify if it is .exe or .vi-file, and if it is .exe then I want to disable run, abort, run continuously bottons otherwise not. I have hard that this is possible to do programmaticaly but I can´t figure out how. I am aware that I could do that manually in the File->vi properties->customize->windows appearance but theese choises makes it last forever.
 
I want to be able to stop and run and everything if it is a .vi file, but if it is .exe-file then all those buttons should be disabled.
 
 
Anyone have an example on this?
 
 
In an other message at this Forum I read "You can use the `Front Panel Window. Allow Runtime PopUp`" property to disable run-time shortcuts menues programmaticaly, but still I dont know how to create this property node.
 
/Amir
0 Kudos
Message 1 of 5
(5,915 Views)
Go to Application Control->Propterty Node, and then wire a reference to the vi you want to change the properties for.
0 Kudos
Message 2 of 5
(5,906 Views)

You really shouldn't open a new thread. If you don't understand something, ask and we will explain it.

Like I said in the other thread, you can check if you are running in LV or an EXE by using the Application>>Kind property. To get it, place a property node (from the Application Control palette) on the diagram, click it and find the property.
To set the properties for the VI, place another property node, right click it and select Select Class>>VI Server>>VI. You should have the properties you want under Front Panel Window.

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf). I believe chapter 17 of the user manual explains about programmatic control of VIs.


___________________
Try to take over the world!
0 Kudos
Message 3 of 5
(5,904 Views)

LabVIEW Core 2 Exercise 4-2, Figure 4-8, Step 3 is similar to what you've said, that I should be able to "Right-click on the Property Node and choose Select Class>>VI Server>>VI>>VI." However, when I do this, the pop-up list for Select Class is dimmed. After reading your answer below, I thought maybe just the Property Node I had chosen had the problem, so I created one from the Stop button, but it also had a dimmed list.

0 Kudos
Message 4 of 5
(5,123 Views)

Here's a series of images that might help:

 

Application Property NodeApplication Property Node

Here's the application property node that has been mentioned. Highlighted is the "Kind" property.

Unlinked Node - changing classUnlinked Node - changing class

Here you can see me able to change the class to that of VI, if I wanted.

 

Stop Button NodeStop Button Node

In this image, I chose to create a Property Node from a Stop button, as you mentioned. The Class selections are greyed out because the Property Node is directly linked to the Control. If I want to be able to change it, I need to select "Disconnect From Control" in the first menu. Then, it will have the ability to change the class, and inputs for the Reference (sort of blue-green wire at the top, above the error in/out terminals).


GCentral
Message 5 of 5
(5,116 Views)