creating, editing, & debugging a vi a.how to create vis b.how to edit vis c.how to debug vis you...

11
Creating, Editing, & Debugging a VI A. How to Create VIs B. How to Edit VIs C. How to Debug VIs You Will Learn:

Upload: sheena-armstrong

Post on 01-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:

Creating, Editing, & Debugging a VI

A. How to Create VIs

B. How to Edit VIs

C. How to Debug VIs

You Will Learn:

Page 2: Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:

• Numeric controls and indicators• Boolean controls and indicators• Configuring controls and indicators

– Use shortcut menus– Parts have different menus

DigitalControl

DigitalIndicator

Labels

Increment Buttons Boolean

Control BooleanIndicator

Creating a VI Front Panel

Page 3: Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:

Accessing Shortcut Menus

Right-click on the label for its shortcut menu Right-click on the digital

display for its shortcut menu

Page 4: Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:

Terminal pattern for theAdd Function and theSubtract function (three node terminals).

NodesWires

ControlTerminals

Diagram Window

Panel Window

Indicator Terminals

Creating a VI Block Diagram

Page 5: Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:

Wiring a VI Block Diagram

Hot Spot

Tools to Help Wiring

- Automatic Wiring

Scalar 1D Array

Numeric

Boolean

String

Orange (floating point)Blue ( integer)

Green

Purple

2D Array

Page 6: Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:

• Block diagram does NOT execute left to right

• Node executes when data is available to ALL input terminals

• Nodes supply data to all output terminals when done

Dataflow Programming

Page 7: Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:

Searching for Controls, VIs, and Functions

Use the buttons on top of the Controls and Functions palettes to navigate and search for specific controls, VIs, and functions.

Press the search button to perform text searches of the palettes.

Page 8: Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:

Debugging Techniques

• Finding Errors

• Execution Highlighting

• Probe

Click on broken Run buttonWindow showing error appears

Click on Execution Highlighting button; data flow is animated using bubbles. Values are displayed on wires.

Right-click on wire to display probe and it shows data as it flows through wire segment

You can also select Probe tool from Tools palette and click on wire

Page 9: Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:

Debugging Techniques

• Breakpoints

• Step Into, Over, and Out buttons for Single Stepping

Click on Step Into button to enable single steppingOnce Single Stepping has begun, the button steps into nodes

Click on Step Over button to enable single stepping or to step over nodes

Click on Step Out button to step out of nodes

Select Breakpoint tool from Tools palette and click on wire or node where you want execution to pause

Page 10: Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:

Summary

• You place controls (inputs) and indicators (outputs) in the panel window

• Use the Operating tool to manipulate panel objects. Use the Positioning tool to select, move, and resize panel objects. Use the Wiring tool to connect diagram objects

• Control terminals have thicker borders than indicator terminals

• All LabVIEW objects have shortcut menus

• Wiring is the mechanism to control dataflow and produce LabVIEW programs

• Broken Run arrow = nonexecutable VI

• Various debugging tools and options available such as setting probes and breakpoints, execution highlighting, and single stepping

Page 11: Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:

Tips• Tip 1 – Command key shortcuts

• Tip 2 – Accessing Tools Palette with <shift>-right-click

• Tip 3 – Tools»Options selection - set preferences in LabVIEW

<Ctrl-R> Run a VI<Ctrl-F> Find object<Ctrl-H> Activate Context Help window<Ctrl-B> Remove all broken wires<Ctrl-W> Close the active window<Ctrl-E> Toggle between Diagram/Panel Window