LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resetting Values with Property Nodes

Hello all,

 

My front panel has quite a few indicators....let say about 20. While most are numeric, some are also text or Boolean. I use property nodes for each one to reset them before and after VI execution. All like indicators are set to the same value.  

 

It looks very busy on my block diagram because I have a property node for each individual indicator. Is there a way to batch all like indicators together in one property node? If there is, I haven't found it. It may not exist and the cleanest way my be by using one of the structures.

 

Thanks,

Ryan

 

0 Kudos
Message 1 of 8
(3,284 Views)

Make a (typedef'd) cluster containing all the control refs.  Feed it into a subVI.  Make all your property node updates inside of it.  There's no way to make it "less busy" - but at least you can hide your mess behind closed doors.  😉

Capture.PNG

 

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 8
(3,279 Views)

What's wrong with just setting the default values in your VI (Edit->Make Current Values Default)?  Then when your application starts, it will already have the default values.  Also, this will allow you to use an Invoke Node for your VI to reinitialize all values (Default Values->Reinitialize All To Default).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 8
(3,271 Views)

Thanks Bill,

 

I thought of that but was hoping there was another way. This is most likely what I will do.

 

Ryan

0 Kudos
Message 4 of 8
(3,227 Views)

Crossrulz,

 

Default value option does work when using it in development mode. The problem with that is when you build an installer, that attribute is not included. Since I intend to build an installer, this won't work in the future.

 

Ryan

 

0 Kudos
Message 5 of 8
(3,226 Views)

You talk about indicators, right? In a good state machine, they will get written quickly anyway, so resetting may not be needed unless their terminal is rarely reached by dataflow.

 

A simple fix: Go to "VI properties...execution" and Select "clear indicator when called". That's all you probably need.

0 Kudos
Message 6 of 8
(3,222 Views)

@Korpz wrote:

 

Default value option does work when using it in development mode. The problem with that is when you 

an installer, that attribute is not included. Since I intend to build an installer, this won't work in the future.


"Reinitilaize all to default" works fine in the runtime engine. Have you tried?

 

("make current values default" obviously does not, but that's a different topic)

0 Kudos
Message 7 of 8
(3,221 Views)

@altenbach wrote:

@Korpz wrote:

 

Default value option does work when using it in development mode. The problem with that is when you 

an installer, that attribute is not included. Since I intend to build an installer, this won't work in the future.


"Reinitilaize all to default" works fine in the runtime engine. Have you tried?

 

("make current values default" obviously does not, but that's a different topic)


My preference is not to depend on default values when my application starts up.  I like to explicitly set each control that I care about to a known and expected value.  This may stem from the fact that I used to almost never make executables, and in dev mode, default values can get changed.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 8
(3,196 Views)