LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to popup only ONE dialog in many reentrant vis

Solved!
Go to solution

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.
   

----
czhen
Win 10 & LabVIEW 2014 SP1
0 Kudos
Message 1 of 3
(2,516 Views)
Solution
Accepted by topic author czhen

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

0 Kudos
Message 2 of 3
(2,506 Views)

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


 

----
czhen
Win 10 & LabVIEW 2014 SP1
0 Kudos
Message 3 of 3
(2,443 Views)