Non-Blocking Dialog Box Using Queues
Downloads
Filename: nonblockingdialogbox.vi
Requirements: View
The most efficient and robust way to create a non-blocking dialog box is to utilize a queued producer/consumer architecture. In the producer loop, a dialog message is enqueued. In the consumer loop, the dialog message is dequeued and sent to the One Button Dialog VI. This enables the code in the producer loop to continue executing while the consumer loop is paused, waiting for the user to press the OK button.
This VI shows how to create a Non-Blocking Dialog Box with
a producer/consumer architecture using queues.
Directions:
1) Run the VI and watch the current time elapse
2) Select Blocking and press Display Dialog Box.
- Notice how the current time stops updating. Click OK.
3) Select Non-Blocking and press Display Dialog Box.
- Notice how the current time continues to elapse.
4) Press Stop to stop the VI.
| Related Links: |
| KnowledgeBase DIRECT-3S8RDE: What Is a Queue? |
| Developer Zone Tutorial: Application Design Patterns: Producer/Consumer |
Requirements
Filename: nonblockingdialogbox.vi
Software Requirements
Application Software: LabVIEW Full Development System 7.0
Language(s): LabVIEW
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
