LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

state machine - wait in user input before going to next state

Solved!
Go to solution

I think everyone will get the idea. But you could change which solution is more appropriate. I think it is under options next to the post.

 

Click "Not the solution" under options then select the correct one.

=====================
LabVIEW 2012


0 Kudos
Message 11 of 15
(972 Views)

Anyone any idea why one of my states wont execute.

This sequence is:

Initialise System

Charge system

Then try and go to “agitate sample”

 

For some reason it just replays its current state, however, im sure i have it set up so it should be going to the “agitate state”

 

I don’t yet have the abort configured, so don’t pay any attention to that.

 

Many thanks

0 Kudos
Message 12 of 15
(954 Views)

The Agitate Sample local is hooked to the third input in the Build Array in the Charging Complete state.  when converted to numeric that bit has a value of 4.  If only one button (or none) is pressed at a time, the possible inputs to the case selector are 0, 1, 2, 4.

 

It is better to connect signals by wire rather than using local variables.  Learn about Event Structures for handling the buttons and perhaps a Producer/Consumer architecture.

 

Lynn

0 Kudos
Message 13 of 15
(944 Views)

Ah thanks for that, so for argument sake, i pressume if i had another button in the structure, it would need to address frame 8 of the structure?

 

Thanks again.;

0 Kudos
Message 14 of 15
(941 Views)

Yes.  The booleans act as binary bits so the counting is in binary.

 

Put a probe on the wire to the selector and watch the values change as you push buttons.

 

Lynn

0 Kudos
Message 15 of 15
(937 Views)