Wednesday, August 18, 2010

Labview Introduction

What is 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.

EMG BASED PROSTHETIC HAND USING LABVIEW

EMG BASED PROSTHETIC HAND USING LABVIEW (VI)

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.

Operating LabVIEW

                              The building blocks of the LabVIEW program are called Virtual Instruments.  The name comes from the fact that the program emulates the appearance and tasks of physical instruments while still operating in the same capability as a text-based program.  There are three key components to any VI: the front panel, the block diagram, and the icon and connector pane.

Front Panel

The front panel is the VI’s interactive interface built with controls (inputs) and indicators (outputs) that replicate conventional instruments, like thermostats or knobs, as may be found in the real world. The controls that are built on the front panel.

Block diagram

The block diagram is the source code location for executing programs in LabVIEW and is equivalent to text-based programming such as C++.  The block diagram has three central parts to its source code: nodes, wires, and terminals.  This is the site where the wiring of graphical objects or terminals is connected to the functional nodes.  Terminals are the controls (inputs) and indicators (outputs) of the block diagram.  When compared with written source code, nodes are equal to statements, functions, and subroutines.  An example of a node may be an addition function or a while loop.  The addition function is considered a lower-level VI.  It is part of the general purpose LabVIEW library of functions and subroutines for programming tasks.  Execution of the program, with all three—nodes, terminals, and wires—can occur when wiring between the terminals and nodes has been connected to designate the flow of data.  The terminals in the front panel have parallel terminals on the block diagram; thereby data continuously flows from the interface in the front panel to the source code in the block diagram and back to the interface.


In order to include robotic arm to the human body we use electromyogram generated from the human muscles. Here we introduced  the  attachment of an robotic hand  performing the same actions similar to the normal human hand working with the help  of the electromyographic potentials generated from the different muscles  that included in performing different actions

In our project we create database programme to replace electrode Interface because it is difficult to use needle electrodes practically so we go for database only and in this project we create a artificial hand with gear wheels and DC motors assembly and it is controlled through LABVIEW. In labview software we create database using threshold values for each and every hand movement. Here we generate four commands from labview accourding to database Threshold values and as per that the artificial hand driven through motor Drivers. Thus as per command the artificial hand generates action according
 to that.

Change Line Names on Digital Waveform Graph Programmatically


The following VI was created as a result of a customer need to change the name of a digital line on the digital waveform graph. Because the line name is an attribute, you must use the Set Waveform Attributes VI in order to modify it programmatically.

digital waveform graph.jpg

block diagram.jpg
Attachments:

Read/Write to a Database from different VIs


Example that shows how a Functional Global Variable can be used to store the information of a Database connection and execute Read, Write and Close operations from various VIs on the same PC without generating errors due to the connection to the same DB.


DBReadCode.png
Attachments:

LabVIEW Object Oriented Programming - Car example


This is a short examples which demonstrates how to implement LabVIEW Object Oriented Programming to manage an application which performs different methods on different objects which fall under a certain class of objects.

In this example, we are dealing with a "Car" Class which can contain many different types of sub-classes (In this case, "Honda" and "Toyota")

Because these sub-classes inherent from the Car Class, the application can be built much more efficiently by creating common methods and class specific methods.  For example, any car can be turned on, but perhaps only one specific type of car has power steering or heated seats.

Required Software: LabVIEW 2009 SP1

block diagram LVOOP.png
Attachments:

Wheatstone Bridge Based Measurements with myDAQ and LabVIEW

This document explains using Wheatstone Bridge to make a precise measurement for sensors such as strain gauges and load cells. The data will be acquired using the DAQ Assistant that is installed into LabVIEW with the NI DAQmx driver as a voltage and converted to a strain, force, or other engineering unit using basic programming in LabVIEW.



The user interface we created shows the Voltage Drop, VO, the measured Excitation Voltage, Vex, and the ratio of the two.  
Figure 3: LabVIEW Front Panel

In LabVIEW we need to measure the voltage drop across the terminals, as well as the excitation voltage applied to the bridge. The voltage drop is then divided by the excitation voltage to find the ratio between the two.  This value is very useful in bridge-based measurements and more logic can be built in to tailor the application as needed.  Finally, we will output the results to numeric indicators on the front panel.

Figure 4: Coding Block Diagram

The LabVIEW block diagram looks very similar to the coding block diagram
Figure 5: LabVIEW 2009 Block Diagram
(The attached LabVIEW code snippet can be dragged-and-dropped to a LabVIEW block diagram, use attached PNG file.  After locating the PNG file, just drag the file icon onto a blank block diagram, as if you were dragging the file onto your desktop.)

Measure Temperature using 10kΩ Thermistor, myDAQ, and LabVIEW

This document explains using a low-cost thermistor to measure temperature with your National Instruments myDAQ in LabVIEW. The data will be acquired using the DAQ Assistant that is installed into LabVIEW with the NI DAQmx driver and converted to a temperature using basic programming in LabVIEW.


