LabVIEW Course - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

LabVIEW Course

Description:

Always create a black and white icon. Creating the Connector ... option in the Functions palette or dragging the icon onto a new diagram ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 27
Provided by: crystaldr
Category:
Tags: labview | course | icon

less

Transcript and Presenter's Notes

Title: LabVIEW Course


1
LabVIEW Course
2
Week 2 Part ACreating a SubVI
You Will Learn
A. What a SubVI is B. How to create the icon and
connector C. How to use a VI as a subVI D. How to
use the Create SubVI menu option
3
SubVIs
Means of using a VI in the block diagram of a
higher-level VI Requires icon and connector
4
SubVI Example Calculating Slope
5
Creating the Icon
  • Right-click in the icon pane (Panel or Diagram)
  • Always create a black and white icon

6
Creating the Connector
Right-click in the icon pane (Panel only)
7
Creating the Connector - cont.
Click
8
The Connector Pane
  • The terminal colors match the data types to which
    they are connected
  • Click on the terminal to see its associated front
    panel object

9
Using the VI as a SubVI
  • Changes made to subVI saved in memory until saved
    to disk
  • Calling subVIs
  • FunctionsSelect a VI
  • OR
  • Drag icon onto target diagram

10
Help and Classifying Terminals
  • Context Help for subVIs

Classify inputs and outputs How displayed in
Context Help Window Required - Bold label
Recommended - Normal text Optional - Visible
or wire stubs shown
11
Documenting the VI
  • Document VIs - VI PropertiesDocumentation
  • Document objects - Description and Tip...

VI Documentation
Description and Tip
12
The Create SubVI Option
  • Enclose area to be converted into a subVI
  • Select Create SubVI from the Edit Menu

13
Summary
  • VIs can be used as subVIs after you make the icon
    and connector
  • Icon created using Icon Editor
  • Connector defined by choosing number of terminals
  • Load subVIs using the Select a VI... option in
    the Functions palette or dragging the icon onto a
    new diagram
  • Online help for subVIs using the Show Context
    Help option
  • Descriptions document functionality
  • Use Create SubVI feature to easily modularize the
    block diagram

14
Week 2 Part BLoops and Charts
You Will Learn
A. About While Loops B. About waveform
charts C. How to use shift registers D. About For
Loops
15
While Loop
2. Enclose code to be repeated
1. Select While Loop
3. Drop or drag additional nodes and then wire
Do (Execute diagram inside
Loop) While Condition is TRUE
16
Select the Loop Condition
  • Right-click on Conditional Terminal to define
    when the loop stops

Iteration Terminal
Conditional Terminal
17
Waveform Charts
Selected from the ControlsGraph subpalette
18
Wiring to Charts
Single-Plot Chart Multiple-Plot Chart
19
Mechanical Action of Booleans
  • Switch action Control is toggled until changed
    by hand
  • Latch action Control reverts to default state
    when read by diagram

20
Modifying Numeric Controls Indicators
  • Setting the data range
  • Setting the digits of precision

21
Shift Registers
Available at left or right border of loop
structures Right-click on border and select Add
Shift Register Right terminal stores data on
completion of iteration Left terminal provides
stored data at beginning of next iteration
22
Additional Shift Register Elements
Previous values are available at the left
terminals
Right-click on left terminal to add new elements
Right-click on the border for a new shift register
Latest value is passed to right terminal
1 loop ago 2 loops ago 3 loops ago
23
Initializing Shift Registers
Initialized
Uninitialized
RUN 1
Initial Value 5
Initial Value 0
RUN 2
Initial Value 5
Initial Value 8
24
Customizing Charts and Graphs
  • Plot Legend (color, point style, line style,
    etc.)
  • Digital Display
  • Scrollbar
  • Customize the
  • X and Y Axes
  • Graph Palette
  • Scale Legend

25
For Loop
In Structures subpalette of Functions
palette Enclose code to be repeated and/or
resize and add nodes inside boundary Executes
diagram inside of loop a predetermined number of
times Shift registers can be created at the
border
26
Numeric Conversion
  • Numeric defaults to double precision (8 bytes) or
    long integer (4 bytes)
  • LabVIEW automatically converts to different
    representations
  • Gray coercion dot on terminal indicates conversion

27
Summary
  • Two structures to repeat execution
  • While Loop
  • For Loop
  • Loop timing controlled using Wait Until Next ms
    Multiple function
  • Three modes of waveform charts
  • Strip chart
  • Scope chart
  • Sweep chart
  • Charts can be customized right-click on chart
    for menus
  • Shift registers transfer data values from one
    iteration to the next
  • Adapt to any data type
  • Additional left terminals may be added to
    access previous
  • iteration
Write a Comment
User Comments (0)
About PowerShow.com