From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case

I have a Vertical toggle switch and a led

 

if the led is true and a switch is false then

 if i turn on a switch then turn off the switch then the led will be false

how can i do this? 

 

 

0 Kudos
Message 1 of 9
(3,093 Views)

What happens when the LED is FALSE?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 9
(3,054 Views)

nothing

0 Kudos
Message 3 of 9
(2,987 Views)

nothing

0 Kudos
Message 4 of 9
(2,987 Views)

 


@crossrulz wrote:

What happens when the LED is FALSE?


nothing happens

0 Kudos
Message 5 of 9
(3,038 Views)

I have a Vertical toggle switch and a led

 

if the led is true and a switch is false then

 if i turn on a switch then turn off the switch then the led will be false

 


Kudos to your Instructor who designed this problem.  Have you learned about Shift Registers and While Loops with the Stop Indicator having the constant True wired to it?  [That's a hint, by the way ...].

 

BS

0 Kudos
Message 6 of 9
(3,000 Views)

Hi progandroll,

 

I have a Vertical toggle switch and a led

What happens when you use a horizontal toggle switch?

 

No, that's no hint. 😄

Best regards,
GerdW


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

Why would you hint that he should wire a true constant to the conditional terminal?  This certainly doesn't sound like an embedded application.  Wire the stop control so you're not forced to use the abort and learn a bad practice from the start.

0 Kudos
Message 8 of 9
(2,963 Views)

I would use an Event Structure to react to the change in values of your switch.  You should store your LED's value in a shift register.  You don't event need a case structure.  Use a Select function to choose what the value of your LED should be.  I'll leave the actual logic inside of the event case to you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 9
(2,939 Views)