· Web viewGRAPHICAL PROGRAMING IN LABVIEW Name of the Students:Faiz Rasool...

13
EET-3120/E260 Sensors and Instruments Lab # 2 GRAPHICAL PROGRAMING IN LABVIEW Name of the Students: Faiz Rasool E-Mail: [email protected] Group Members Jonathan Rivera 0 | Page Department of Electrical & Telecommunication Engineering

Transcript of · Web viewGRAPHICAL PROGRAMING IN LABVIEW Name of the Students:Faiz Rasool...

Page 1: · Web viewGRAPHICAL PROGRAMING IN LABVIEW Name of the Students:Faiz Rasool E-Mail:Faiz.Rasool@mail.citytech.cuny.edu Group MembersJonathan Rivera Yivan Cortorreal Section:35142 Date:03/04/2015

EET-3120/E260Sensors and Instruments

Lab # 2

GRAPHICAL PROGRAMING IN LABVIEW

Name of the Students: Faiz RasoolE-Mail: [email protected] Members Jonathan Rivera

Yivan CortorrealSection: 35142Date: 03/04/2015Submitted To: Vivian Vladutescu

0 | P a g e

Department of Electrical & Telecommunication Engineering

Page 2: · Web viewGRAPHICAL PROGRAMING IN LABVIEW Name of the Students:Faiz Rasool E-Mail:Faiz.Rasool@mail.citytech.cuny.edu Group MembersJonathan Rivera Yivan Cortorreal Section:35142 Date:03/04/2015

Table of Content

Objective 2

Equipment 2

Theory 3

Procedure 4

Experimental Results 5 - 8

Analysis 9

Conclusion 9

1 | P a g e

Page 3: · Web viewGRAPHICAL PROGRAMING IN LABVIEW Name of the Students:Faiz Rasool E-Mail:Faiz.Rasool@mail.citytech.cuny.edu Group MembersJonathan Rivera Yivan Cortorreal Section:35142 Date:03/04/2015

Equipment:

Computer.

Lab View software.

Objective:

In this lab experiment we will be familiarize with the graphical programming in Lab

View. Because programming in Lab VIEW is very different from programming in one of the

classical text-book programming languages. A Lab VIEW program is very similar to a logical

scheme in which graphical blocks are used instead of text.

2 | P a g e

Page 4: · Web viewGRAPHICAL PROGRAMING IN LABVIEW Name of the Students:Faiz Rasool E-Mail:Faiz.Rasool@mail.citytech.cuny.edu Group MembersJonathan Rivera Yivan Cortorreal Section:35142 Date:03/04/2015

Theory:

Lab VIEW programs are called virtual instrument, or VIs, because their appearance and

operation imitate physical instruments, such as oscilloscopes and multimeters. Lab View

contains a comprehensive set of tools for acquiring analyzing, displaying, and storing data, as

well as tools to help you troubleshoot your code.

Lab View VIs contains three components-the front panel, the block diagram, and the icon

and connector pane. This lesson describes the front panel and block diagrams.

In Lab VIEW, you build a user interface, or front panel, with controls and indicators.

Controls are knobs, push buttons, dials, and other input device. Indicators are graphs, LEDs, and

other displays. After you build the user interface, you add code using VIs and structures to

control the front panel objects. The block diagram contains this code. In some ways, the block

diagram resembles a flowchart.

Fig 1. shows the typical programming of Lab VIEW on Front Panel & Block Diagram Panel

3 | P a g e

Page 5: · Web viewGRAPHICAL PROGRAMING IN LABVIEW Name of the Students:Faiz Rasool E-Mail:Faiz.Rasool@mail.citytech.cuny.edu Group MembersJonathan Rivera Yivan Cortorreal Section:35142 Date:03/04/2015

PROCEDURE:

The Voltage.vi

For the first part of the experiment we created a simulation of a voltage ranging from

2.9 to 3.2. A random number generator was used to generate a number between 0 and 1. This

number was then multiplied by 0.3 and added to 2.9 which resulted in a number in the range of

2.9 to 3.2.

To build this voltage simulator, the following steps were performed:

1. A Meter indicator was moved from Express>>Numeric Indicators in the Controls Palette

and placed on a blank Panel. It was labeled Voltage. This is shown in Figure 1.

2. A Random Number (0-1) function was placed in the Diagram window from the Function

Palette.

3. From Express>>Arithmetic & Comparison>>Express Numeric in the Function Palette, one

multiply function, one Add function, and two Numeric Constant functions were placed in

the Diagram window. The Numeric Constants were given the values 2.9 and 0.3.

4. The connections were made as shown in Figure 2.

4 | P a g e

Page 6: · Web viewGRAPHICAL PROGRAMING IN LABVIEW Name of the Students:Faiz Rasool E-Mail:Faiz.Rasool@mail.citytech.cuny.edu Group MembersJonathan Rivera Yivan Cortorreal Section:35142 Date:03/04/2015

Experimental results:

The Voltage. Vi

This results shows that we have a temperature sensor that gives out voltage that is proportional with the temperature on the Celsius scale by using following equation:

Fig 2: The Panel and Diagram for the Voltage.vi

The Temperature.vi

These results shows voltage is proportional to the temperature in Kelvin. We use following scale equations:

Kelvin

Celsius

Fahrenheit

5 | P a g e

Page 7: · Web viewGRAPHICAL PROGRAMING IN LABVIEW Name of the Students:Faiz Rasool E-Mail:Faiz.Rasool@mail.citytech.cuny.edu Group MembersJonathan Rivera Yivan Cortorreal Section:35142 Date:03/04/2015

Fig 3: Connection of the Fahrenheit case structure

Fig 4 : Connection of the Celsius case structure

6 | P a g e

Page 8: · Web viewGRAPHICAL PROGRAMING IN LABVIEW Name of the Students:Faiz Rasool E-Mail:Faiz.Rasool@mail.citytech.cuny.edu Group MembersJonathan Rivera Yivan Cortorreal Section:35142 Date:03/04/2015

Fig 5: Connection of the Kelvin case structure

Fig 6: Editing the Connector

7 | P a g e

Page 9: · Web viewGRAPHICAL PROGRAMING IN LABVIEW Name of the Students:Faiz Rasool E-Mail:Faiz.Rasool@mail.citytech.cuny.edu Group MembersJonathan Rivera Yivan Cortorreal Section:35142 Date:03/04/2015

Fig 7: The panel and diagram for temperature measurement VI

8 | P a g e

Page 10: · Web viewGRAPHICAL PROGRAMING IN LABVIEW Name of the Students:Faiz Rasool E-Mail:Faiz.Rasool@mail.citytech.cuny.edu Group MembersJonathan Rivera Yivan Cortorreal Section:35142 Date:03/04/2015

Analysis:

There were problem with wiring and in building the block diagrams. But we were able

solve that problem through friends.

Conclusion:

In conclusion, this lab introduces the LABVEIW graphical programming suite by

showing how students can use the Lab VIEW to represent the relationship between voltage and

temperature. We learn many things such as how to represent the voltage-temperature

relationship on the lab view through graphical representation.

9 | P a g e