LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure in case structure in while loop with shift registers

Hi, any words of wisdom on how to get multiple event structures in case structures to work would be appreciated.. maybe event structures isn't the way to go?

 

the program is a game. i got abit carried away after the initial event structure worked and added more event structures in follwing case structure loops. but that evidently doesn't work?

 

the 1st event structure in case structure 6 waits for player 1 to change a value in the boleen button array.

 

the 2nd event structure in case structure 10 waits for player 2 to change a value in the boleen button array 2

 

please find my program attached. any words of wisdom appreciated. thanks

 

...apoligies the program attached a minute ago was wrong. here it is corrected.

0 Kudos
Message 1 of 3
(2,674 Views)

You should never hide event structures inside case structures. Use one while loop with an single event structure to deal with user interactions. Event structures will queue up events even if they are not in the dataflow.

 

All you need is a simple state machine that filters user interaction according to the program state.

 

What is the point of the outer sequence structure?

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

Ok, thanks, i will read up on state machines. any specific examples you could maybe point me too?

and theres no point to the outer sequence structure, it's a remnant of past experimentation. i need to delete it..

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