Arrays. Collection of data elements that are of same type

Similar documents
Lecture 3 (week Feb 8-12) Expanding the Features of a VI. Select the Loop Condition. A. Structures--While Loop. A. Structures--For Loop

Virtual Instrumentation With LabVIEW

Virtual Instrumentation With LabVIEW

Electronics II Physics 3620 / 6620

Arrays are lists of elements of the same data type. They are analogous to arrays in traditional languages.

Shift Register: Exercise # 1: Shift Register Example VI. 1. Build the following front panel. Figure (8.1): Shift register exercise front panel

CLAD Sample Exam 03. C. A control that output a cluster of the controls / indicators on the tabs.

LabView programming 練習

CLAD Sample Exam 04. B. When you create an Array constant on the Block Diagram, it is not visible on the Front Panel.

Lesson 4 Implementing a VI

Certified LabVIEW Associate Developer Exam. Test Booklet

CLAD Sample Exam 06. B. Panel Resize. C. Panel Close? D. Value Change

Certified LabVIEW Associate Developer Exam. Test Booklet

LabView instrumentoinnissa, 55492, 3op Labview in instrumentation

A. Front Panel Design Lesson 4 Implementing a VI

Certified LabVIEW Associate Developer Examination

Lab 1: Getting familiar with LabVIEW: Part I

BE/EE189 Design and Construction of Biodevices Lecture 4. BE/EE189 Design and Construction of Biodevices - Caltech

Certified LabVIEW Associate Developer Examination

Introduction to LabVIEW

LabVIEW Express VI Development Toolkit User Guide

LabVIEW Academy. 12. óra event, property node

Today. 4/5/11 Physics 262 Lecture 10 Questions about Exams Homework. Lab: Continue project. Lecture. Review your exams and review practice exam again.

Advanced Programming Features

Read Temperature Data

CLAD_80.questions.

B. Including the Event Structure within a loop. C. Configuring a Timeout case within the Event Structure

Dept. of Electrical, Computer and Biomedical Engineering. Data Acquisition Systems and the NI LabVIEW environment

LabVIEW Basics. Based on LabVIEW 2011 Student Edition

ni.com Preparing for the CLAD Exam

Labview for Everyone (National Instruments Virtual Instrumentation Series) Jeffrey Travis

Experiment 1: Introduction to Labview 2010 (tbc 1/7/2007, 1/13/2009,1/9/2012, 1/10/2012)

Lesson 1 Introduction to LabVIEW. TOPICS LabVIEW Environment Front Panel Block Diagram Dataflow Programming LabVIEW Help and Manuals Debugging a VI

Labview Lab 2. Vern Lindberg. April 16, 2012

LabVIEW. Table of Contents. Lesson 1. Pre-reqs/Technical Skills Basic computer use

LABVIEW. About These Upgrade Notes. Contents UPGRADE NOTES. Version 6.0

Learn LabVIEW 2010 / 2011 Fast

LabVIEW & FRC. BAA Fall Education Day 2015

2. The LabView Environment Two panes will open, one is the Front panel, and one is the Block Diagram

Labview. Masood Ejaz

Part 1. Creating an Array of Controls or Indicators

NI LabView READ THIS DOCUMENT CAREFULLY AND FOLLOW THE INSTRIUCTIONS IN THE EXERCISES

Introduction to LabVIEW

Homework Assignment 9 LabVIEW tutorial

Introduction to LabVIEW Exercise-1

EKT 314/4 LABORATORIES SHEET

Getting Started with LabVIEW Virtual Instruments

GET130 Intro to Engineering Technology

Engineering Innovation Center LabVIEW Basics

PHYC 500: Introduction to LabView. Exercise 8 (v 1.3) M.P. Hasselbeck, University of New Mexico. Arrays, XY Graphs, Disk I/O

Exercise 0 - Open and Run a Virtual Instrument (Slide 12)

LabVIEW VI Analyzer Toolkit

ME 224: EXPERIMENTAL ENGINEERING. Lecture 2

Basics II Course Manual. LabVIEW TM. LabVIEW Basics II Course Manual. Course Software Version 5.1 February 1999 Edition Part Number F-01

PHYC 500: Introduction to LabView. Exercise 15 (v 1.2) Producer Consumer Event Structure. M.P. Hasselbeck, University of New Mexico

