Workshop 5 of 7 Welcome!. Today's Topics Review from Workshop 4 Modularity & subVIs Documentation File Input/Output Introduction.

Slides:



Advertisements
Similar presentations
Gruppo di Misure Meccaniche e Termiche UNIBS - DIMI A. File Formats At their lowest level, all files written to your computers hard drive are a series.
Advertisements

Previously… We created a simulated temperature reader which alerts if too hot or too cold… Download the solved practice to keep in sync: Thermostat.vi.
LabView Academy 5. óra. Témakörök SubVI Modularitás Icon Connector Pane.
Lesson 2 Navigating LabVIEW
Based on LabVIEW 2011 Student Edition
Room: Rapson Hall 54 Time: 4-5 PM.
Welcome! Workshop 2 of 7.
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 5 Loops  Read Bishop, Sections 5.1 and 5.2.  Lab #5 and Homework #5 due next week.  Exam #1 next.
CS320n –Visual Programming LabVIEW Foundations. Visual ProgrammingLabVIEW Foundations2 What We Will Do Today Hand back and review the midterm Look at.
Virtual Instrumentation With LabVIEW. Course Goals Understand the components of a Virtual Instrument Introduce LabVIEW and common LabVIEW functions Build.
National Instruments Confidential. 2 LabVIEW Development Tips and Tricks Revealed Carl Ljungholm - LabVIEW Product Support Engineer Travis Hailey - LabVIEW.
Loops A.About While Loops B.About For Loops C.About Case structures D.Sequence Structures E.Formula Node You Will Learn:
1 Lesson 5 Clusters TOPICS Introduction to Clusters Cluster Functions Error Clusters.
Introduction to LabVIEW Seth Price Department of Chemical Engineering New Mexico Tech Rev. 10/5/14.
Virtual Instrumentation With LabVIEW. Course Goals Understand the components of a Virtual Instrument Introduce LabVIEW and common LabVIEW functions Build.
Virtual Instrumentation With LabVIEW. Course Goals Understand the components of a Virtual Instrument Introduce LabVIEW and common LabVIEW functions Build.
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 4 SubVIs  Read Bishop, Chapter 4.  Lab #4 and Homework #4 due next week.
Virtual Instrumentation With LabVIEW
Course contents 1.Labview basics – virtual instruments, data flow, palettes 2.Structures – for, while, case,... – editing techniques 3.Controls&Indicators.
Lecture 13LabVIEW and GPIB LabVIEW (National Instruments) –Graphical program language –Widely used in academia (lab) and industry (R&D) General Purpose.
Infinity-project.org Engineering education for today’s classroom The Infinity Project SM LabVIEW for The Infinity Project.
How to use LabVIEW Ihor Korolov February 2011.
Virtual Instrumentation With LabVIEW. Course Goals Understand the components of a Virtual Instrument Introduce LabVIEW and common LabVIEW functions Build.
Workshop 3 of 7 Welcome!. Today's Topics Review of Workshop 2 Loops While For Auto-indexing Shift registers Case Structure.
Course contents 1.Labview basics – virtual instruments, data flow, palettes 2.Structures – for, while, case,... – editing techniques 3.Controls&Indicators.
Virtual Instrumentation With LabVIEW. Section I LabVIEW terms Components of a LabVIEW application LabVIEW programming tools Creating an application in.
Virtual Instrumentation With LabVIEW. Course Goals Understand the components of a Virtual Instrument Introduce LabVIEW and common LabVIEW functions Create.
Virtual Instrumentation With LabVIEW. Front Panel Controls = Inputs Indicators = Outputs LabVIEW Programs Are Called Virtual Instruments (VIs) Block Diagram.
LabVIEW an Introduction
Each VI has 2 Windows Front Panel User Interface (UI) –Controls = Inputs –Indicators = Outputs Block Diagram Graphical Code –Data travels on wires from.
Physics 434 Welcome Toby Burnett [prof] Durmus Karatay[TA] Jason Alferness [Equipment] David Pengra [consultant]
LabVIEW in 3 Hours. What is Test & Measurement? Keypad Functionality Keypad Functionality LCD Testing LCD Testing Sound Quality Sound Quality Acoustic.
LabView instrumentoinnissa, 55492, 3op Labview in instrumentation Lecturer: Heikki Ojala, room C204a
Samuel Alberg Thrysøe, PhD, PostDoc, Kontakt info: Tlf:
Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 7 – Creating and Using Templates in a Web.
Digital Electronics and Computer Interfacing Tim Mewes 4. LabVIEW - Advanced.
Introduction to LabVIEW
Virtual Instrumentation With LabVIEW. Front Panel Controls = Inputs Indicators = Outputs Block Diagram Accompanying “program” for front panel Components.
CS320n –Visual Programming More LabVIEW Foundations.
Workshop 2 of 4 Welcome!. Survey While You Wait ni.com/duke >> Recent Documents >> LabVIEW Workshop Participation Survey.
Digital Electronics and Computer Interfacing Tim Mewes 2. LabVIEW Basics part II.
LabVIEW Course Course 2.
LabVIEW Course Course 1.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Week 3 Data Structures and Common Tools. Common Tools in Labview Automatic Tool Selector Using the Operating Tool Using the Positioning Tool to Select.
Week 3 Labview exercises
EET 2259 Unit 13 Strings and File I/O
Welcome! Workshop 3 of 7.
Quiz Which types of folders are available in a LabVIEW Project?
EET 2259 Unit 4 SubVIs Read Bishop, Chapter 4.
LabVIEW Core 1 Key messages for the instructor:
Course Learning Map Lesson # Lesson Title Lesson 3 Lesson 2 Lesson 1
EE 200 Design Tools Laboratory 14
Course Learning Map Lesson # Lesson Title Lesson 3 Lesson 2 Lesson 1
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
Course Learning Map Lesson # Lesson Title Lesson 3 Lesson 2 Lesson 1
Introduction to LabVIEW
Lesson 2: Introduction to Control programming using Labview
הודעות ריענון מהיר והרחבות Charts & Graphs גרף XY בניית מחולל אותות
הודעות ריענון מהיר והרחבות כתיבה לקובץ Low-Level דגימת אות Low-Level
Chapter 5 SubVIs.
LabVIEW 7.1 寒假短期教學課程 歐陽丞修 2006/02/06.
Electronics II Physics 3620 / 6620
Structures- case, sequence, formula node
Introduction to LabVIEW
EET 2259 Unit 13 Strings and File I/O
LabVIEW基礎課程(一) 參考書籍: LabVIEW for Everyone (Jeffrey Travis/Jim Kring)
EET 2259 Unit 4 SubVIs Read Bishop, Chapter 4.
הודעות ריענון מהיר והרחבות - Shift Register Feedback Node המשך
Presentation transcript:

Workshop 5 of 7 Welcome!

Today's Topics Review from Workshop 4 Modularity & subVIs Documentation File Input/Output Introduction

Review Question 1 True or False? A sequence structure can be aborted in the middle of the sequence.

Review Question 1 True or False? A sequence structure can be aborted in the middle of the sequence. FALSE

Review Question 2 Which is best to use when monitoring the passage of time over a period of 24 or more hours? a)Tick Count b)Get Date/Time in Seconds c)Elapsed Time Express VI

Review Question 2 Which is best to use when monitoring the passage of time over a period of 24 or more hours? a)Tick Count b)Get Date/Time in Seconds c)Elapsed Time Express VI

If you have a Wait Until Next Millisecond Multiple in a while loop with a 20 wired to it and the other code within the loop take 25ms to execute, how long will one iteration of the loop take? a)25 ms b)40 ms c)45 ms d)unknown 7 Review Question 3

If you have a Wait Until Next Millisecond Multiple in a while loop with a 20 wired to it and the other code within the loop take 25ms to execute, how long will one iteration of the loop take? a)25 ms b)40 ms c)45 ms d)unknown 8 Review Question 3

Review Question 4 1.Which of the following is a state machine?

Review Question 4 1.Which of the following is a state machine?

Which block diagram objects comprise a state machine? a)While loop b)Enum c)Sequence structure d)Case structure e)Shift register f)Numeric constants 11 Review Question 5

Which block diagram objects comprise a state machine? a)While loop b)Enum (optional, although often used) c)Sequence structure d)Case structure e)Shift register f)Numeric constants 12 Review Question 5

Modularity and SubVIs Modularity - The degree to which a program is composed of discrete modules such that a change to one module has minimal impact on other modules Module = subVI It is desirable to section code into reusable parts that can be edited without having to change a bunch of other parts too. 13

