LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Properties of Front Panel on RT Target

Solved!
Go to solution

LV 2013.1, LV RT 13

 

I have a problem similar to this post, but that ended up solving a different problem.

 

I need the labels from the elements of a TYPEDEFed cluster, running from an RTEXE on an RT target.

Code.PNG

 

This code works fine in the DevSys, because the front panel is available.  But when compiled into RTEXE, the CONTROLS[ ] property returns an empty array.

 

I tried turning OFF the REMOVE FRONT PANEL setting in the Build Spec for this file, but nothing changed.

 

 Dont Remove Panel.PNG

 

I got past the emergency by creating a constant array with the names in it, but I intended to use the TypeDef as the master source, so that if any of the spelling changes, the labels array that I extract will automatically follow suit.

 

Is that possible?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 5
(2,256 Views)
Solution
Accepted by topic author CoastalMaineBird

Use the Variant library functions instead. I posted an example that does this (including for nested clusters) just yesterday:

http://forums.ni.com/t5/LabVIEW/How-do-I-get-control-names-from-within-nested-clusters-RT/m-p/283704...

Message 2 of 5
(2,253 Views)

Excellent !  I rarely use Variants because they're usually slower than other solutions, but this is one case where they are the best solution.

 

I'm caching the results, so if they're slow, I don't care much.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 5
(2,240 Views)

@CoastalMaineBird wrote:

Excellent !  I rarely use Variants because they're usually slower than other solutions, but this is one case where they are the best solution.


I haven't benchmarked it, but do you have some experience that suggests that variants are slower than property nodes for this sort of thing? The variant approach has the advantage that it doesn't tie up the user interface thread. Also, I can't find the post right now, but I think I remember seeing comments that the variant VIs are faster in 2013 than they were in 2012 (or maybe it was 2012 versus 2011).

0 Kudos
Message 4 of 5
(2,218 Views)

 

I didn't mean variants were slower in this context;  I meant compared to local variables and terminals and things.

 

I just compared my original solution (which doesn't work on RTEXE) to your suggestion (which does) and the difference is dramatic:

 

Time.PNG

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 5 of 5
(2,201 Views)