Programming Configuration Files in LabVIEW David Thomson Systems Integrator Original Code Consulting National Instruments Alliance Member Research Scientist.

Slides:



Advertisements
Similar presentations
Configuration management
Advertisements

CS 11 C track: lecture 7 Last week: structs, typedef, linked lists This week: hash tables more on the C preprocessor extern const.
LabVIEW is a graphical programming development environment for data acquisition and control, data analysis, and data presentation. With LabVIEW you can.
OpenG – Projects and Community
Data Manipulation Overview and Applications. Agenda Overview of LabVIEW data types Manipulating LabVIEW data types –Changing data types –Byte level manipulation.
LV2IDL, a software package for automatic data transfer between LabVIEW and IDL Gelu M. Nita New Jersey Institute of Technology.
Chapter 7: Introduction to Debugging TECH Prof. Jeff Cheng.
CS320n –Visual Programming LabVIEW Foundations. Visual ProgrammingLabVIEW Foundations2 What We Will Do Today Hand back and review the midterm Look at.
Concepts of Version Control A Technology-Independent View.
EE694v-Verification-Lect5-1- Lecture 5 - Verification Tools Automation improves the efficiency and reliability of the verification process Some tools,
Microsoft Visual Source Safe 6.01 Microsoft Visual Source Safe (MVSS) Presented By: Rachel Espinoza.
CS320n –Visual Programming Introduction to LabVIEW.
Regression testing Tor Stållhane. What is regression testing – 1 Regression testing is testing done to check that a system update does not re- introduce.
Servers Redundant Array of Inexpensive Disks (RAID) –A group of hard disks is called a disk array FIGURE Server with redundant NICs.
Setting Up a Sandbox Presented by: Kevin Brunson Chief Technology Officer.
This chapter is extracted from Sommerville’s slides. Text book chapter
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.
Driver Station MVRT 2009 – 2010 Season. Add information Breadboard Classmate PC USB Hub Joysticks Stop Button.
Workshop 3 of 7 Welcome!. Today's Topics Review of Workshop 2 Loops While For Auto-indexing Shift registers Case Structure.
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 8 Other Structures; Local Variables  Read Bishop, Sections 5.6 to  Lab #8 and Homework #8 due.
Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.
LabView Basics The Fighting Pi Controls Group. About LabView LabView is a highly adaptable programming GUI (Graphic User Interface) LabView compiles the.
Virtual Instrumentation With LabVIEW. Course Goals Understand the components of a Virtual Instrument Introduce LabVIEW and common LabVIEW functions Create.
LabVIEW an Introduction
Working Out with KURL! Shayne Koestler Kinetic Data.
UPC/SHMEM PAT High-level Design v.1.1 Hung-Hsun Su UPC Group, HCS lab 6/21/2005.
Identifying Reversible Functions From an ROBDD Adam MacDonald.
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.
Operator Precedence First the contents of all parentheses are evaluated beginning with the innermost set of parenthesis. Second all multiplications, divisions,
Department of Electrical and Computer Engineering The Tektronix MSO4000 series of oscilloscopes are mixed-signal oscilloscopes that contain both digital.
Version control Using Git Version control, using Git1.
1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.
Introduction of Geoprocessing Topic 7a 4/10/2007.
Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:
Chapter 13 Recursion. Learning Objectives Recursive void Functions – Tracing recursive calls – Infinite recursion, overflows Recursive Functions that.
Overview and Applications
National Instruments Leadership Seminar
Digital Electronics and Computer Interfacing Tim Mewes 4. LabVIEW - Advanced.
Integrating EPICS and LabVIEW on Windows using DCOM Freddie Akeroyd ISIS Computing Group.
Ted Pedersen – CS 3011 – Chapter 10 1 A brief history of computer architectures CISC – complex instruction set computing –Intel x86, VAX –Evolved from.
March 2004 At A Glance autoProducts is an automated flight dynamics product generation system. It provides a mission flight operations team with the capability.
Virtual Instrumentation With LabVIEW. Front Panel Controls = Inputs Indicators = Outputs Block Diagram Accompanying “program” for front panel Components.
In the Labs… X-Bot 2003 by Overtech Technologies.
COSC 2007 Data Structures II Chapter 13 Advanced Implementation of Tables IV.
Programming games using Visual Basic Files; files vs. databases Reprise on state of program Lab/HW: work on projects, final project.
HNDIT23082 Lecture 06:Software Maintenance. Reasons for changes Errors in the existing system Changes in requirements Technological advances Legislation.
Files Tutor: You will need ….
Workshop 2 of 4 Welcome!. Survey While You Wait ni.com/duke >> Recent Documents >> LabVIEW Workshop Participation Survey.
1 Chapter 12 Configuration management This chapter is extracted from Sommerville’s slides. Text book chapter 29 1.
Documenting LabVIEW Data & Data Mining with LabVIEW and DIAdem Presentation with self paced training exercises.
EPICS and LabVIEW Tony Vento, National Instruments
TEAM FOUNDATION VERSION CONTROL AN OVERVIEW AND WALKTHROUGH By: Michael Mallar.
1 CEG 2400 Fall 2012 Network Servers. 2 Network Servers Critical Network servers – Contain redundant components Power supplies Fans Memory CPU Hard Drives.
Software testing techniques Software testing techniques REGRESSION TESTING Presentation on the seminar Kaunas University of Technology.
This was written with the assumption that workbooks would be added. Even if these are not introduced until later, the same basic ideas apply Hopefully.
Wednesday NI Vision Sessions
Week 3 Data Structures and Common Tools. Common Tools in Labview Automatic Tool Selector Using the Operating Tool Using the Positioning Tool to Select.
Accomplish more with macros! Presenter: Joyce Bell Princeton University
The Data Large Number of Workbooks Each Workbook has multiple worksheets Transaction worksheets have large (LARGE) number of lines (millions of records.
Create your Benner - intro
Introduction to LabVIEW
RAID RAID Mukesh N Tekwani
Electronics II Physics 3620 / 6620
Smart Integration Express
Regression testing Tor Stållhane.
RAID RAID Mukesh N Tekwani April 23, 2019
EET 2259 Unit 8 Other Structures; Local Variables
In LabVIEW Stuart Wilson.
Presentation transcript:

Programming Configuration Files in LabVIEW David Thomson Systems Integrator Original Code Consulting National Instruments Alliance Member Research Scientist NOAA Aeronomy Lab

Configuration Management ● Ideally, a project is completely designed before any programming begins ● In (my) reality, the software must often evolve as hardware is developed ● In order to maintain flexibility, many parameters are stored in a configuration file rather than hard- coded ● How can these configuration parameters to stored and managed as the project evolves?

Configuration File Methods in LV ● Save front-panel defaults ● Binary files (write a cluster or clusters of parameters directly to a file) ● Save parameters in the Windows Registry ● Use the Configuration (.ini) File VIs ● Other ideas?

Save Front Panel Defaults ● Useful for small programs that don't need much configuration management ● Use VI Server ● Does not work in built executables or on running VIs ● See “Save Defaults” at for a simple implementation

Binary File (Single Cluster) ● Wire a cluster of parameters directly to the Write File primitive ● Very simple to implement ● Limited to a single cluster ● Can't write different cluster types to the same binary file ● Extremely large clusters can excede LabVIEW's capacity ● Hard to maintain as parameters are added ● Old files can not be read once the cluster has changed

Multiple Clusters ● If the number of parameters excedes the capacity of a single cluster, write multiple clusters to a binary file ● Flatten each cluster to a string ● Prepend the string with a flattened string containing the length of the cluster string ● Multiple strings can be written, then read by first reading the string length, then the clusters unflattened

Multiple Clusters ● Very difficult to maintain as the parameters change ● Fairly convoluted diagram for reading and writing the clusters

Saving to the Windows Registry ● LabVIEW VIs are provided for reading and writing registry keys since LV 6.0 ● No examples provided here ● There is inherent danger in messing with the registry ● This has been discussed extensively on Info- LabVIEW (search the archives)

Configuration (.ini) Files ● Since LV 5.1, there have been VIs for reading and writing.ini files ● Improved significantly (polymorphic) in recent versions ● Creates human-readable files ● New keys can be added at any time ● Old keys can be ignored ● Can handle default values for missing keys

Configuration (.ini) Files ● Four variations presented here: 1)Basic 2)Easy-to-Maintain Version 3)Automated using Control References 4)Automated using Variants

