labview How to create a VI Snippet in LabVIEW and post in a question.


Number 1Numeric Control
Number 2Numeric Control
SumNumeric Indicator

Create VI snippet from Block Diagram

VI snippets are like Screenshots of a Block Diagram, with one important difference. They can be opened in LabVIEW to reconstruct the orginal program. They are saved in the common .PNG format so they can be used like normal pictures e.g. in forums and on StackOverflow.

To create a VI snippet mark the important part of your Block Diagram and hit "Edit → Create VI Snippet from Selection". Then choose where you want to save it. The VI Snippet has a border and a icon to indicate that you can drag them into LabVIEW to add the code to your Block Diagram.

This is what a simple VI snippet looks like:

Simple VI Snippet

Snippet VI for summation of two numbers

Creating summation is quite easy in 3 steps

  1. On front panel, Add 2 numeric controls (number 1 and Number 2) and 1 numeric indicator (sum).

enter image description here

  1. Switch to block diagram(using CTRL+E) and connect Add block from numeric palette. Wire it to both numeric controls and sum indicator created in step 1. Eventually select all blocks by mouse (or by using keyboard CTRL+A . enter image description here
  2. Go to Edit menu, select "create VI snippet from selection". Save yoursnippetname.png to any location.

enter image description here enter image description here

  1. You can use snippet by dragging the image to block diagram

enter image description here