LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reset an indicator back to it's default value

Hello,

Is there any way to reset an indicator back to it's default value with a button press? I am looking for a way to reset a timer without resetting any other indicator in the system.
Thanks!
 
Mike
0 Kudos
Message 1 of 4
(4,035 Views)
Hello Mike,

indicators don't have a default value. You surely talk about controls 🙂

Well, you can do that by using a local variable. When the button is pressed a value is written to the local.
Probably you can also use property nodes (get reference of control, wire reference to property node, select appropriate property and set control back to default), but I cannot test this at the moment.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(4,025 Views)
May be I don't understand well your problem, anyway this is a possible answer: create an invoke node from the indicator (right-click on the indicator) and select Reinit to Dflt.
In case of a simple indicator and a trivial default value, this is not very different from assigning the value to a local variable (for sure, it is less efficient).

GerdW: although less relevant than for controls, Reinit to Dflt seems to work also for indicators. I guess that the default is simply 0 for numbers and blank for strings.

Paolo

Message Edited by pincpanter on 02-22-2006 02:15 PM

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 3 of 4
(4,028 Views)

One good use case of setting a default value on an indicator is if you have a Waveform Graph on your front panel, and when people open the VI you want them to see a particular graph image...you can accomplish this by setting the "value" of the graph to be default after the VI runs and there is data displayed in it.

-D

Message 4 of 4
(4,001 Views)