05-17-2018 01:47 PM
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
05-17-2018 01:53 PM - edited 05-17-2018 01:58 PM
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. 😉
05-17-2018 02:00 PM
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).
05-17-2018 11:19 PM
Thanks Bill,
I thought of that but was hoping there was another way. This is most likely what I will do.
Ryan
05-17-2018 11:22 PM
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
05-17-2018 11:55 PM
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.
05-18-2018 12:01 AM
@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)
05-18-2018 05:48 PM
@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.