Originally released in 1986, LabVIEW (short for Laboratory Virtual Instrumentation

Syllabus: Mechatronics and Engineering 3

Lab 4 - Data Acquisition

G-clamp Programmer s Guide

Measurement & Automation Explorer (MAX) View and control your devices and software

CLAD Study Guide. Prepared by LabVIEW Student Ambassadors: Julian Ferrer-Rios Kristen Heck Francesca Ramadori Kelvin Tang

INTRODUCTION TO LABVIEW

ME 365 EXPERIMENT 3 INTRODUCTION TO LABVIEW

Sample. LabVIEW Basics II Development Course Manual

Small rectangles (and sometimes squares like this

Basic Data Acquisition with LabVIEW

OpenStax-CNX module: m Thermometer VI * National Instruments

Experiment 1: Introduction to Labview 8.0 (tbc 1/7/2007, 1/13/2009,1/13/2011)

Sample. LabVIEW TM Core 1 Exercises. Course Software Version 2010 August 2010 Edition Part Number B-01. LabVIEW Core 1 Exercises

Hardware: Acquiring Data and Communicating with Instruments

Exercise 5: Basic LabVIEW Programming

ECE 463 Lab 1: Introduction to LabVIEW

Tutorial: Getting Started with the LabVIEW Simulation Module

LabVIEW basics. BME MIT János Hainzmann, Károly Molnár, Balázs Scherer, Csaba Tóth

Training material. Introduction to LabVIEW

ECE 451 Automated Microwave Measurements Laboratory. Experiment No. 2. Automated RF Power Detection Using LabVIEW

Introduction to LabVIEW Programming

University of Illinois Department of Electrical and Computer Engineering ECE 451 Automated Microwave Measurements Laboratory

BE/EE189 Design and Construction of Biodevices Lecture 2. BE/EE189 Design and Construction of Biodevices - Caltech

LabVIEW Basics I: Introduction Course

Computer Interfacing Using LabView

CISE 318: Computer Control Systems Laboratory Exercises

LabVIEW TM Real-Time 2: Architecting Embedded Systems Exercises

LabVIEW VI Analyzer Toolkit

Certified LabVIEW Associate Developer Sample Exam 1. Test Booklet

Step-by-Step Data Acquisition Part II Exercise 2: Generating an Analog Output Waveform

Datalogging in LabVIEW

RoboDAQ7. By John Buzzi. Masters of Engineering Report. Cornell University

Introduction to National Instruments LabVIEW and Data Acquisition (DAQ)

LabVIEW API for PCAN -Basic 4.0 by KDI Kunze Digital Instrumentation

[ mini-project ] Create standard MIDI files with LabVIEW *

PHYC 500: Introduction to LabView. Exercise 1 (v 1.3) M.P. Hasselbeck, University of New Mexico

DSP First Lab 02: Introduction to Complex Exponentials

Concept: Debugging. Goal. Description. Implementation. Use the debugging tools built into LabVIEW.

Bitter, Rick et al "Drivers" LabVIEW Advanced Programming Techinques Boca Raton: CRC Press LLC,2001

Introduction to LabVIEW. Modified Powerpoint file taken from ma/courses/es110/

LABVIEW HANDOUT 3 CHAPTER 3: THE MATHSCRIPT NODE AND XY GRAPH

Virtual Instruments with LabVIEW

Starting Excel application

CLAD Exam Preparation Guide using LabVIEW NXG

Transcription:

Arrays Collection of data elements that are of same type 31 One or more dimensions, up to 2 elements per dimension Elements accessed by their index First element is index 0 index 10-element array 0 1 2 3 4 5 6 7 8 9 1.2 3.2 8.2 8.0 4.8 5.1 6.0 1.0 2.5 1.7 2D array 0 1 2 3 4 0 1 2 3 4 5 6 Five-row by seven column array of 35 elements LV Basics I 1

Array Controls and Indicators 1. Select the Array Shell from the Controls palette 2. Place data object inside shell Add Dimension for 2D arrays LV Basics I 2

1. Select Array Constant shell from the Array subpalette Creating Array Constants 2. Place the data object in the array shell LV Basics I 3

Creating and Using Arrays Auto-Indexing loops accumulate arrays at their boundaries For Loops auto index by default; While Loops do not LV Basics I 4

Creating 2D Arrays Inner loop creates column elements Outer loop stacks them into rows LV Basics I 5

Common Array Functions Array Size Initialize Array Array Subset LV Basics I 6

The Build Array Function Appending an element Building a higher dimension array Concatenate Inputs (default) LV Basics I 7

The Index Array Function Extracting an Element Extracting a Row LV Basics I 8

Polymorphism Function inputs can be of different types All LabVIEW arithmetic functions are polymorphic Combination Scalar + Scalar 5 2 7 Result Scalar Array + Scalar 1 4 2 2 3 6 4 Array Array + Array 3 2 5 1 4 2 Array + Array 1 4 2 3 2 5 7 4 6 7 4 6 7 Array Array Run Polymorphism Example.vi LV Basics I 9

Graphs Selected from the Graph subpalette Waveform Graph Plot an array of numbers against their indices XY Graph Plot one array against another Plot Legend (point and line styles) Scale Legend Graph Palette LV Basics I 10

Single-Plot Waveform Graphs Uniform X axis - initial X = 0.0, delta X = 1.0 Uniform X axis - you specify point spacing LV Basics I 11

Multiple-Plot Waveform Graphs Each row is a separate plot (initial X = 0, delta X = 1) LV Basics I 12 Each row is a separate plot (Bundle specifies point spacing of the X axis)

XY Graphs Non-uniform X axis Separate X and Y arrays define data points LV Basics I 13

Chart and Graph Use Summary Use the Context Help window with charts and graphs LV Basics I 14

Clusters Data structure that groups data together Data may be of different types Analogous to record in Pascal or struct in C Elements must be either all controls or all indicators Thought of as wires bundled into a cable LV Basics I 15

Cluster Controls and Indicators 1. Select a Cluster shell from the Array & Cluster subpalette 2. Place objects inside the shell LV Basics I 16

Cluster Constants Select a Cluster Constant shell from the Cluster subpalette Right-click on existing cluster and select Create>>Constant LV Basics I 17

Cluster Order Elements have a logical order (start with 0) To change order, right-click on border and select Reorder Controls in Cluster... LV Basics I 18

Use Clusters to Pass Data to SubVIs Use clusters to pass several values to one terminal Overcomes 28- terminal limit Simplifies wiring LV Basics I 19

Cluster Functions In the Cluster subpalette of the Functions palette Can also be accessed by right-clicking on the cluster terminal Bundle (Terminal labels reflect data type) Bundle By Name LV Basics I 20

Cluster Functions Unbundle Unbundle By Name LV Basics I 21 Unbundled cluster in the diagram

Polymorphism with Clusters Polymorphic functions work with clusters Arithmetic functions can perform computations on clusters of numeric data LV Basics I 22

Summary An array is a collection of elements of same data type numeric, Boolean, string, etc. Creating array or cluster controls/indicators is a two-step process 1. Get array or cluster shell 2. Place desired control/indicator inside the shell Loops can accumulate arrays at boundaries auto-indexing Array functions are in Array subpalette of Functions palette LabVIEW arithmetic functions are polymorphic input different data types Plot data on graphs Many features to manipulate plotted graph Multiple plots can be plotted on one graph Clusters group data that can be different types The Bundle and Unbundle functions are used to create and disassemble clusters LV Basics I 23

Case Structures In the Structures subpalette of Functions palette Enclose nodes or drag them inside the structure Stacked like a deck of cards, only one case visible LV Basics I 24

Boolean and Numeric Cases LV Basics I 25 Note: all possible outputs of the Case structure must be wired

Sequence Structures In the Structures subpalette of Functions palette Executes diagrams sequentially, Frame 0 (0..x), where x is the total number of frames Stacked like a deck of cards, only one frame visible LV Basics I 26

Sequence Locals Pass data from one frame to future frames Created at the border of the Sequence structure Data not available Sequence local created in Frame 1 Data available LV Basics I 27

Formula Node In the Structures subpalette Implement complicated equations Variables created at border Variable names are case sensitive Each statement must terminate with a semicolon (;) Context Help Window shows available functions Note semicolon LV Basics I 28

Conditional Branching in Formula Nodes if (x >= 0) then y = sqrt(x) else y = -99999.0 end if Conditional Operator False Condition LV Basics I 29 Condition True Condition

Summary Two structures to control flow of data Case structure Sequence structure Case structure Boolean or numeric cases selector determines type Subdiagrams placed inside case structure Output from a Case structure must be defined for all cases Sequence structure executes subdiagrams sequentially Sequence locals pass data between frames Created at the border of Sequence structure Data available in subsequent frames Formula Nodes allow direct entry of equations in the block diagram Sequence structures can be replaced with a Case inside of a Loop LV Basics I 30

Strings A string is a sequence of displayable or nondisplayable characters (ASCII) Many uses displaying messages, instrument control, file I/O String control/indicator is in the Controls >> String subpalette LV Basics I 31

String Display Modes Normal display \ code display Password display Hex display LV Basics I 32

String Functions String Length String Length = 20 Strings Concatenate Strings spaces here The quick brown fox jumped over the lazy dog. Concatenated String LV Basics I 33

LV Basics I 34 String Functions

String Functions Converting numbers to strings Converting strings to numbers LV Basics I 35

File Input and Output Three levels of hierarchy High-level utility file VIs Intermediate file I/O VIs Advanced file I/O functions High Level File VIs Intermediate File VIs and Functions Advanced File Functions LV Basics I 36

Intermediate File I/O VIs Open/Create/Replace file opens, creates, or replaces a file Read File reads count bytes from the file Write File writes data to the file Close File closes the file Error handling in file I/O Time & Dialog subpalette Displays a dialog box if an error occurs LV Basics I 37

Saving Data to a File Open/Create/Replace opens the existing file TEST1.DAT and generates refnum and error cluster Write File writes the data Close File closes the file Simple Error Handler checks for errors LV Basics I 38

Reading Data from a File Open/Create/Replace opens the file Read File reads the specified number of bytes from the file Close File closes the file Simple Error Handler checks for errors LV Basics I 39