CS320n –Visual Programming

Slides:



Advertisements
Similar presentations
A. Virtual Instruments (VIs)
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 is a graphical programming development environment for data acquisition and control, data analysis, and data presentation. With LabVIEW you can.
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.
Lesson 2 Navigating LabVIEW
Based on LabVIEW 2011 Student Edition
LabVIEW and G Graphical Programming Language By: Ramtin Raji Kermani.
TE Sessions Supported by: Basic Concepts of Programming November 3, 2012.
Welcome! Workshop 2 of 7.
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 10 Clusters and Matrices  Read Bishop, Sections 6.4 to  Lab #10 and Homework #10 due next week.
LabView Physics 3 - IT skills
De la Rosa-Pohl ECE 1100 Introduction to Engineering Intro to LabVIEW: Programming for Symon University of Houston Diana de la Rosa-Pohl Len Trombetta.
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Introduction to LabVIEW
Arrays. Topics Tables of Data Arrays – Single Dimensional Parsing a String into Multiple Tokens Arrays - Multi-dimensional.
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.
Loops A.About While Loops B.About For Loops C.About Case structures D.Sequence Structures E.Formula Node You Will Learn:
First Bytes - LabVIEW. Today’s Session Introduction to LabVIEW Colors and computers Lab to create a color picker Lab to manipulate an image Visual ProgrammingImage.
Chapter 6 Arrays & Clusters. LabVIEW Arrays > Collection of Elements > Same Data Type > Variable-Sized > One or More Dimensions.
CS320n –Visual Programming LabVIEW Control Structures.
Introduction to LabVIEW Seth Price Department of Chemical Engineering New Mexico Tech Rev. 10/5/14.
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.
Workshop 3 of 7 Welcome!. Today's Topics Review of Workshop 2 Loops While For Auto-indexing Shift registers Case Structure.
Virtual Instrumentation With LabVIEW. Course Goals Understand the components of a Virtual Instrument Introduce LabVIEW and common LabVIEW functions Create.
Chapter 1 LabVIEW Basics. Features > Uses Graphic Symbols > Created by National Instruments > Virtual Instruments (VIs) > Extensive Library of VIs.
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.
Design of Bio-Medical Virtual Instrumentation Tutorial 3.
Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.
LabView instrumentoinnissa, 55492, 3op Labview in instrumentation Lecturer: Heikki Ojala, room C204a
CS320n –Visual Programming More LabVIEW Control Structures.
EET 2259 Unit 7 Case Structures; Sequence Structures  Read Bishop, Sections 5.4 and 5.5.  Lab #7 and Homework #7 due next week.  Quiz #3 next week.
1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.
Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:
Introduction to Arrays in Java Corresponds with Chapter 6 of textbook.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Chapter 8: Collections: Arrays. 2 Objectives One-Dimensional Arrays Array Initialization The Arrays Class: Searching and Sorting Arrays as Arguments The.
Lab 7 – Misc. pieces Southern Methodist University Bryan Rodriguez.
Lab 1 : Introduction to LabView 1 Southern Methodist University Bryan Rodriguez.
CS320n –Visual Programming More LabVIEW Foundations.
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 9 Arrays  Read Bishop, Sections 6.1 to 6.3.  Homework #9 and Lab #9 due next week.  Quiz #5 next.
CS320n – Elements of Visual Programming Assignment Help Session.
Digital Electronics and Computer Interfacing Tim Mewes 2. LabVIEW Basics part II.
Array Controls and Indicators
LabVIEW Course Course 2.
Chapter 6 Arrays & Clusters. LabVIEW Arrays > Collection of Elements > Same Data Type > Variable-Sized > One or More Dimensions.
Week 3 Data Structures and Common Tools. Common Tools in Labview Automatic Tool Selector Using the Operating Tool Using the Positioning Tool to Select.
26/06/ Iteration Loops For … To … Next. 226/06/2016 Learning Objectives Define a program loop. State when a loop will end. State when the For.
LESSON 8: INTRODUCTION TO ARRAYS. Lesson 8: Introduction To Arrays Objectives: Write programs that handle collections of similar items. Declare array.
Week 3 Labview exercises
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.
Introduction to LabVIEW
Lesson 2: Introduction to Control programming using Labview
CS320n –Visual Programming
CS320n –Visual Programming
Doing some Boolean: On/Off
Chapter 1 LabVIEW Basics
Chapter 5 SubVIs.
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
LabVIEW 7.1 寒假短期教學課程 歐陽丞修 2006/02/06.
3.1 Iteration Loops For … To … Next 18/01/2019.
Structures- case, sequence, formula node
EET 2259 Unit 9 Arrays Read Bishop, Sections 6.1 to 6.3.
Introduction to LabVIEW
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
EET 2259 Unit 2 Virtual Instruments
Presentation transcript:

