Presentation is loading. Please wait.

Presentation is loading. Please wait.

Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 2 Virtual Instruments Read Bishop, Chapter 2. Lab #2 and Homework #2 due next week. Quiz #1 next week.

Similar presentations


Presentation on theme: "Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 2 Virtual Instruments Read Bishop, Chapter 2. Lab #2 and Homework #2 due next week. Quiz #1 next week."— Presentation transcript:

1 Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 2 Virtual Instruments Read Bishop, Chapter 2. Lab #2 and Homework #2 due next week. Quiz #1 next week.

2 Floyd, Digital Fundamentals, 10 th ed Virtual Instruments Remember, LabVIEW programs are called virtual instruments, or VIs for short. Recall that every VI has a front panel (user interface) and a block diagram (program code). (Bishop, p. 53)

3 Floyd, Digital Fundamentals, 10 th ed Items on Front Panel The front panel contains controls and indicators. Controls are inputs that let the user enter data, such as switches, knobs. Indicators are outputs that display data to the user, such as graphs, numeric displays. (Bishop, p. 62)

4 Floyd, Digital Fundamentals, 10 th ed Controls Palette Use the controls palette to place controls or indicators on the front panel. (Open palette by View > Controls Palette or by right-clicking a blank area on front panel.) (Bishop, p. 62)

5 Floyd, Digital Fundamentals, 10 th ed Finding Controls & Indicators On the controls palette, under Modern, the most commonly used controls and indicators are grouped into three categories: Numeric, Boolean, and String & Path.

6 Floyd, Digital Fundamentals, 10 th ed Search Button on Controls Palette Search button lets you find controls or indicators by name. (Bishop, p. 64) Search

7 Floyd, Digital Fundamentals, 10 th ed Items on Block Diagram The block diagram contains items connected by wires. Most items on the block diagram fall into one of four categories: Terminals representing front-panel controls or indicators, or constant values. Built-in functions (such as multiplication) SubVIs (A subVI is a smaller program contained within a bigger program.) Express VIs (a special type of subVI) (Bishop, pp )

8 Floyd, Digital Fundamentals, 10 th ed Distinguishing Functions from SubVIs (Part 1) On block diagrams, built-in functions have a pale yellow background, while subVIs usually have a white background (except for Express VIs, which have a blue background). (Bishop, p. 70)

9 Floyd, Digital Fundamentals, 10 th ed Distinguishing Functions from SubVIs (Part 2) When you double-click a function, nothing happens. When you double-click a standard subVI, the front panel for the subVI opens. (Remember, a subVI is a complete program with its own front panel and block diagram.) When you double-click an Express VI, a dialog box opens to let you configure it. (Bishop, p. 70)

10 Floyd, Digital Fundamentals, 10 th ed Functions, SubVIs, and Express VIs Functions: Cant be customized. Standard subVIs: You can rewire the block diagram to customize. Express VIs: You use dialog box to customize.

11 Floyd, Digital Fundamentals, 10 th ed Icons vs. Expandable Nodes Standard subVIs and Express VIs can be displayed either as icons or as expandable nodes. To change display, right-click and select (or deselect) View As Icon. (Bishop, p. 70)

12 Floyd, Digital Fundamentals, 10 th ed Example Same VI, viewed three different ways. Icon Expandable Node Expanded Node

13 Floyd, Digital Fundamentals, 10 th ed Colors for Data Types Terminals and wires are color-coded to show what type of data they carry: Blue = integer Orange = floating point number Green = Boolean (true/false) Pink = String (text) Blue & White Dashed = Dynamic (for Express VIs) Usually two terminals can be connected together by a wire only if theyre the same data type. (Bishop, p. 72)

14 Floyd, Digital Fundamentals, 10 th ed Terminals A terminal on a block diagram is a connection point for a wire. There are several kinds of terminals, including: Constants Control terminals for inputs from front panel Indicator terminals for outputs to front panel Node terminals on functions or subVIs (Bishop, p. 71)

15 Floyd, Digital Fundamentals, 10 th ed Control Terminals A control terminal has an arrow pointing out to the right. Theres a control terminal on the block diagram for each control on the front panel. On front panel, can right-click and choose Find Terminal. On block diagram, can right-click and choose Find Control. (Bishop, p. 72)

16 Floyd, Digital Fundamentals, 10 th ed Indicator Terminals An indicator terminal has an arrow pointing in from the left. Theres an indicator terminal on the block diagram for each indicator on the front panel. On front panel, can right-click and choose Find Terminal. On block diagram, can right-click and choose Find Indicator. (Bishop, p. 72)

17 Floyd, Digital Fundamentals, 10 th ed Icons vs. Data Type Terminals On the block diagram, control terminals and indicator terminals can be displayed either as icons or as data type terminals. To change display, right-click and select (or deselect) View As Icon. (Bishop, p. 72) Icon Data Type Terminal

18 Floyd, Digital Fundamentals, 10 th ed Terminals on Functions or SubVIs (Part 1) Functions and subVIs also have terminals where wires can connect to them. By convention, inputs are placed on the left and outputs are on the right.

19 Floyd, Digital Fundamentals, 10 th ed Terminals on Functions or SubVIs (Part 2) To show terminals more clearly, right-click and select Visible Items > Terminals

20 Floyd, Digital Fundamentals, 10 th ed Dataflow Programming In traditional text-based programming languages, the order of the statements determines the order in which theyre executed. In LabVIEWs graphical language, the layout on the page does not tell you the order of execution. A node executes whenever all of its inputs are available. (Bishop, pp )

21 Floyd, Digital Fundamentals, 10 th ed Highlight Execution Button To watch the order in which nodes are executed in the block diagram, click the Highlight Execution button on block diagrams toolbar and then run the VI. (Bishop, p. 84) Click on Highlight Execution button; data flow is animated using bubbles. Values are displayed on wires.


Download ppt "Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 2 Virtual Instruments Read Bishop, Chapter 2. Lab #2 and Homework #2 due next week. Quiz #1 next week."

Similar presentations


Ads by Google