Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs Read Bishop,...

25
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs Read Bishop, Chapter 3. Lab #3 and Homework #3 due next week. Quiz #2 next week.

Transcript of Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs Read Bishop,...

Page 1: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

EET 2259 Unit 3Editing and Debugging VIs

Read Bishop, Chapter 3.

Lab #3 and Homework #3 due next week.

Quiz #2 next week.

Page 2: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Editing Techniques

Editing techniques include Creating controls & indicators on block diagram Selecting objects Moving objects Deleting objects Duplicating objects Resizing objects Labeling objects Changing text font, style, size, color Working with wires Aligning, distributing, and resizing objects Coloring objects Cleaning up the block diagram

(Bishop, pp. 112-140)

Page 3: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Creating Controls & Indicators From the Block Diagram

After placing a function or subVI on block diagram, right-click on one of its terminals and select Create > Control or Create > Indicator.

This adds a control or indicator to the front panel and automatically wires it on the block diagram.

(Bishop, p. 112)

Page 4: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Tools Palette

Operating Tool

Positioning/Resizing Tool

Labeling Tool

Wiring Tool

Shortcut Menu Tool

• Lets you operate and modify objects on front panel or block diagram.

Scrolling Tool

Breakpoint Tool

Probe Tool

Color Copy Tool

Coloring Tool

Automatic Selection Tool

(Bishop, p. 23)

Page 5: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Selecting Objects

To move, delete, or copy an object on the front panel or block diagram, you must first select the object.

The easiest way to select an object or objects is to drag a box around them.

You can also select an object by clicking it with the positioning tool, and you can select multiple objects by shift-clicking.

(Bishop, p. 114)

Page 6: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Moving Objects

After selecting an object or objects, move by dragging with the mouse or using the arrow keys.

(Bishop, p. 116)

Page 7: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Deleting Objects

After selecting an object or objects, delete by pressing Delete or Backspace key, or by Edit > Clear on pull-down menus.

(Bishop, p. 117)

If you make a mistake, you can undo your last step by using Edit > Undo or pressing Ctrl+Z.

Page 8: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Duplicating Objects

After selecting an object or objects, duplicate by Edit > Copy and Edit > Paste on pull-down menus (or use Ctrl+C and Ctrl+V shortcut keys).

(Bishop, p. 117)

Page 9: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Resizing Objects

To resize an object on the front panel, drag the blue resize handles that appear when you move the positioning tool over the object.

Most block-diagram objects cannot be resized.

(Bishop, p. 117)

Page 10: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Labels

There are two kinds of labels: free labels and owned labels.

Create a free label by using the labeling tool on the tools palette or by double-clicking on blank area of front panel or block diagram.

Show or hide an object’s owned label by using short-cut menu’s Visible Items > Label.

Edit any label by double-clicking.(Bishop, p. 119)

Page 11: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Changing Text Font, Style, Size, Color

Use the Text Settings drop-down box on the toolbar to change text appearance. (Similar to word processors.)

You can change text appearance on the front panel or on the block diagram.

(Bishop, p. 120)

Page 12: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Working with Wires

Wiring “Hot Spot”

Clean Up Wiring

Click To Select Wires

(Bishop, pp. 122-127)

Page 13: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Broken Wires

Remove a single broken wire by selecting the wire and pressing the Delete key, or by right-clicking the wire and selecting Delete Wire Branch.

Remove all broken wires by using Edit > Remove Broken Wires pull-down menu (or Ctrl+B shortcut key).

(Bishop, p. 125)

Page 14: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

After selecting two or more front-panel objects, use buttons on the toolbar to align them with each other, space them evenly apart, or make them all the same size.

(Bishop, p. 128)

The block diagram’s toolbar has Align and Distribute buttons, but not a Resize button.

Aligning, Distributing, and Resizing Objects

Align Distribute Resize

Page 15: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Coloring Objects

Use the coloring tool on the tools palette to change colors of objects.

For many front-panel objects, you can also change the color by choosing Properties on the object’s shortcut menu.

(Bishop, p. 130)

Page 16: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Cleaning Up the Block Diagram

This feature will automatically rearrange your block diagram and reroute the wires to make everything look clean and well-ordered.

On the block diagram pull-down menu, click Edit > Clean Up Diagram; or you can just press CTRL+U; or you can just click the Clean Up button:

(Bishop, p. 137)

Page 17: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Debugging Techniques

Debugging techniques include Using Broken Run button to find errors Execution highlighting Single-stepping Breakpoints Probes

(Bishop, pp. 141-152)

Page 18: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Broken Run Button

When the block diagram contains an error that prevents the VI from running, the Broken Run button appears in place of the normal Run button.

(Bishop, p. 142)

Click on Broken Run button to open window listing errors.

Page 19: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Execution Highlighting

To monitor the execution of the block diagram, click Highlight Execution button on block diagram’s toolbar and then run the VI.

(Bishop, p. 144)

Click on Highlight Execution button; dataflow is animated using bubbles. Values are displayed on wires.

Page 20: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Single-Stepping

To execute block diagram one node at a time, use one of the single-stepping buttons on block diagram’s toolbar.

(Bishop, p. 146)

Step Into button executes current node. If currentnode is a subVI, its first step is executed.

Step Over button executes current node. If currentnode is a subVI, entire subVI is executed.

Step Out button executes until current subVI (orentire program) finishes.

Page 21: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Execution Highlighting and Single-Stepping

Usually when you single-step, you’ll also want to have execution highlighting turned on so that you can see the effect of each step.

(Bishop, p. 146)

Page 22: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Breakpoints

Set a breakpoint in block diagram by using Breakpoint tool on tools palette or by right-clicking on an object.

When you run VI, execution will stop when it reaches the breakpoint.

(Bishop, p. 147)

Page 23: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Probes

Place a probe in block diagram by using Probe tool on tools palette or by right-clicking on wire.

When you run VI, window displays value at the point where the probe is placed.

(Bishop, p. 148)

Page 24: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Property Nodes

Property nodes are block-diagram objects that let you read or set the properties of front-panel objects.

To create a property node, right-click a front-panel objects and then select Create > Property Node.

(Bishop, p. 153) Property nodes are powerful, advanced

features that will become more valuable to you as you gain more LabVIEW experience.

Page 25: Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.

Floyd, Digital Fundamentals, 10th ed

Some Shortcut Keys

Ctrl+B removes broken wires. Ctrl+E switches between front panel & block

diagram. Ctrl+T tiles front panel & block diagram side by

side. Ctrl+H turns help window on or off. Ctrl+U cleans up the block diagram. Plus standard Windows shortcuts:

Ctrl+O to open file. Ctrl+S to save file. Ctrl+C to copy. Ctrl+V to paste. Ctrl+Z to undo. (Bishop, p. 155)