LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What determines the default state of a constant

Hello,

   What detetmines the default state of a boolean constant? In the block diagram the constant appears as a true/false constant, in the front panel the constant appears as a toogle switch, that has a default state of being true. I would like to have the default state to be off/false. Would it be better to replaced the constant with a real toggle switch?
Regards,


Kaspar
0 Kudos
Message 1 of 4
(2,880 Views)
Kaspar,

a boolean constant has no default state as it is a constant that has a _constant_ value.
 If you operate on the FP, there are  just controls or indicators. The default of those was defined when the control was created.  It is set as a property called default_value. You can edit a control and change the default value to whatever you want, but save it than as your_name.ctl in order to prevent it from being overwritten by the next LabVIEW update.
Speaking about defaults makes also sense with uninitialised shift registers (USRs) of loops. In this case, the default value for a boolean USR is always False.

HTH   and Greetings from Germany!<br>-- <br>Uwe
0 Kudos
Message 2 of 4
(2,871 Views)
Hello,

  I have fixed the problem I had. I have changed the constant to a boolean toggle switch control and made the default state to be off. I am a happy camper!
Regards,


Kaspar
0 Kudos
Message 3 of 4
(2,865 Views)
Hello Kaspar,

you can have a boolean constant as "true" and as "false". Just grab the correct one from the functions palette or switch it using the editing tool...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,857 Views)