12-08-2023 09:42 AM
Hi,
For a project I want to turn an LED on for 5 seconds with a switch on the high raise of the switch. So when the switch is turned on the led goes on for 5 seconds and than turns off. The switch could stay on that may not make a difference. When the switch is turned off again on then on the LED should turn on for 5 seconds again. So basically the LED should turn on 5 seconds every time on the high raise of the switch on. Can someone help me with this problem?
Thanks already!
12-08-2023 10:05 AM
Hi Aaron,
@AaronDW100 wrote:
For a project I want to turn an LED on for 5 seconds with a switch on the high raise of the switch. So when the switch is turned on the led goes on for 5 seconds and than turns off.
Take a look at the ElapsedTime ExpressVI, it will help you a lot!
@AaronDW100 wrote:
When the switch is turned off again on then on the LED should turn on for 5 seconds again. So basically the LED should turn on 5 seconds every time on the high raise of the switch on.
So the LED should turn on only when the switch turns ON or also when the switch goes OFF?
12-08-2023 02:08 PM
@AaronDW100 wrote:
For a project I want to turn an LED on for 5 seconds with a switch on the high raise of the switch. So when the switch is turned on the led goes on for 5 seconds and than turns off. The switch could stay on that may not make a difference. When the switch is turned off again on then on the LED should turn on for 5 seconds again. So basically the LED should turn on 5 seconds every time on the high raise of the switch on. Can someone help me with this problem?!
Are you talking about virtual switches and LEDs on the LabVIEW front panel or real switches and LEDs on a circuit connected to your computer in some way? I assume if the users constantly turns the switch on and off, the LED will stay on forever.
Either way, LabVIEW does not really care where values are coming from and going to, so the main code logic will be the same.
So start with a virtual implementation to keep things simple. What have you tried so far? I am sure your teacher already talked about all needed components, so look at your class notes first.
I would do as follows: