09-26-2011 12:38 AM
Hey guys,
Is there a better way to do this in the attached VI.
I think I want to build a state machine but I am not sure if I want to do this because I don't fully understand how to use the queue and how to implement it properly.
As you can see, I have a cluster of boolean buttons to go on my main front panel. They change the ring enum and it outputs a hex command to a micro.
Is there a better way then having 13 case statements?
Cheers
Kamilan
Solved! Go to Solution.
09-26-2011 02:55 AM
Hi Kamilan,
You code can be better done using an event structure and a while loop. No need to use a state machine if the total number of values in the ring control is known. Kindly have a look at the attached vi. Let me know if you have any further doubts.
Warm Regards,
Nitz
(Give kudos to good Answers. Mark it as a Solution if your problem is Solved;))
09-26-2011 07:16 PM
NitzZ
Thank you for the code. And more importantly the comments.
I had no idea thats how the event structures can be used.
Thanks so much!
Cheers
Kamilan