Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Creating VIs from Templates

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

The built-in VI templates include the subVIs, functions, structures, and front panel objects you need to get started building common measurement applications. VI templates open as untitled VIs that you must save. Select File»New to display the New dialog box, which lists the built-in template VIs. You also can display the New dialog box by selecting the New, VI from Template, or More options on the Getting Started window.

Application design patterns represent LabVIEW architectures and techniques that are solutions to specific problems in software design. The design patterns are available in the VI»From Template»Frameworks category under Design Patterns.

  • User Interface Event Handler—Use this template to build a user interface event handler design pattern. Use this pattern for dialog boxes and other user interfaces in which code executes in response to user actions. You also can create and execute user-defined events that the VI can handle the same way as user interface events.
  • Standard State Machine—Use this template to build a standard state machine design pattern. Each state executes code and determines which state to transition to. Contrast this design pattern with the user interface event pattern, in which code executes in response to user actions. Contrast this design pattern also with the queued message handler pattern, in which each message handling code can queue any number of messages.
  • Queued Message Handler—Use this template to build a queued message handler design pattern, in which each message handling code can queue any number of new messages.
  • Producer/Consumer Design Pattern (Events)—Use this template to build a producer/consumer design pattern with events to produce queue items. Use this design pattern instead of the user interface event handler pattern for user interfaces when you want to execute code asynchronously in response to an event without slowing the user interface responsiveness.
  • Producer/Consumer Design Pattern (Data)—Use this template to build a producer/consumer design pattern. Use this template when you need to execute a process, such as data analysis, when a data source, such as a triggered acquisition, produces data at an uneven rate and you need to execute the process when the data becomes available.
  • Master/Slave Design Pattern—Use this template to build a master/slave design pattern. The master loop always executes. It notifies one or more slave loops to execute their code. The slave loop or loops continue executing until they complete, then wait for another notification. Contrast this with the producer/consumer pattern in which the consumer loops execute only when they have data in their queue.

Refer to the LabVIEW Zone for more information about application design patterns.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit