Lab 2 : Structures Muhammad Zaigham Abbas Shah DIGITAL INSTRUMENTATION SYSTEMS.

Slides:



Advertisements
Similar presentations
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.
Advertisements

LabVIEW is a graphical programming development environment for data acquisition and control, data analysis, and data presentation. With LabVIEW you can.
Based on LabVIEW 2011 Student Edition
TE Sessions Supported by: Basic Concepts of Programming November 3, 2012.
How SAS implements structured programming constructs
CS107 Introduction to Computer Science Lecture 3, 4 An Introduction to Algorithms: Loops.
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
CHAPTER 5: Repetition Control Structure. Objectives  To develop algorithms that use DOWHILE and REPEAT.. UNTIL structures  Introduce a pseudocode for.
Loops in LabVIEW (while,for and case)
Introduction to LabVIEW
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.
Loops A.About While Loops B.About For Loops C.About Case structures D.Sequence Structures E.Formula Node You Will Learn:
Lecture 12 Another loop for repetition The while loop construct © 2007 Daniel Valentine. All rights reserved. Published by Elsevier.
Introduction to LabVIEW Seth Price Department of Chemical Engineering New Mexico Tech Rev. 10/5/14.
Lecture 13LabVIEW and GPIB LabVIEW (National Instruments) –Graphical program language –Widely used in academia (lab) and industry (R&D) General Purpose.
Workshop 3 of 7 Welcome!. Today's Topics Review of Workshop 2 Loops While For Auto-indexing Shift registers Case Structure.
LabVIEW an Introduction
Unit 5 – “Watch Out!”. Introduction New Topics Case Structures New Functions Less? Comparison Function Ultrasonic Sensor.
Each VI has 2 Windows Front Panel User Interface (UI) –Controls = Inputs –Indicators = Outputs Block Diagram Graphical Code –Data travels on wires from.
Flow of Control. 2 Control Structures Control structure: An instruction that determines the order in which other instructions in a program are executed.
LabView instrumentoinnissa, 55492, 3op Labview in instrumentation Lecturer: Heikki Ojala, room C204a
CS320n –Visual Programming More LabVIEW Control Structures.
Samuel Alberg Thrysøe, PhD, PostDoc, Kontakt info: Tlf:
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.
A step-by-step procedure for solving a problem in a finite number of steps.
COMPUTER PROGRAMMING. Iteration structures (loops) There may be a situation when you need to execute a block of code several number of times. In general,
Digital Electronics and Computer Interfacing Tim Mewes 4. LabVIEW - Advanced.
Design of Bio-Medical Virtual Instrumentation Tutorial 2.
ITERATIVE STATEMENTS. Definition Iterative statements (loops) allow a set of instruction to be executed or performed several until condition are met.
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.
Workshop 2 of 4 Welcome!. Survey While You Wait ni.com/duke >> Recent Documents >> LabVIEW Workshop Participation Survey.
Language Find the latest version of this document at
Digital Electronics and Computer Interfacing Tim Mewes 2. LabVIEW Basics part II.
LabVIEW Course Course 2.
Computer Program Flow Control structures determine the order of instruction execution: 1. sequential, where instructions are executed in order 2. conditional,
Control Structures WHILE Statement Looping. S E Q C E N U E REPITITION …a step or sequence of steps that are repeated until some condition is satisfied.
MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
PH2150 Scientific Computing Skills Control Structures in Python In general, statements are executed sequentially, top to bottom. There are many instances.
G043: Lecture 12 Basics of Software Development Mr C Johnston ICT Teacher
Quiz Which types of folders are available in a LabVIEW Project?
EE 200 Design Tools Laboratory 14
Control Flow Constructs: Conditional Logic
Understanding the Geometric Shape Code
Scratch: iteration / repetition / loops
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
“Sequence” (Sıralı) Yapılar
Course Learning Map Lesson # Lesson Title Lesson 3 Lesson 2 Lesson 1
Introduction to LabVIEW
Chapter 5 Structures.
Lesson 2: Introduction to Control programming using Labview
Selection (if-then-else)
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
LabVIEW 7.1 寒假短期教學課程 歐陽丞修 2006/02/06.
T. Jumana Abu Shmais – AOU - Riyadh
Iteration: Beyond the Basic PERFORM
Introduction to Problem Solving and Control Statements
LabVIEW.
Structures- case, sequence, formula node
ICT Programming Lesson 3:
A LESSON IN LOOPING What is a loop?
Flow of Control.
The structure of programming
EET 2259 Unit 9 Arrays Read Bishop, Sections 6.1 to 6.3.
Introduction to LabVIEW
LabVIEW基礎課程(一) 參考書籍: LabVIEW for Everyone (Jeffrey Travis/Jim Kring)
EET 2259 Unit 7 Case Structures; Sequence Structures
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
Presentation transcript:

Lab 2 : Structures Muhammad Zaigham Abbas Shah DIGITAL INSTRUMENTATION SYSTEMS

Structures A type of node mimicking loops and case statements in text based languages. Used for repeating sections of code and for controlling the sequence of execution. Types are For Loop, While Loop, Timed Structures, Case Structures, Event Structures, stacked Sequence Structures, Flat Sequence Structures, Condition Disable Structures and Condition Enable Structures. Structures

Have distinct, resizable borders. Contain piece of code called a Subdiagram. Connected to other block diagram objects by input/ output points called Tunnels. Subdiagram Tunnels

For Loop and While Loop Structures For Loop  Execute a section of the code, a specified number of times.  Auto indexing enabled by default.  The Count Terminal determines the number of times the For Loop is going to execute.  The Iterations Terminal specifies the current iteration the loop is executing. Iterations start from 0 and end at N-1.  Check out the example Lab4.VI.

While Loop  Executes until a predetermined condition is met.  Condition is evaluated at the end of each iteration. Two types of conditions are present: Stop if True Loop executes its subdiagram until the conditional terminal receives a TRUE value. Continue if True Loop executes its subdiagram until the conditional terminal receives a FALSE value. Check Lab4.VI

Shift Registers Used for passing a data value from the current iteration to the next one. Has two terminals, one on the left border and the other on the right border. Always initialize Shift Registers. Stacked shift registers for getting data from multiple iterations.

Appears automatically when the output of a block is connected to the input of another. Feedback Node Initializer Terminal Feedback Node: Consists of a number of cases/subdiagrams of which only one subdiagram is visible at a time, and the structure executes only one case at a time. Can have boolean, string or numeric based case selections depending on the type of input on the Selector Terminal. Case Structures

Lists and ranges can also be entered. For e.g: o …10 represents all numbers less than 10 o …10,12…14 represents numbers less than 10&between 12 and 14 o a…c represents a,b o a..c,c represents a,b,c Inputs available to all cases, output tunnels need to be defined for each case.

A sequence structure contains one or more subdiagrams, or frames, that execute in sequential order. Enables changing execution order. Sequence Structure

Event Structure Has one or more subdiagrams, or event cases, exactly one of which executes when the structure executes. User interface(mouse clicks, key presses), or created programmatically

Tasks