02-24-2015 02:27 PM
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?
02-24-2015 02:47 PM
What happens when the LED is FALSE?
02-24-2015 03:00 PM
nothing
02-24-2015 03:01 PM
nothing
02-24-2015 03:03 PM
02-24-2015 10:54 PM
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
02-25-2015 02:12 AM
02-25-2015 06:43 AM
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.
02-25-2015 10:27 AM
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.