LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resetting switch

Is it possible to have a boolean switch which resets to its defualt when the abort button is used?
0 Kudos
Message 1 of 3
(2,623 Views)
I am not use that this is possible. You can force it to its default position when the VI starts by using property nodes.

The abort button is primarily intended for use by developers/programmers who coded something which did not work as expected, so that they could force the VI to quit. Users should always be given a Stop button on the front panel. When that is pushed, go to a case which executes all the necessary "clean-up" code before stopping the VI. Once a program is deployed to users, removing the abort button is good practice.

Lynn
0 Kudos
Message 2 of 3
(2,619 Views)


@johnsold wrote:
I am not use that this is possible. You can force it to its default position when the VI starts by using property nodes.

The abort button is primarily intended for use by developers/programmers who coded something which did not work as expected, so that they could force the VI to quit. Users should always be given a Stop button on the front panel. When that is pushed, go to a case which executes all the necessary "clean-up" code before stopping the VI. Once a program is deployed to users, removing the abort button is good practice.

Lynn




As Lynn Stated you should not use the "Abort" button to stop execution of your code.

You can set controls and indicators to a default value using local variables. Create a local variable of a control or indicator by right clicking on it's terminal on the block diagram, select create, local variable.

Attached is a simple example.

Chad
0 Kudos
Message 3 of 3
(2,607 Views)