14 Modularity and SubVIs

15 Modularity and SubVIs

Conveys the functionality of the VI using: Relevant graphics Descriptive text Create template for related subVIs i.e. DAQmx SubVI Icon

Right-click the icon in the upper right corner of the front panel and select Show Connector Each rectangle on the connector pane represents a terminal Select a different pattern by right-clicking the connector pane and selecting Patterns from the shortcut menu 17 Icon and Connector Pane: Setting up the Connector Pane

Once the connector pane pattern is selected, 1.Click on a terminal in the connector pane 2.Click on a control/indicator on the front panel 18 Icon and Connector Pane: Setting up the Connector Pane The control/indicator and connector pane terminal are now linked The terminal will display the color of the data type of the linked control/indicator

Use this connector pane layout as a standard Top terminals are usually reserved for references, such as a file reference Bottom terminals are usually reserved for error clusters 19 Connector Pane: Standards

Bold: Required terminal Plain: Recommended terminals Dimmed: Optional terminals 20 Connector Pane: Terminal Settings

Use a Case structure to handle errors passed into the subVI 21 Using SubVIs: Handling Errors

1.You can use an existing VI as a subVI after making the appropriate connections in the connector pane. Drag the VI from the project to the block diagram of another VI Drag the VI icon (top right corner of the VI) to the block diagram of another VI 2.LabVIEW will create a subVI from selected code on the block diagram Edit » Create SubVI 22 Creating SubVIs Edit » Create SubVI

Demonstration: Creating a subVI

Free labels (standard) labels Descriptions Captions Tip Strips 24 Documentation

Descriptions- appear in the Context Help window when you move the cursor over the object VIs: VI Properties» Description Controls, indicators, and constants: Properties » Description 25 Documentation: Description

Documentation- Labels and Captions Labels (including free labels) are available on the front panel and block diagram Captions are only available on the front panel – use when you want to be more descriptive and… don’t want to take as much space on the block diagram programmatically use the label and don’t want to break your VI To create a free label: Double-click and begin typing Place a free label form the Functions palette Be descriptive! For example, Does “Temp” mean temporary or temperature? What are the units of “Temp”? 26

Use block diagram comments to: Describe algorithms Explain the data contents of wires LabVIEW 2010 and later: right-click on wire select Visible»Label LabVIEW 2009 and earlier: use a free label to label wires Using Unbundle/Bundle By Name creates self-documenting code 27 Documentation- Block Diagram

Demonstration: Documentation

File Input/Output At their lowest level, all files written to your computer’s hard drive are a series of bits 29 Binary TDMS ASCII LVM

LabVIEW can use or create the following file formats: LVM— The LabVIEW measurement data file (.lvm) is a tab- delimited text file you can open with a spreadsheet application or a text-editing application ASCII—Specific type of text file that is a standard used by most programs TDMS—Type of binary file created for NI products consisting of two separate files: a binary file and a binary index file Binary—Underlying file format of all other file formats 30 File Input/Output: File Formats

File Formats ASCIITDMSDirect Binary Numeric Precision GoodBest Share dataBest (Any program easily) Better (NI Programs easily) Good (only with detailed metadata) EfficiencyGoodBest Ideal UseShare data with other programs when file space and numeric precision are not important Share data with programs when storing simple array data and metadata Store numeric data compactly with ability to random access

High-level VIs Perform all three steps (open, read/write, close) for common file I/O operations Might not be as efficient as the functions configured or designed for individual operations Low-level VIs Individual VI for each step If you are writing to a file in a loop, use low-level file I/O functions 32 High-Level vs. Low-Level File I/O Functions

Write to Spreadsheet File Converts an array of double-precision numbers to a text string and writes the string to an ASCII file Read From Spreadsheet File Reads a specified number of lines or rows from a numeric text file and outputs a 2D array of double- precision numbers Write to/Read from Measurement File Express VIs that write data to or read data from an LVM or TDMS file format 33 High-Level File I/O Functions

Low-level File I/O File I/O writes to or reads from a file A typical file I/O operation involves the following process: 34 Open/ Create/ Replace File Read and/or Write to File Close File Check for Errors

Demonstration: File IO with Write to Measurement File and Read From Measurement File

Create subVIs and document Create a VI that uses File I/O Homework