ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

switch off button

Hi,

I would like to use a switch on/off button with specified time.

 

My criteria is switch on as user input and switch off after 5 seconds and reset back all the numerial and toggle switch to default value. 

 

Im having problem to do so. 

 

Thanks. 

0 Kudos
Message 1 of 3
(4,412 Views)

Hi fendy,

 

why do you use this InvokeMethod node? Why don't you simply write a zero to a local variable of your "numeric" control?

 

My criteria is switch on as user input and switch off after 5 seconds and reset back all the numerial and toggle switch to default value. 

When you want to have a certain step-by-step procedure a state machine would be fine!

Have states like "wait for user input", "output signal to hardware", "wait delay" and you will be fine…

Best regards,
GerdW


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

Hi Fendy,

 

Here is an example of a state machine. In the "Check Time" case, you can replace "Wait Event" with whatever states you want to do during the alotted time after the button press.On Timer.png

0 Kudos
Message 3 of 3
(4,304 Views)