08-13-2018 11:59 AM
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..
Solved! Go to Solution.
08-13-2018 12:03 PM
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.
08-13-2018 12:04 PM
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.
08-13-2018 12:12 PM
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?
08-13-2018 12:15 PM
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.
08-13-2018 12:24 PM
Thanks..if its acceptable I'll not accept this as a solution until I get a chance to try the VIPM.
08-13-2018 12:29 PM
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.
08-13-2018 12:35 PM
thanks..
08-16-2018 08:57 AM
This worked..thanks.