The user interface we created both shows the current temperature measurement taken as well as plotting the values over time on a waveform chart.  Temperature Chart stores previous values so that you can see the change in values over time. 
Figure 3: LabVIEW Front Panel

Coding Strategy:

In LabVIEW we need to measure the resistance signal coming from the thermistor from 100Ω to 100kΩ.   This value is converted to a temperature using the polynomial equation from the thermistor specifications referenced at the end of this document.  Finally, we will output the result to a numeric indicator and a temperature chart on the front panel.

Figure 4: Coding Block Diagram

The LabVIEW block diagram looks very similar to the coding block diagram
Figure 5: LabVIEW 2009 Block Diagram
(The attached LabVIEW code snippet can be dragged-and-dropped to a LabVIEW block diagram, use attached PNG file.  After locating the PNG file, just drag the file icon onto a blank block diagram, as if you were dragging the file onto your desktop.)

Measure Temperature using a RTD, myDAQ, and LabVIEW

This document explains using a Platinum RTD to measure temperature with your National Instruments myDAQ in LabVIEW. The data will be acquired using the DAQ Assistant that is installed into LabVIEW with the NI DAQmx driver and converted to a temperature using basic programming in LabVIEW.



A RTD is a thermal sensing device constructed from a metal, in this case platinum, that varies linearly with temperature in a certain range.  There are a multitude of these RTDs that can accept a wide range of temperatures.  In this application, we will focus on a Pt-RTD 3750.  There is a basic equation used to calculate temperature from resistance, similar to the document that involves using myDAQ with a thermistor.  Due to the high value of platinum, the sensors are not necessarily low-cost, but they are commonly used in a variety of applications.

Figure 1: Omega Precision 3-Wire Platinum RTD
The user interface we created both shows the current temperature measurement taken as well as plotting the values over time on a waveform chart.  Temperature Chart stores previous values so that you can see the change in values over time. 
Figure 3: LabVIEW Front Panel

Coding Strategy:

In LabVIEW we need to measure the resistance signal coming from the Pt-RTD from 100Ω to 10kΩ.   This value is the converted to a temperature using the polynomial equation from the RTD specifications for the respective sensor, and the Callendar-Van Dusen equation.  Finally, we will output the result to a numeric indicator and a temperature chart on the front panel.

Figure 4: The Callendar-Van Dusen Equation


Figure 5: Coding Block Diagram

The LabVIEW block diagram looks very similar to the coding block diagram
Figure 6: LabVIEW 2009 Block Diagram
(The attached LabVIEW code snippet can be dragged-and-dropped to a LabVIEW block diagram, use attached PNG file.  After locating the PNG file, just drag the file icon onto a blank block diagram, as if you were dragging the file onto your desktop.)

Turn on a DC Computer Fan using a Solid-State Relay, myDAQ, and LabVIEW

This document explains using a low-cost solid-state relay to control a 12VDC Fan with your National Instruments myDAQ in LabVIEW. The digital output will be generated on the myDAQ digital line using the DAQ Assistant that is installed into LabVIEW with the NI DAQmx driver.



The LED is wired in series with a 330Ω resistor.  Assuming the LED has negligible resistance, the total resistance of the circuit is 330Ω.  According to Ohm’s Law, the current drive with a 5VDC power supply from the digital line would result in 5V÷330Ω= 15.15mA.  As stated in the specification sheet for the LED that is referenced at the bottom of the document, the Led can handle a current up to 20mA, and is recommended to be used with 16 to 18mA; so at 15.15mA we will be safe.  The LED requires a positive input on the longer lead side and a negative input on the shorter side, as seen in Figure 1 above.  We will supply power to this circuit using Digital Line 0 of the myDAQ, and ground the circuit to Digital Ground of the myDAQ.

Figure 2: Wiring Diagram
The user interface we created has a Boolean push button switch to control the SSR to be open or closed, which will then turn the fan on or off. 
Figure 3: LabVIEW Front Panel

In LabVIEW we need to create a front panel Boolean array control to output a 5V digital signal on Line0 to our Solid-State Relay.   This Boolean value is input into our DAQ Assistant which will output the corresponding value to the NI myDAQ digital line.  In digital Boolean logic, a Truecorresponds to a 5V signal, and a False corresponds to a 0V signal.  Therefore, a True will close the SSR, and complete the fan and power supply circuit, allowing power to flow to the fan.

Figure 4: Coding Block Diagram

The LabVIEW diagram looks very similar to the coding block diagram, except the SSR is not included.
Figure 5: LabVIEW 2009 Block Diagram
(The attached LabVIEW code snippet can be dragged-and-dropped to a LabVIEW block diagram, use attached PNG file.  After locating the PNG file, just drag the file icon onto a blank block diagram, as if you were dragging the file onto your desktop.)

Related Posts Plugin for WordPress, Blogger...

Popular Projects

My Blog List

Give support

Give support
Encourage Me through Comments & Followers

Followers