<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="None">
  <name>Icons and Connector Panes</name>
  <metadata>
  <md:version>1.1</md:version>
  <md:created>2004/06/14 16:28:31 GMT-5</md:created>
  <md:revised>2004/07/16 14:57:32.846 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="NationalInstruments">
      <md:firstname>National</md:firstname>
      
      <md:surname>Instruments</md:surname>
      <md:email>certification@ni.com</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="lizzardg">
      <md:firstname>Elizabeth</md:firstname>
      
      <md:surname>Gregory</md:surname>
      <md:email>lizzardg@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="mshiralkar05">
      <md:firstname>Malan</md:firstname>
      
      <md:surname>Shiralkar</md:surname>
      <md:email>mshiralkar05@hotmail.com</md:email>
    </md:maintainer>
    <md:maintainer id="harika">
      <md:firstname>Harika</md:firstname>
      
      <md:surname>Basana</md:surname>
      <md:email>ilsai@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="NationalInstruments">
      <md:firstname>National</md:firstname>
      
      <md:surname>Instruments</md:surname>
      <md:email>certification@ni.com</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  

  <md:abstract/>
</metadata>
  
  <content>
    <para id="intro">
      After you build a VI front panel and block diagram, build the
      icon and the connector pane so you can use the VI as a subVI.
    </para>
    
    <section>
      <name>Creating an Icon</name>
      <para id="p1">
	<media id="m1" type="image/png" src="vi_icon.png"/> Every VI
	displays an icon, shown in <cnxn target="m1"/>, in the upper
	right corner of the front panel and block diagram windows. An
	icon is a graphical representation of a VI. It can contain
	text, images, or a combination of both. If you use a VI as a
	subVI, the icon identifies the subVI on the block diagram of
	the VI.
      </para>

      <para id="p2">
	The default icon contains a number that indicates how many new
	VIs you have opened since launching LabVIEW. Create custom
	icons to replace the default icon by right-clicking the icon
	in the upper right corner of the front panel or block diagram
	and selecting <code>Edit Icon</code> from the shortcut menu or
	double-clicking the icon in the upper right corner of the
	front panel. You also can edit icons by selecting <code>
	  File&gt;&gt;VI Properties </code> selecting <code> General </code>
	from the <code> Category </code> pull-down menu, and clicking
	the <code> Edit Icon </code> button.
      </para>

      <para id="p3">
	Use the tools on the left side of the <code> Icon Editor
	</code> dialog box to create the icon design in the editing
	area. The normal size image of the icon appears in the
	appropriate box to the right of the editing area, as shown in
	the dialog box in <cnxn target="f1"/>.
	<figure id="f1">
	  <media type="image/png" src="iconeditor.png"/>
	</figure>
      </para>

      <para id="p4">
	Depending on the type of monitor you use, you can design a
	separate icon for monochrome, 16-color, and 256-color
	mode. LabVIEW uses the monochrome icon for printing unless you
	have a color printer.
      </para>

      <para id="p5">
	Use the <code> Edit </code> menu to cut, copy, and paste
	images from and to the icon. When you select a portion of the
	icon and paste an image, LabVIEW resizes the image to fit into
	the selection area. You also can drag a graphic from anywhere
	in your file system and drop it in the upper right corner of
	the front panel or block diagram. LabVIEW converts the graphic
	to a 
	<m:math>
	  <m:apply>
	    <m:cartesianproduct/>
	    <m:cn>32</m:cn>
	    <m:cn>32</m:cn>
	  </m:apply>
	</m:math> pixel icon.
      </para>

      <para id="p6">
	Use the <code> Copy from </code> option on the right side of
	the <code> Icon Editor </code> dialog box to copy from a color
	icon to a black-and-white icon and vice versa. After you
	select a <code> Copy from </code> option, click the <code> OK
	</code> button to complete the change.

	<note>
	  If you do not draw a complete border around a VI icon, the
	  icon background appears transparent. When you select the
	  icon on the block diagram, a selection marquee appears
	  around each individual graphic element in the icon.
	</note>
      </para>

      <para id="p7">
	Use the tools on the left side of the <code> Icon Editor
	</code> dialog box to create the icon design in the editing
	area. The normal size image of the icon appears in the
	appropriate box to the right of the editing area. The
	following tasks can be performed with these tools:
	<list id="l1">

	  <item>
	    <media type="image/png" src="pencil.png"/> Use the
	    <code>Pencil</code> tool to draw and erase pixel by pixel.
	  </item>

	  <item>
	    <media type="image/png" src="line.png"/> Use the
	    <code>Line</code> tool to draw straight lines. To draw
	    horizontal, vertical, and diagonal lines, press the
	    <code>&lt;Shift&gt;</code> key while you use this tool to
	    drag the cursor.
	  </item>

	  <item>
	    <media type="image/png" src="colorcpy.png"/> Use the
	    <code>Color Copy</code> tool to copy the foreground color
	    from an element in the icon.
	  </item>

	  <item>
	    <media type="image/png" src="fill.png"/> Use the
	    <code>Fill</code> tool to fill an outlined area with the
	    foreground color.
	  </item>

	  <item>
	    <media type="image/png" src="rect.png"/> Use the
	    <code>Rectangle</code> tool to draw a rectangular border
	    in the foreground color. Double-click this tool to frame
	    the icon in the foreground color.
	  </item>

	  <item>
	    <media type="image/png" src="fillrect.png"/> Use the
	    <code>Filled Rectangle</code> tool to draw a rectangle
	    with a foreground color frame and filled with the
	    background color. Double-click this tool to frame the icon
	    in the foreground color and fill it with the background
	    color.
	  </item>

	  <item>
	    <media type="image/png" src="select.png"/> Use the
	    <code>Select</code> tool to select an area of the icon to
	    cut, copy, move, or make other changes. Double-click this
	    tool and press the <code>&lt;Delete&gt;</code> key to delete
	    the entire icon.
	  </item>

	  <item>
	    <media type="image/png" src="text.png"/> Use the
	    <code>Text</code> tool to enter text into the
	    icon. Double-click this tool to select a different
	    font. <code> (<code>Windows</code>) </code> The <code>
	      Small Fonts </code> option works well in icons.
	  </item>

	  <item>
	    <media type="image/png" src="frbkgrnd.png"/> Use the
	    <code>Foreground/Background</code> tool to display the
	    current foreground and background colors. Click each
	    rectangle to display a color palette from which you can
	    select new colors.
	  </item>

	  <item>
	    Use the options on the right side of the editing area to
	    perform the following tasks:

	    <list id="sublist" type="named-item">
	      <item>
		<name> Show Terminals </name> 
		Displays the terminal pattern of the connector pane.
	      </item>
	      <item> 
		<name> OK </name> 
		Saves the drawing as the icon and returns to the front
		panel.  
	      </item> 
	      <item> 
		<name> Cancel </name> 
		Returns to the front panel without saving any
		changes.
	      </item>
	    </list>

	  </item>

	  <item>
	    The menu bar in the <code> Icon Editor </code> dialog box
	    contains more editing options such as <code> Undo, Redo,
	      Cut, Copy, Paste </code>, and <code> Clear </code>.
	  </item>
	</list>

      </para>
    </section>

    <section>
      <name>Setting Up the Connector Pane</name>

      <para id="p8">
	<media id="m2" type="image/png" src="conpane.png"/> To use a
	VI as a subVI, you need to build a <term>connector
	  pane</term>, shown in <cnxn target="m2"/>. The connector pane
	is a set of terminals that corresponds to the controls and
	indicators of that VI, similar to the parameter list of a
	function call in text-based programming languages. The
	connector pane defines the inputs and outputs you can wire to
	the VI so you can use it as a subVI.
      </para>

      <para id="p9">
	Define connections by assigning a front panel control or
	indicator to each of the connector pane terminals. To define a
	connector pane, right-click the icon in the upper right corner
	of the front panel window and select <code> Show Connector
	</code> from the shortcut menu. The connector pane replaces
	the icon. Each rectangle on the connector pane represents a
	terminal. Use the rectangles to assign inputs and outputs. The
	number of terminals LabVIEW displays on the connector pane
	depends on the number of controls and indicators on the front
	panel. The following front panel has four controls and one
	indicator, so LabVIEW displays four input terminals and one
	output terminal on the connector pane.

	<figure>
	  <media type="image/png" src="slopefp.png"/>
	</figure>

      </para>
    </section>

    <section>
      <name>Selecting and Modifying Terminal Patterns</name>
      <para id="p21">
	Select a different terminal pattern for a VI by right-clicking
	the connector pane and selecting <code> Patterns </code> from
	the shortcut menu. Select a connector pane pattern with extra
	terminals. You can leave the extra terminals unconnected until
	you need them. This flexibility enables you to make changes
	with minimal effect on the hierarchy of the VIs. You also can
	have more front panel controls or indicators than terminals.

      </para>

      <para id="p22">
	A solid border highlights the pattern currently associated
	with the icon. The maximum number of terminals available for a
	subVI is 28.
      </para>


      <para id="p23">
	<media id="m3" type="image/png" src="standpatt.png"/> The most
	commonly used pattern is shown in <cnxn target="m3"/>. This
	pattern is used as a standard to assist in simplifying
	wiring. The top inputs and outputs are commonly used for
	passing references and the bottom inputs and outputs are used
	for error handling. Refer to the section on <cnxn document="m12231">Clusters</cnxn> for more information about error
	handling.

	<note>Try not to assign more than 16 terminals to a VI. Too
	  many terminals can reduce the readability and usability of the
	  VI.
	</note>
      </para>

      <para id="p24">
	To change the spatial arrangement of the connector pane
	patterns, right-click the connector pane and select <code>
	  Flip Horizontal, Flip Vertical, or Rotate 90 Degrees </code>
	from the shortcut menu.

      </para>
    </section>

    <section>
      <name>Assigning Terminals to Controls and Indicators</name>

      <para id="p31">
	After you select a pattern to use for the connector pane, you
	must define connections by assigning a front panel control or
	indicator to each of the connector pane terminals. When you
	link controls and indicators to the connector pane, place
	inputs on the left and outputs on the right to prevent
	complicated, unclear wiring patterns in your VIs.
      </para>

      <para id="p34">
	To assign a terminal to a front panel control or indicator,
	click a terminal of the connector pane, then click the front
	panel control or indicator you want to assign to that
	terminal. Click an open space on the front panel. The terminal
	changes to the data type color of the control to indicate that
	you connected the terminal.

      </para>
      <para id="p33">
	You also can select the control or indicator first and then
	select the terminal.

      </para>
      <note>Although you use the <code>Wiring</code> tool to assign
	terminals on the connector pane to front panel controls and
	indicators, no wires are drawn between the connector pane and
	these controls and indicators.
      </note>

    </section>
  </content>
  
</document>
