Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Getting Started with LabVIEW: Familiarizing the Environment and Basic Tools, Exercises of Programming Languages

A part of the ECE 100 Fundamentals of LabVIEW Programming course. It provides background information about LabVIEW, a data acquisition and instrument control software, and guides students through the process of getting familiar with the LabVIEW environment and identifying basic tools and controls. Students will learn how to open LabVIEW, explore the Front Panel tools, and access various objects using different sequences. They will also learn the differences between controls from an ordinary controls palette and tools obtained from a Silver palette.

Typology: Exercises

2019/2020

Uploaded on 09/13/2021

eniger
eniger 🇵🇭

5 documents

1 / 13

Toggle sidebar

Related documents


Partial preview of the text

Download Getting Started with LabVIEW: Familiarizing the Environment and Basic Tools and more Exercises Programming Languages in PDF only on Docsity! ECE 100 Fundamentals of LabVIEW Programming GETTING FAMILIAR WITH LABVIEW Activity No. 1 |. INTENDED LEARNING OUTCOMES At the end ofthis activity, the student shall be able to: 1. Familiarize the NI LabVIEW environment. 2. Distinguish between the front panel and the block diagram. 3. Identify basic tools and controls in LabVIEW. 4. Enumerate real-world applications of LabVIEW. Il. BACKGROUND INFORMATION LabVIEW stands for Laboratory Virtual Instrument Engineering Workbench. It is a system-design platform and development environment for a visual programming language developed by the National Instruments. The graphical language is named “G’ (not to be confused with G-code). Originally released for the Apple Macintosh in 1986, LabVIEW is commonly used for data acquisition, instrument control and industrial automation on a variety of platforms including Microsoft Windows, various versions of UNIX, Linux and Mac OS X. Engineers and scientists use LabVIEW to bring information from the outside world into a computer using data acquisition (DAQ) devices, process these data, and present these data to the user. Thus, LabVIEW can be used to create virtual instruments (VI). A virtual instrument is a computer program that imitates the functionality of the real-world physical instruments. These virtual instruments can also take in external data and do something about these data, just as how a standard instrument will work. These VIs however has the inherent advantage of being flexible in terms of its use. Being virtual, these instruments’ functionalities are being programmed, and hence can be changed whenever wanted and needed. In most cases, virtual instrumentation also results to lower costs, as a single set of hardware (a DAQ device, a computer, and software) can be configured to perform many instrumentation tasks that require multiple physical instruments. A LabVIEW program is also called a virtual instrument or VI. Moreover, LabVIEW can also be used to simulate processes and control external instruments and equipment. Thus, LabVIEW is very useful in the field of instrumentation and control. Ill. LEARNING ACTIVITIES ACTIVITY 1.1: OPENING LabVIEW WINDOW 1. On your desktop computer, open NI LabVIEW 2012. When opened, a Welcome screen (or Getting Started window in older versions) should appear as shown on the next page: Question: What options do you see as the Welcome screen of LabVIEW 2012 appears? What do the following options indicate? I didn't have the 2042 version, so | used the current version downloaded in my laptap, 2075, | see two options, either Imay create a new project or edit old projects | used to do. ECE 100 Fundamentals of LabVIEW Programming Buonw File Qperate Tools Help © LabVIEW 2012 Create Project. ( ) Open. Existing ‘Show [ All Simulation - Tank Leve vi sTiT¥ STFT Spectrogram Demo SpectaSignal.vi L Reels si @e) [ind Drivers and Add-ons Qo) Community anal Support Cra iacd ln eviens ard ee sand the Palisa oe sects Fon ns IEW ane uperade functionality of LabVIEW. request technical support = LabVIEW News | 2. Start using LabVIEW 2012 by clicking on the Blank VI. You can also choose FileONew Vi Menu or press Ctrl+N. Question: How many windows did you see as you click on the Blank VI? What are the functions of these windows? SCREEN-CAPTURE these windows and provide this on your activity report for this Specific question. It opens two windows namely the front panel (FP), first picture, and the block diagram (BD), second picture. Both of these windows have different purpose yet by right-click the functions are seen. 3. On the Front Panel window, right click anywhere on an empty field. The Controls Palette will be shown. Question: As you browse on the Controls Palette, what options do you see? Enumerate these options and state their functions. SCREEN-CAPTURE these options and provide this on your activity report for this specific question. = " The Contrals Palette has the indicators and controls in its interface. Control are knobs, = push button, and input devices, and indicators. For example, the “Numeric” option has the ae 8 “Numeric Control" or “Numeric Indicator” ECE 100 Fundamentals of LabVIEW Programming = Untitled 1FrontPanel® = - =F File Edit View Project Operate Toold > [|| O[m | | 5pt4f-O. [9 Tools x = aft A e "alt? Blel4 ay Question: What are the options do you see on the Tools Palette Window? Explain the functions of these options. « Operating Tool - left side of the Tools Palette - can change the values and text within the control . Positioning Tool - to modify in a way to select, move, resize, and more *® Labelling Tool - may alter some texts and create free labels * — Wiring tool - wire objects together inside a block diagram Question: How do you change the background color of the Front Panel Window? In order to change the color of the Front Panel Window, click the tool palette in the command View to choose colors. Also, to apply the chosen color for the background, click on the front panel. Question: What are the other options do you see in the Front Panel window, specifically the options right below the Menu bar? Explain their uses. > @ OD | 15pt Application Font + | for Mar H~ abe . 1 ? « Run-run the process for a short time « Run Continuously- run the VI process without stopping (loop function) « Abort Execution- to stop the on-going or running VI process -used only when Vl is in a loop function * Pause- to freeze a running VI » Text Settings- to edit any text Align Objects- to align the objects in their axes Distribute Objects- distribute it to different locations Resize Objects- resize to same size any multiple objects Reorder- organize whether which is placed front or back Show Context Help Window- to toggle the display in the context help window « Search- to search and objects 4. Right click anywhere on the Front Panel, and drag one Numeric Control in the Panel. Select that Numeric Control, copy it and paste in such a way that it will look scattered as shown on the figure. Controls labelled Numeric to Numeric 6 should be provided from left to right and Controls labelled Numeric, Numeric 7, Numeric 8, and Numeric 9 should be in a position from top to bottom. Page 5 ECE 100 Fundamentals of LabVIEW Programming a Untitled 1 Front Panel * File Edit View Project Operate Tools Window Help [> [8] OLN] [15pt Application Font [+ [Rox [Mor |[ebs |[eo~| [el Search Numeric 6 _Numeric Numeric 3 go aig alo Numeric Numeric 5 Numeric 2 0 AT vi HF go Numeric 7 yo Numeric 3 #° Numeric 9 5. Select Numeric, Numeric 7, Numeric 8 and Numeric 9 by Left Click and Hold until the said controls are selected. Next, on the options just below the Menu bar, choose Align ObjectsULeft Edges. Question: What happens to the numeric controls selected as you do procedure no. 5? Numeric 7, 8, and 9 are aligned vertically on the left of FP after this procedure. Question: How will you arrange the controls labelled Numeric, Numeric 2 until Numeric 6 in sucha way that they are positioned at the same level, horizontally? I was able to align the numeric controls labelled Numeric from Numeric 2 to Numeric 6 as | selected it all then choosing Align Objects from the Front Panel then click Bottom Edges. “Note: You can rename Numeric Control’s Name by double-clicking on its Label and then type your desired name or label for that particular object. Page 6 ECE 100 Fundamentals of LabVIEW Programming ACTIVITY 1.3: EXPLORING LabVIEW BLOCK DIAGRAM Question: In LabVIEW, when do we use the BLOCK DIAGRAM window? The block diagram serves as a sub VI to allow the user in order to connect wires with objects place in the front panel below the menu bar to simulate the application. 1. Clear the Front Panel from the previous activities you have done. Together with this window, open the Block Diagram window. On the Front Panel window, choose Controls NumericCNumeric Control. Place it on the front panel. Place also a Tank by choosing ControlsONumericL Tank. ce Untitled 1 Front Panel * File Edit View Project Operate Tools Window Help | [& [|| O[ MM) | 15pt Application Font |~ |[ Prox |[sta~ [#4 |[eh A [P| Numeric A op? Question: What do you notice in the Block Diagram as you place objects like Numeric Control and Tank on your front panel? The corresponding nodes of the numeric control and tank is placed in the block diagram as | place the objects in the front panel. Page7 ECE 100 Fundamentals of LabVIEW Programming 3. On the Front Panel window, click the upper arrow on the Numeric Control until it reaches the value 2. Then click on the Run button located just below the Menu bar. The Run button is shown to the right. Question: What happens to the Tank as you run your VI? SCREEN-CAPTURE the result and include this on your activity report. The tank was then filled up to two since it is the value I set the numerical control to. 4 J 4. Set back the Numeric Control to 0. Click now on the Run Continuously button which is located right after the Run button. Click the upper arrow continuously on the Numeric Control. Question: What is the difference when you execute the program by clicking on Run and Run Continuously button? SCREEN-CAPTURE the result and include this on your activity report. The 3rd procedure showed that the application ran _ until the desired numeric value unlike this procedure. Run Continuously allowed it to run the application constantly even the desired value was reached, but | 7 j it didn't go beyond it. 5. Replace the Tank with Numeric Indicator. You can do this by selecting the Tank and press Delete on your Keyboard, then Choose Controls NumericONumeric Indicator. Another way to replace the Tank is by right-clicking on the Tank Replace INumericONumeric Indicator. Question: State the difference between using a Numerical Indicator and Tank. SCREEN-CAPTURE the result of this procedure and include it in your activity report. The numeric indicator indicates the value set in the numeric control, but the tank gives a visual look as it moves to the value placed. The scale may also be ae adjusted unlike the numeric indicator. (oe tn] *“Note: You can change the scale of the Tank if you want your Tank to display negative values. You can do that by Right-Clicking the Tank Object in the FPO.Choose Properties Select Scale TabScale Range and then define your minimum and maximum range. 7 +000 Page 10 ECE 100 Fundamentals of LabVIEW Programming 5. Clear the Front Panel and the Block Diagram from the previous procedures. Create a VI with the following Block Diagram objects as shown: I Untitled 1 Block Diagram * File Edit View Project Operate Tools Window Help : > || @[n)[e] [alta] + || 15pt Application Font |~ || Por ||-tar | (@8~|-, [QL Input 1 Fai GE Input 2 ozs —| iE input 3 ehiz3} BE Output 2 Input 4 7 — =! IDE! Input 5 = Question: What output is generated in the Numeric Indicator labelled Output 1? Question: What output is generated in the Numeric Indicator labelled Output 2? a Bi oitec - 4 dow de Fle Eot View Project Operte Teck Wreow Hao eeu Fle Est View Preect eeGu 2 Input Page 11 ECE 100 Fundamentals of LabVIEW Programming The output generated in Output 1 is 25 since it is the sum of the values placed in the numeric control labelled Input 1 to Input 5. Nonetheless the output generated in Output 2 is 5 due to the sum of all inputs divided to a constant 5. Question: Explain how the VI works. | first place all the needed objects in the front panel as it automatically appear on the block diagram. Then | changed the names of the numeric control and numeric indicator as Input and Output with their corresponding number, respectively. The wires are connected properly to the abjects and function. Input 1 to Input 5 are added through the numeric programming add as the answer is then generated at Output 1. | also placed the numeric programming divide so that after adding all the values placed in the Inputs, the sum will then be divided to a constant 5. The answer is displayed in Output 2. V. ASSESSMENT TASKS 1. In your own perception, how important is LabVIEW in Engineering? National Instruments created a software development language environment and called it LabVIEW. This software in engineering helps the students from different fields to apply what they learn in a whole new platform. We are now able to create diagrams and run a whole new application with functions using a visual tool rather than common programming language. New knawledge to apply the skills wo need as. an Engineer someday. What I personally like and | think important is that | may access this software for free on my free time at home. With the circumstance now, | thought having an online class will be hard since the laboratory works are done at home but I then realize that | may explore on my own any time. Watch other tutorials and apply it instantly. | believe we are really lucky now to have our resources just within our reach. Diligence is really the key to learn. 2. Give some real-life applications wherein LabVIEW can be used. As a student in the engineering field, | may use LabVIEW in solving non-engineering problems. In this software, | follow a data flow with different icons that is visually more appealing to the eyes compared to a line by line coding. With this graphical look, it is easier to learn, execute, and create. 3. What is the difference between a Numeric Control and a Numeric Indicator? Numeric Control is an input display while the Numeric Indicator is an output display. The Numeric Control is naturally a double value. The user may change the value displayed in the said control through the arrows alongside the display or manually by double clicking then input a value. The Numeric Indicator on the other hand display any value it receives. 4. How do we create a visual program in LabVIEW? Creating a visual program in LabVIEW is a lot easier compared to other softwares. The comprehensive functions it has varies in any program the user may think of. He/ She may learn through the simulations provided, create, manipulate, analyze, and run any visual program he/ she has made. Apply the functions to any of the objects set on the front panel and be imaginative in the process. Anytime the user may edit and publish his/ her creation. Page 12
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved