© 2007 Eaton Corporation. All rights reserved. LabVIEW State Machine Architectures Presented By Scott Sirrine Eaton Corporation.

Slides:



Advertisements
Similar presentations
Instructor Notes This lecture describes the different ways to work with multiple devices in OpenCL (i.e., within a single context and using multiple contexts),
Advertisements

Memory.
TP4: S TATE M ACHINE D ESIGN P ATTERN  Definition  Infrastructure  Transition Code  Conclusion.
Executional Architecture
A Process Splitting Transformation for Kahn Process Networks Sjoerd Meijer.
CS492B Analysis of Concurrent Programs Lock Basics Jaehyuk Huh Computer Science, KAIST.
Performance of Cache Memory
Scalable Multi-Cache Simulation Using GPUs Michael Moeng Sangyeun Cho Rami Melhem University of Pittsburgh.
Concurrency Important and difficult (Ada slides copied from Ed Schonberg)
Developing User Interfaces with Event-driven Programming
Application Design Patterns in LabVIEW™
Chapter 4: Threads. Overview Multithreading Models Threading Issues Pthreads Windows XP Threads.
6/13/20151 CS 160: Lecture 13 Professor John Canny Fall 2004.
Department of Electrical and Computer Engineering Texas A&M University College Station, TX Abstract 4-Level Elevator Controller Lessons Learned.
A Brief Overview of LabVIEW Data Acquisition (DAQ)
Threads 1 CS502 Spring 2006 Threads CS-502 Spring 2006.
OS Spring’03 Introduction Operating Systems Spring 2003.
Memory Management, File Systems, I/O How Multiprogramming Issues Mesh ECEN 5043 Software Engineering of Multiprogram Systems University of Colorado, Boulder.
1/28/2004CSCI 315 Operating Systems Design1 Operating System Structures & Processes Notice: The slides for this lecture have been largely based on those.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
Software Performance Tuning Project – Final Presentation Prepared By: Eyal Segal Koren Shoval Advisors: Liat Atsmon Koby Gottlieb.
A. Frank - P. Weisberg Operating Systems Introduction to Tasks/Threads.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Introduction to Symmetric Multiprocessors Süha TUNA Bilişim Enstitüsü UHeM Yaz Çalıştayı
What is Concurrent Programming? Maram Bani Younes.
Introduction to Basic LabVIEW Design Patterns
Austin Java Users Group developerWorks article – µActor Library BARRY FEIGENBAUM, PH. D. 02/26/13.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
Analyzing parallel programs with Pin Moshe Bach, Mark Charney, Robert Cohn, Elena Demikhovsky, Tevi Devor, Kim Hazelwood, Aamer Jaleel, Chi- Keung Luk,
The Pipeline Processing Framework LSST Applications Meeting IPAC Feb. 19, 2008 Raymond Plante National Center for Supercomputing Applications.
Operating System 4 THREADS, SMP AND MICROKERNELS
Eric Keller, Evan Green Princeton University PRESTO /22/08 Virtualizing the Data Plane Through Source Code Merging.
1 A Simple but Realistic Assembly Language for a Course in Computer Organization Eric Larson Moon Ok Kim Seattle University October 25, 2008.
Concurrency: Threads, Address Spaces, and Processes Andy Wang Operating Systems COP 4610 / CGS 5765.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Chapter 2 Parallel Architecture. Moore’s Law The number of transistors on a chip doubles every years. – Has been valid for over 40 years – Can’t.
Fall 2012 Chapter 2: x86 Processor Architecture. Irvine, Kip R. Assembly Language for x86 Processors 6/e, Chapter Overview General Concepts IA-32.
Background Program must be brought into memory and placed within a process for it to be run. Input queue – collection of processes on the disk that are.
Performance Prediction for Random Write Reductions: A Case Study in Modelling Shared Memory Programs Ruoming Jin Gagan Agrawal Department of Computer and.
Chapter 4 – Threads (Pgs 153 – 174). Threads  A "Basic Unit of CPU Utilization"  A technique that assists in performing parallel computation by setting.
1 Lecture 4: Threads Advanced Operating System Fall 2010.
ITFN 3601 Introduction to Operating Systems Lecture 3 Processes, Threads & Scheduling Intro.
Developing Applications with the CSI Framework A General Guide.
Computer Network Lab. Korea University Computer Networks Labs Se-Hee Whang.
Advanced LabVIEW Topics Dustin Cruise. Who is this guy? Graduate Student in Mechanical Engineering at Purdue University Specialty Areas: Combustion Control.
Reduction of Register File Power Consumption Approach: Value Lifetime Characteristics - Pradnyesh Gudadhe.
LabVIEW.com.tw LabVIEW Community Speeding Up Your VIs 參考 NI 官方教材: LabVIEW Intermediate II for 7.
Threaded Programming Lecture 1: Concepts. 2 Overview Shared memory systems Basic Concepts in Threaded Programming.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
1 DAQ.IHEP Beijing, CAS.CHINA mail to: The Readout In BESIII DAQ Framework The BESIII DAQ system consists of the readout subsystem, the.
Chapter 4: Threads 羅習五. Chapter 4: Threads Motivation and Overview Multithreading Models Threading Issues Examples – Pthreads – Windows XP Threads – Linux.
Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine and Mendel Rosenblum Presentation by Mark Smith.
Design Patterns in NI LabVIEW Developer Days 2009.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Wednesday NI Vision Sessions
Chapter 8: Memory Management. 8.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 8: Memory Management Background Swapping Contiguous.
Computer Architecture Organization and Architecture
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
High-Speed Control and Disk Streaming Monday Aug 24, 2:30 - 4:00 p.m. Thursday Aug 27, 12:45 - 2:15 p.m. and 2:30 - 4:00 p.m. Red River (4B) Aljosa (Al)
Introduction to threads
Processes and threads.
Chapter 4: Threads 羅習五.
Operating System Concepts
Background Program must be brought into memory and placed within a process for it to be run. Input queue – collection of processes on the disk that are.
Main Memory Background Swapping Contiguous Allocation Paging
CS703 - Advanced Operating Systems
Lecture Topics: 11/1 General Operating System Concepts Processes
Concurrency: Threads, Address Spaces, and Processes
Presentation transcript:

© 2007 Eaton Corporation. All rights reserved. LabVIEW State Machine Architectures Presented By Scott Sirrine Eaton Corporation

State Machines- Personal Background Employment Lead Product Engineer (Software development) at Eaton Corporations R&D facility in Galesburg MI. LabVIEW developer for 12 years (version 3.1) Data Acquisition and Control NVH Vehicle bus applications (Can/J1939) Certifications Certified LabVIEW Architect since Aug 2003 Certified LabVIEW Developer Oct 2002 Education Master (MSCIS) Bachelor (BSCIS) Associate electronics

State Machines- Overview Discuss the concept of State Machines as they pertain to LabVIEW based application development. Focus will be on design considerations and merits for selecting various State Machines models. Topics Single loop Multiple Loops (Asynchronous) Supporting techniques Queue Functional Globals Multi-threading and performance (comments)

State Machines- Definition Wikipedia- Model of behavior composed of finite number of states, transitions between those states, and actions. Made up of entry, exit, input, and transition actions. Used quite a bit in UML based modeling (decision trees/flowcharts). LabVIEW Based State Machine- Decision based execution framework. Based on a While loop used in conjunction with a Case statement and a shift register. Branch control can be enhanced by the use of Events, queues, and functional globals. Note: Due to LabVIEWs inherent parallelism, execution performance can be further enhanced by the use of multiple state machines running in parallel.

State Machines- Single Loop This is an example of a basic state machine with a while loop, case statement, and shift register. It has been enhanced slightly to include a event structure for capturing user actions. Pros Easy to implement Very Scalable Error handling Input validation Uses Main Application VI Intermediate VI VIs with complex execution and decision trees Cons Additional overhead vs. pass-though No history Single exit branch (without adding extra code)

State Machines- Multiple Loops Multiple execution loops better leverage LabVIEWs inherent parallelism. Separate loop for User IO allows the main application to continue acquiring data if program focus passes to a popup window. Pros Parallelism Leverages Multi-core CPU Asynchronous (potential) Uses Primarily the main application VI Cons More complex loop interaction More complex data buffering

State Machines- Multiple Loops cont. This is an example of data acquisition, analysis, and control application running 3 asynchronous loops. The application offers better determinism, CPU utilization, and scales well with multiple CPU cores. Loop 1- Acquisition, Scaling, and Display updates. Loop 2- Test Control Loop 3- User Interface

State Machines- Multiple Loops cont. Loop 1- Acquisition, Scaling, and data logging. Loop 2- Display updates Loop 3- User Interface Loop 3 Loop 1 Loop 2 This is an example of vehicle bus acquisition running 3 asynchronous loops. Display updates are performed in a separate loop from the data acquisition. This allows the daq loop to sample data at a faster rate than the real-time display updates.

State Machines- Queues Queues are located under the Synchronization palette and function as a stack (FIFO). A queue can enhance the function of a state machines shift register by queuing up multiple actions. Pros Easy to implement Very Scalable Simpler states Multiple exit states Cons Small amount of extra code In this example assume the VI was acquiring data and a hardware error occurred. Depending on if the VI was logging data or simply to update displays will determine the states needed for proper shutdown. Without a queue, special states for each of these event would need to be developed, which adds to the VIs overall size and complexity. Shutdown steps if actively logging data. Shutdown steps if not logging data.

State Machines- Functional Globals A functional global is simply a VI with a while loop and a case statement with a un-initialized shift register. Because the shit register is un- initialized it retains state as long as the VI is loaded in memory. These globals do not make multiple memory copies like a global variable and can make a very tangible impact on overall memory footprint. If the functional globals execution is not set to Reentrant there is only one instance in memory and race conditions are avoided. In the context of the state machine, it can be used to exchange data between the loops. Note: The biggest negative is overuse of FGs goes against the concept of dataflow.

State Machines- The Global Queue In the earlier Daq/Analysis/Control application each loop uses a queue. To better support inter-loop control, the queues themselves were placed in a functional global. This simplified interaction with the various queues.

State Machines- Conclusion This presentation is by no means a comprehensive discussion of the concept of state machine, but instead tries to highlight the opportunities offered by LabVIEW to develop powerful application which are not only multi-threaded, but harness multi-core. LabVIEW has served me well in developing stable and fast applications over the years, and hopefully it is proving just as useful to all of you.