CS320n –Visual Programming Arrays

What We Will Do Today Learn about arrays and how to work with them in LabVIEW Visual Programming Arrays in LabVIEW

What are Arrays? An array is like a list Up until now in LabVIEW we have dealt with scalars, variables with a single value An array is a collection of elements all elements in the array have the same data type: boolean, double, int, String Visual Programming Arrays in LabVIEW

Thinking About Arrays Array elements are accessed by their index Indices start at 0, not 1 This is a one dimensional array arrays can have more dimensions 2 dimensional array, like a table of data Visual Programming Arrays in LabVIEW

Arrays in LabVIEW Arrays can be created on the block diagram on block diagram select arrays sub palette select array constant and drag onto block diagram this creates an array shell Visual Programming Arrays in LabVIEW

Creating an Array on Block Diagram array shell to finish creating the array the data type the array holds must be determined drag a constant from a sub palette into the elements portion this determines the data type of the array index elements after dragging numeric constant into elements Visual Programming Arrays in LabVIEW

Array Constants on Block Diagram type the initial value into the element section the array can be expanded up and down or left and right to view other elements click and drag to expand array to view more elements element 0 set to 12 Visual Programming Arrays in LabVIEW

Array Constants on Block Diagram Array expanded to show elements 0 through 10 Clicking on index array display other elements. The element on the far left (or top) of the array has the index shown in the index box. Light blue elements are elements that have not been initialized. Visual Programming Arrays in LabVIEW

Creating Arrays Via the Front Panel Arrays can also be created via the front panel click on the Array and Cluster sub palette click and drag an array to the front panel this creates an array control shell Visual Programming Arrays in LabVIEW

Creating Arrays Via the Front Panel a data type must be added to the array shell drag a control or indicator of the data type you want into the shell can change from double to int by right clicking on elements and selecting “data range” click on icon under “representation” and change to an integer type array shell Visual Programming Arrays in LabVIEW

Arrays on the Front Panel Control can be expanded to show more elements of the array grey elements indicate uninitialized values the size (or length) of the array above is 1 if other elements are given values, the array size automatically expands Visual Programming Arrays in LabVIEW

Auto indexing LabVIEW has a feature with loops and arrays called auto indexing If you wish to carry out an operation on every element of an array a loop is required assume we have an array and we want to double every element Visual Programming Arrays in LabVIEW

Using Auto indexing array indicator Visual Programming Arrays in LabVIEW

Notes on Previous slide no value wired to count terminal count based on length of array thick wire going in and coming out, but thin inside the loop working with a single element of the array must create array indicator to show array when finished can be a bit tricky Visual Programming Arrays in LabVIEW

Manipulating Arrays Many functions for working with arrays initialize array initial value for all elements size of the array Visual Programming Arrays in LabVIEW

Getting the Length of an Array output is size of array array input Visual Programming Arrays in LabVIEW

Changing Values of Elements Giving an array, set the value at position 2 (actually the 3rd element of the array) to 1 more than its previous value Uses Index Array and Replace Array Subset value at element resulting array array array index new value for element Index Array index Replace Array Subset Visual Programming Arrays in LabVIEW

Completed Diagram Index Array (access element) Replace Array Subset (Change value of 1 element) Visual Programming Arrays in LabVIEW

Class work Download the ArrayExercise.vi program from the class web site. The program creates an array of size 1000. The elements of the array are random values from 1 to 100 Add 1 to all elements that are odd. Use a case statement or select function inside the loop to increment the array element if R is equal to 1 Visual Programming Arrays in LabVIEW