08-15-2010 05:02 AM
hi all,
In my project,I write a TEST.vi to test one UUT, and set the TEST.vi to be reentrant. So I can test many UUTs at the same time.Generally I have 8 or 16 UUTs online.
During the test,there is a promotion to operator to power-off the UUT and power-on again. But if I place a dialog in TEST.vi,there will be many dialogs popup.
How to popup only one dialog, and all UUTs' TEST.vi instances wait for the dialog to be confirmed?
Thanks.
Solved! Go to Solution.
08-15-2010 09:38 AM
Here is how I'd do based on some advanced concepts:
* A global dialog vi with event structure, using a state machine might be useful.
* A user event is used to send the pop-up message to the dialog vi (this might contain the data which UUT number to power-off and -on)
* A notifier is used to broadcast the pause and resume messages to the other UUTs
* When the user event is triggered, the dialog vi sends tthe pause notification to all UUT vi's and shows it's FP (using invoke node)
* When the dialog is confirmed, the dialog vi closes it's FP and sends the resume notification
* The UUT vi's are state machines that periodically check (poll) for the notifier if there is a pause notification, if so, they go to the pause state.
* In the pause state, they check for the resume notification (might be enough to use wait for notification instead of polling, as they don't need to do something in the meantime
Felix
08-23-2010 05:44 AM
Many thanks to Felix.
At your suggestion,I Create a queue to send popup message to the dialog vi.
A while loop in MAIN.vi to periodically check (poll) the message in the queue sended by UUTs. This While loop is activated by an Occurrence generated by MAIN.vi.
UUTs Wait on another Occurrence after sending popup message like pause state.
If all UUTs send messages, MAIN.vi pop-up a dialog and Set Occurrence.So all UUTs continue.
F. Schubert 已写:
Here is how I'd do based on some advanced concepts:
* A global dialog vi with event structure, using a state machine might be useful.
* A user event is used to send the pop-up message to the dialog vi (this might contain the data which UUT number to power-off and -on)
* A notifier is used to broadcast the pause and resume messages to the other UUTs
* When the user event is triggered, the dialog vi sends tthe pause notification to all UUT vi's and shows it's FP (using invoke node)
* When the dialog is confirmed, the dialog vi closes it's FP and sends the resume notification
* The UUT vi's are state machines that periodically check (poll) for the notifier if there is a pause notification, if so, they go to the pause state.
* In the pause state, they check for the resume notification (might be enough to use wait for notification instead of polling, as they don't need to do something in the meantime
Felix