Basic Configuration File ● Diagram is simple, but gets big fast ● Cluster names and key names contain redundant data ● Can automatically create the configuration file the first time using the default values ● **Must make sure the writer and reader are always synchronized with each other when parameters are added or changed**

Easy-to-Maintain Config Files ● Developed by David Thomson and Scott McLaughlin (formerly of NOAA ETL, now with Applied Technologies) ● One VI that reads and writes ● Eliminates problems synchronizing names in two VIs ● Wrap the polymorphic Config VIs into a polymorphic Read/Write VI ● Case structure makes the diagram more managable

Easy-to-Maintain Config Files ● Use of Type-def Enum and Unbundling techniques add automatic error checking when more parameters are added ● Can automatically parse cluster and parameter names to generate section and key names

Automated using Control Refs ● Developed by Jim Kring ● see for more information ● Uses the Control Ref for the cluster to parse the parameters, using labels for Section and Key names ● No new programming needed when new parameters are added (assuming flat clusters or arrays of clusters)

Automated using Control Refs ● Default values are handled differently ● Other structures not yet implemented would have to be programmed ● Clever implementation, but now supplanted by the next example

Automated using Variants ● Developed by Jim Kring and Jean-Pierre Drolet ● See for more information ● for downloads ● Requires additional toolsets from OpenG ● Converts the main cluster to a variant, then parses the variant header ● Calls itself recursively to parse any arbitrarily complex structure

Automated using Variants ● Automatically handles writing any data structure with no programming ● Includes handling of default values ● Recently improved to better handle complex data structures ● Arrays are a special case ● Default values for arrays are handled differently than for other data types ● The number of elements read is determined from what is in the file, not by the default array supplied

Final Caveats ● Good practice requires that all elements in a cluster and in each sub-cluster have unique names Especially important when saving clusters to.ini files, as elements with duplicate section and key names will only appear in the file once