LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Enumerated constants/Statemachines/Event structures

Solved!
Go to solution

I'm trying to create a font panel GUI that has 10 buttons each of which selects a different test to run.  I tried the Event Structure so that when the user hit a test button ( value change) that particular enum/statemachine executed.  The problem is that i want to be constantly monitoring say the power supplies ( via a vi I wrote) when no button is hit.  I found that when nothing is happening LabVIEW via Event Structure isn't doing anything except waiting for a value change so my power supplies don't get monitored.  The power supply vi isn't run.  Am I missing an attribute in Event Structure that i could be using to get this to happen or is there another way to get a statemachine to execute when a particular button on the main GUI is selected?

 

Can't post what I've tried so far because of proprietary reasons..

 

Thanks..

0 Kudos
Message 1 of 9
(2,366 Views)
Solution
Accepted by topic author Clint1000

You can use the Timeout case to specify "if nothing happens after X seconds, do this instead".

 

If you need constant monitoring you should look into a secondary loop that does your monitoring. If you use a Timeout structure then it WON'T execute when a user clicks a button. This may be OK or it might not, it depends on what you need to happen.

0 Kudos
Message 2 of 9
(2,362 Views)

I'd recommend taking a look at the JKI state machine.

It is a state machine which incorporates an Event Structure which operates in the Idle state.

Event Structure does not equal State Machine. An Event Structure can be incorporated into a state machine.

0 Kudos
Message 3 of 9
(2,360 Views)

So the JKI StateM is new to me and searches produced this:

https://forums.ni.com/t5/LabVIEW/The-JKI-State-Machine-makes-it-s-public-debut/m-p/792077

It looks like a download and my machine is stand alone.  Any other way of getting it?  Does it come w LV2014?

0 Kudos
Message 4 of 9
(2,352 Views)

I'd also recommend exploring the world of the VIPM (VI Package Manager). It's the simplest way of getting the JKI State Machine and other toolkits related to LabVIEW which can come in handy. I believe VIPM might actually be shipping with newer versions of LabVIEW. Don't recall whether it was easily accessible from LabVIEW 2014 or not.

0 Kudos
Message 5 of 9
(2,346 Views)

Thanks..if its acceptable I'll not accept this as a solution until I get a chance to try the VIPM.

 

0 Kudos
Message 6 of 9
(2,332 Views)

I also recommend a separate look for controlling and monitoring your power supplies.  Look into the Queued Message Handler and experiment with the queue timeout for performing your monitoring actions.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 9
(2,327 Views)

thanks..

0 Kudos
Message 8 of 9
(2,324 Views)

This worked..thanks.

0 Kudos
Message 9 of 9
(2,260 Views)