01-31-2018 09:35 AM
Hi, could someone help me to check why does some of my LEDs not turn off when i set it to false. Would appreciate the assistance rendered. Thanks
When I fully charge up the indicator and press on discharge button, some of the LEDs in Z4 and Z5 are not turning off and when the indicator reaches 0, some of the LEDs in Z3 does not turn off as well.
01-31-2018 10:07 AM
You should really learn about control and indicator references... You can create arrays of them and iterate through the arrays to change the states of your indicators dynamically, instead of creating millions of local variables and explicitly wiring each one to a boolean constant.
Anyway, I think the problem you're having is related to the default cases in your case statements. I don't understand what purpose they're meant to serve, but I think that's where you should look.
01-31-2018 10:25 AM - edited 01-31-2018 11:12 AM
What is "it" that you set to false? Please be specific how to operate. What do you expect to observe and what do you observe instead.
You have 99% too much code. The entire code could fit on a postcard. Way too many local variables, representation mismatch, and highly inefficient code. Why is the front panel so gigantic?? None of you local variables are needed.
Most of your terminals are only written in one of the cases.
Also, you program seems to be just a one-shot run. Are you using "continuous run mode"? That's not the right way!
In any case, if you want all indicators at the default whenever the program starts over, go to "VI properties...execution" and set "clear indicators when called".
Still, I recommend to rewrite the entire things from scratch as a simple state machine. No need for sequence structures, local variables, or formula nodes.
01-31-2018 11:05 AM - edited 01-31-2018 11:13 AM
@altenbach wrote:
None of you local variables are needed.
Just to give you some ideas, here's all you need to animate one arrow (make a cluster of LEDS for each arrow!).
Note that you probably can add all other arrows to the same FOR loop in the same way.
02-01-2018 07:42 AM
Thanks for the feedbacks and inputs. I will try using state machine 🙂