03-27-2023 11:43 AM
My code is working as it should. I'm just trying to find a way of not using the elapsed time. Can someone please help?
Goal:
I will be turning the button ON and OFF repeatedly.
If I keep button false for more than 15 second, signal light will be ON.
If I keep button true for more than 10 seconds, signal light will be ON
Otherwise, keep signal light OFF.
Solved! Go to Solution.
03-27-2023 11:48 AM
Have you ever wondered what would change if you just remove the select function?????
03-27-2023 12:02 PM
03-27-2023 01:30 PM - edited 03-27-2023 01:31 PM
Yes, that select was definitely unnecessary. I didn't think. lol smh
Thanks Mr. Altenbach! Your code works great!
03-27-2023 03:40 PM
Here's how I would do it.
03-27-2023 04:28 PM
@GRCK5000 wrote:
My code is working as it should. I'm just trying to find a way of not using the elapsed time. Can someone please help?
Goal:
I will be turning the button ON and OFF repeatedly.
If I keep button false for more than 15 second, signal light will be ON.
If I keep button true for more than 10 seconds, signal light will be ON
Otherwise, keep signal light OFF.
The Elapsed Time express VI is probably one of the few express VIs you can use without getting your head chewed off.
03-27-2023 04:28 PM
Behavior is incorrect. LED should go ON a certain time after change.
Your inherits from the control value, e.g. it stays ON for a while if the button is turned off while the LED is ON.
(IMHO, My flat code is simpler than three event cases and terminals hidden in an innermost case structure 🙂 )