"This post confirms my ownership of the site and that this site adheres to Google AdSense program policies and Terms and Conditions."

"This post confirms my ownership of the site and that this site adheres to Google AdSense program policies and Terms and Conditions."

Wednesday, August 25, 2010

labview and its programming types

This post will share a design pattern that can be used in a serious GUI based application where several events must occur based on button presses. While LabView does have an event handling structure, this state machine can contain states based on button presses, but can also be extended to contain other cases (states) which execute in sequence as specified.

For this post, rather than show the details of every menu, here is the finished block diagram:

This follows the state machine design pattern. The state is tracked with a string via a shift register passed to the case structure each iteration of the while loop. The output tunnel will contain the state chosen for the next iteration. In this example, 4 buttons have been placed on the front panel, and there is a state called "Idle" which should be called when nothing is taking place. In the idle state, the 4 boolean buttons are built into an array which is searched for a "True". Since the Search 1D array function (found under the array menu) will return -1 if no "True" elements are found in the array, the "Idle" state continues until a button press is found (indicated by a search return value >= 0). When this happens, a new state is indexed from the string array constant and passed out of the Idle state on the output tunnel. You can place whatever code you like in the various states for your button presses.

labview

LabVIEW is an acronym for Laboratory Virtual Instrument Engineering Workbench.  It is a computer software development application created by National Instruments™ (Austin, Texas) that aims to aid scientists and researchers in gathering and understanding data using computer programs.  LabVIEW is a G graphical programming software that utilizes graphical objects to symbolize lines of code instead of the average programmers’ text-based languages.  In the source code of this graphical program, data execution depends on the flow of data.  What may take days in C++ or Java written code is cut down to hours in G programming.  Add to this, LabVIEW has built a general purpose library of functions and subroutines for most programming tasks.  The time saved allows the user to fully focus and understand how data is flowing.  Even though some type of programming experience is useful, a novice in text-based programming language(s) can grasp the mechanics of LabVIEW because it is a graphical programming language utilizing iconic symbols to illustrate program action.

microcontrollers

It is very important to have a connection to the database before any type of creation or modification can be processed.  The different level of security and parameters are determined by the database management system (DBMS).  “ODBC uses Data Source Name (DSN) for the connection and ADO uses Universal Data Links (UDL) for the connection.”1  This project uses ADO. Creating data links in Windows is not accessible to the user unless Database Connectivity Toolset builds data links by registering UDL files in the Windows registry.1  After the UDL files are registered in Windows, the user can right click on the Desktop and find Microsoft Data Link as shown in the below figure.  For this project, Universal Data Links are used for connecting LabVIEW to the database.