05-14-2009 08:47 AM
Hi kmous,
I will do so tonight. 🙂
05-14-2009 08:54 AM - edited 05-14-2009 08:56 AM
Local variables are one of those things which are easy to abuse, but are also very useful in certain circumstances. Alternate sources for much of the same functionality are wires, outputs of event structures, terminals, and value or value (signalling) property nodes. My order of preference is:
05-14-2009 09:17 AM
05-14-2009 12:16 PM
05-14-2009 12:22 PM
James Mamakos wrote:
How do you create a link (possibly using a property node) to something on the front pannel of another VI?
It depends on the realtionship between the control you want to touch and the the toucher. If the "toucher" is a sub-VI of the VI that has the widget you can create a reference to the widget and pass it using the icon connector.
If they are not connected then given a a reference to the VI that has the widget (optional how to get this but "Open VI ref and pass it that name via the path input, assuimg its in memory) you can get a ref to the FP and start waliking down into nested tab pages looking for the widget using its name.
There are variation on all of the above but hopefully that gets you started.
Ben
05-15-2009 08:33 AM
05-15-2009 08:35 AM
DFGray wrote:
When I write a GUI based LabVIEW program, I usually create references to all the possibly visible controls and indicators (right click, create reference) and bundle them all up for later use. I cache them with an appropriate reference object (shift register wire, single-element queue, or action engine depending on the application). This allows me to easily do fairly complex things with the front panel without too much effort.
I do the same!
Ben
05-19-2009 02:15 PM
I used to do that.
Would creating references for Front Panel objects impede cause any detriment to the overall software, especially when the references are not being used?
Of course all references (used or not) would be closed prior to terminating the program.
R
05-19-2009 02:26 PM
Ray.R wrote:I used to do that.
Would creating references for Front Panel objects impede cause any detriment to the overall software, especially when the references are not being used?
Of course all references (used or not) would be closed prior to terminating the program.
R
One of the other developers I work with wrote a little (cough cough) set of VIs that allows selection of any FP object on any FP in the app. Under the hood he used an AE to cache the references and an enum lets him choose it by name. The tricky part was getting the AE to inititalize and find all of the objects. He did that by sneaking his code into an XControl so he could detect when the app changed from edit to run modes.
So in that case, we have seen no issues (after he learned that explicitly opening a reference always allocated some memory).
Ben
PS: No I will not post that code because as soon as I did someone would ask me to explain it.
05-19-2009 04:35 PM