07-05-2022 09:10 AM
Hi all,
I'm controlling the output of a state machine with an enum. The output from the boolean indicator goes to the "Select" function which determines the next state. When the next state is executing a user can select another value from the enum list before the end of execution, forcing the user to select a different state in the list before the already selected one can be read. Is it possible to read the same value in the enum twice by a mouse click if it is already selected in the list?
One way I thought of is disabling the control until the state has finished executing but would like to avoid this if possible.
Solved! Go to Solution.
07-05-2022 09:19 AM - edited 07-05-2022 09:26 AM
You could use an event structure.
You might even look at the Template for A Producer- Consumer loop (Events) vi
Your entire vi makes no sense and could have the equivalent code fit on a postage stamp.
07-05-2022 09:45 AM - edited 07-05-2022 05:56 PM
@OA1 wrote:
Is it possible to read the same value in the enum twice by a mouse click if it is already selected in the list?
You have some confusing statements, but if the user is supposed to be able to select the same entry twice in a row, why not add a new enum item that does nothing and set it to that after each read?
Here's how that could look like.
Sorry, I am very confused about the rest of your code. Seems very convoluted, but I am sure there is more to it in the full program. 😄
07-06-2022 02:05 AM
Hi Altenbach,
I admit I didn't explain myself well but you understood the jist of what I was trying to say. Your solution is nice and simple. I will implement it, thanks.