Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dan O. Popa, Intro to EE – Practicum, Spring 2015 EE 1106 : Introduction to EE Freshman Practicum Lecture 2: Signals, Systems and Circuits with Introduction.

Similar presentations


Presentation on theme: "Dan O. Popa, Intro to EE – Practicum, Spring 2015 EE 1106 : Introduction to EE Freshman Practicum Lecture 2: Signals, Systems and Circuits with Introduction."— Presentation transcript:

1 Dan O. Popa, Intro to EE – Practicum, Spring 2015 EE 1106 : Introduction to EE Freshman Practicum Lecture 2: Signals, Systems and Circuits with Introduction to LabVIEW

2 Dan O. Popa, Intro to EE – Practicum, Spring 2015 EE Jargon Device: primitive element –Passive (no power source needed), electric: ex: Resistor vs: - Active (need power source), electronic: ex: Transistor Analysis: Understand how a given circuit works Design (Synthesis): Understand how to build the circuit from requirements Signals – inputs and outputs to devices, circuits, and systems –AC (time varying) –DC (constant)

3 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Intellectual Themes of EE Modularity (ex: device) –Manage complexity by reusing simple components (electrical, mechanical or code) nomenclature: devices Abstraction (ex: circuit, system) –Represent complex systems by connecting modules using interconnects Block diagrams, Data flow diagrams (state machines), signal flow graphs, electric circuits Modeling (ex: electronic vs electric) –Represent behavior of systems using mathematical abstractions

4 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Problem Solving using Abstractions Identify what is given and what is to be found. Sketch a diagram or other visual representation of the abstraction Think of several models and a way of choosing between them Calculate a solution to the problem based on the model

5 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Abstraction: Ideal Circuit A circuit model is usually two or more circuit elements that are connected. A circuit model may have active elements (sources) as well as passive elements (such as resistors). By the assumption that electric signal propagation is instantaneous in a circuit, our circuit model has lumped parameters.

6 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Example of a Circuit

7 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Model: Kirchhoff’s Voltage Law The sum of the voltage drops around a closed path is zero. Example: -120 + V 1 + V 2 + V 3 + V 4 = 0

8 Dan O. Popa, Intro to EE – Practicum, Spring 2015 NI myDAQ Analog Input: 2 channels, 200kS/s/ch, 16-bit resolution Analog Output: 2 channels, 200kS/s/ch, 16-bit resolution DIO: 8 lines CTR: 1 counter Integrated DMM: V, A, Ohm Power Supply: +5 V, +/–15 V 3.5 mm stereo audio jacks Integrated DMM USB controlled, bus powered Audio IN/OUT 8 DIO lines, 1 counter Power Supply: +/– 15 V Power Supply: +5 V 2 AO lines 2 AI lines

9 Dan O. Popa, Intro to EE – Practicum, Spring 2015 What is LabVIEW LabVIEW is a programming environment designed by Electrical Engineers from National Instruments (NI), and running on Hardware such as NI myDAQ LabVIEW Introductory Video LabVIEW relies on graphical symbols rather than textual language to describe programming actions The principle of dataflow, in which functions execute only after receiving the necessary data, governs execution in a straightforward manner

10 Dan O. Popa, Intro to EE – Practicum, Spring 2015 A Graphical System Design Environment for Engineers and Scientists Worldwide Custom User InterfacesTechnology AbstractionsBuilt-in LibrariesProgramming ApproachesHardware APIsDeployment Targets

11 Dan O. Popa, Intro to EE – Practicum, Spring 2015 How does LabVIEW work? LabVIEW programs are called: –Virtual Instruments (VIs) –because their appearance and operation imitate actual instruments. However, they are analogous to main programs, functions and subroutines from popular language like C, Fortran, Pascal, …

12 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Abstraction: LabVIEW Programs Virtual Instruments (VIs) Front Panel Controls = Inputs Indicators = Outputs Block Diagram Accompanying “program” for front panel Components “wired” together

13 Dan O. Popa, Intro to EE – Practicum, Spring 2015

14 What is the front panel used for? What are the inputs and outputs called? What is the block diagram used for? How does data travel on the block diagram? LabVIEW Environment

15 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Function and Controls Palettes How many of the tools can you name? Where can you find the following Palettes?

16 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Abstraction: Dataflow Programming In this case, the block diagram executes from left to right, not because the objects are placed in that order, but because the Subtract function cannot execute until the Add function finishes executing and passes the data to the Subtract function. Remember that a node executes only when data are available at all of its input terminals and supplies data to the output terminals only when the node finishes execution.

17 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Primitive Modules The basic primitive building blocks in LabVIEW include –Numbers – formatted according to type (e.g. integer, boolean, float, etc.) –Loops – While, For –Logical and Arithmetic Ops – Comparator, Summer, Adder –GUI Elements – Button, Knob, Dial

18 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Data Types What are the following data types? http://www.ni.com/getting-started/labview-basics/data-structures

19 Dan O. Popa, Intro to EE – Practicum, Spring 2015 More Complex Modules More complex blocks in LabVIEW include –Arrays, Clusters, Enums –Signals and Transfer Functions –Data statistics, Graphs http://www.ni.com/gettingstarted/labviewbasics/datastructures.htm#enums

20 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Dataflow Programming Which VI(s) will execute first?Which VI will execute last?

21 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Execution Highlighting Broken Run Arrow Error List Are there other debugging tools you can think of? How do you use the following debugging tools? Debugging Techniques

22 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Tips for Working in LabVIEW Keystroke Shortcuts – Activate/Deactivate Context Help Window – Remove Broken Wires from Block Diagram – Toggle between Front Panel and Block Diagram – Undo (also in Edit menu) – Tile Front Panel and Block Diagram Tools» Options… Set Preferences in LabVIEW File» VI Properties Configure VI Appearance, Documentation, etc. Create» Control/Constant/Indicator Right-click on terminal to create

23 Dan O. Popa, Intro to EE – Practicum, Spring 2015 While Loop and SubVIs Bad ExampleGood Example

24 Dan O. Popa, Intro to EE – Practicum, Spring 2015 While Loop What do the following terminals do? What is the minimum number of iterations that a while loop will run?

25 Dan O. Popa, Intro to EE – Practicum, Spring 2015 For Loop What does the iteration terminal start counting from? How many times will a For Loop execute?

26 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Drawing a Loop 2. Enclose code to be repeated 3. Wire up the Stop Condition and add any additional code. 1. Select the structure (Programming» Structures)

27 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Arrays Creating Arrays and Auto-Indexing Programatically Creating Arrays

28 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Arrays An array consists of elements and dimension. What do those terms mean? When would you use an array? In LabVIEW, what is the index of the first element in an array?

29 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Creating an Array From the Controls» Modern» Array, Matrix, and Cluster subpalette, select the Array icon 1. Place an array shell on the front panel 2. Drag a data object or element into the array shell Empty array shell as seen on the block diagram.

30 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Case Structure with Timer

31 Dan O. Popa, Intro to EE – Practicum, Spring 2015 How Do I Make Decisions in LabVIEW? Case StructureSelect Function

32 Dan O. Popa, Intro to EE – Practicum, Spring 2015 Prelab 3 due next class!! Available online at course website Questions? 32


Download ppt "Dan O. Popa, Intro to EE – Practicum, Spring 2015 EE 1106 : Introduction to EE Freshman Practicum Lecture 2: Signals, Systems and Circuits with Introduction."

Similar presentations


Ads by Google