LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Button Controlled Ring Enumerated String

Solved!
Go to solution

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

0 Kudos
Message 1 of 3
(2,529 Views)
Solution
Accepted by topic author Kamilan

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;)) 

Message 2 of 3
(2,519 Views)

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

0 Kudos
Message 3 of 3
(2,495 Views)