LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

State Machine and producer consumer design patterns

Hi!

In my application I am using state machine(for top level VI) and producer consumer(for subVIs) design patterns throught out.
If there is no activity on the front panel for 1min then the ideal state is invoked. Following are the situation of the ideal state:
1. It checks for any hardware present on the network . If no hardware is found on the network within 1 min then the application and LabVIEW exits.
2. While the ideal state checks for the hardware, and user clicks on any front panel button then it should exit the ideal state. The control
should be in the respective button state.

I am able to achive the point#1 mentioned above but could not get the point #2 to work. I am including the snap shot of
the state machine(default case) and prouducer consumer(deafualt state).

Each screen has the concept of the ideal state. The only additional step in the subVIs is that when the ideal state is reached and the time has expired then it will close the subVIfront panel.It will go to the exit state of the Main(top level) VI. Thus closing the application and quitting LabVIEW.

The application is designed for PDA using LabVIEW 7.1.

Any ideas or suggestions. Will multithreading and notifiers help?

TIA
Rachana
0 Kudos
Message 1 of 2
(3,039 Views)
Hi Rachana,

I was thinking about using event structures wherein there would an event case that would handle any value change event for any of the buttons on the front panel. But before suggesting that, I would need to know more about the Ideal State subvi( more specifically, how is it checking for any hardware present on the network and where is the one minute wait coming from?).

Please feel free to respond to this post with your questions/comments.

Regards,
Ankita A.
0 Kudos
Message 2 of 2
(3,038 Views)