LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you create an array without using a shell on the FP?

Well, I just discovered it's because I was placing a Property not a Method.
0 Kudos
Message 11 of 16
(1,182 Views)
The icon to the left of Open FP ref returns the path of the VI it is called from... it's under the file/disk/path palette (or something like that). The VI methods and properties, such as Get Control Value, don't actually need a reference to the front panel if they're being used for the current VI. But say you wanted to make a "Save Controls" subVI and "Restore Controls" subVI, then you would need to have a reference from the front panel to pass to these subVI's, so they know which FP to look on for controls. If you were to put the path constant and Open VI Ref icon inside of a subVI, it would return the FP ref for that subVI, not the main panel ref with your controls on it. So you would actually want to make th
e subVI have the code in it, but not the part where it obtains a reference. You would obtain the reference in your main.vi then pass it to the subVI to do the work. To make a correctly typed reference control for your subVI, you would click on the reference icon of the Invoke node and then Create Control. This would be wired in the main.vi to the output of the Open VI ref

If you use an Invoke Node icon and place it on the BD, it will say "App". That's the default class of the node. To change what class it is, put the mouse in finger mode (I'm not sure if you have the auto-tool turned on but anyway), right click the App and there is an option to Select Class. Find VI Server > VI. That will essentially cahnge it just like it would be changed if you wired it to the output ref of an open VI ref icon (like in the example). Selecting the class loads a different set of options for the invoke or property node which can then be selected, such as Get Control Value.
0 Kudos
Message 12 of 16
(1,182 Views)
... and I've just discovered that the constant is "current VI path". So I've answered the two questions I had...

One more. In the two diagrams what are the "All Control Value" and "Selected Control Vslue" icons?
0 Kudos
Message 13 of 16
(1,182 Views)
m3nth,

This is probably pretty simple to you but I'm kind of banging my head against a wall here.

Maybe you could take a look at the little test.vi I'm working with and tell me what I'm missing. It appears I'm not getting the right kind of array into the For loop to Unbundle.

...still wondering what the "All Control Values" and "Selected Control Values" is on your pic.

I'm wiring it to be event driven from FP buttons.
0 Kudos
Message 14 of 16
(1,009 Views)
email me: menthol@juno.com
0 Kudos
Message 15 of 16
(1,009 Views)
Hi Greg,

I once created a small VI with a similar purpose to what you are describing. It�s intended to be used as a sub VI and doesn�t need any control references wired to it.

It will Load or Save all the controls and indicators values from the main VI depending on the Function input.. It will save the settings in a file with the name of the main VI with the extension �.ini�.

Have fun and tell us what you think� Thanks.
.

Best regards,
Philip C.
Applications Engineer
National Instruments
www.ni.com/ask
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 16 of 16
(1,009 Views)