UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW...

28
UNM The LabVIEW Programming Environment and Basic Operations Introduction In this hands-on, you will learn about the LabVIEW programming environment. You will also write a simple Virtual Instrument (VI) to incorporate basic operations in LabVIEW. Finally, you will convert your programs into subVIs. Objectives Learn the three parts of a VI. Learn the three palettes. Learn how data is passed in LabVIEW. Distinguish between controls and indicators on the front panel and block diagram. Create a subVI using two different methods. References Getting Started with LabVIEW. http://www.ni.com/getting-started/labview- basics/ View the 12 Units. On Youtube see: https://www.youtube.com/watch? v=ZHNlKyYzrPE&list=PLB968815D7BB78F9C View the first 10 units LabVIEW Technical Resources: http://www.ni.com/labview/technical-resources/ Theory LabVIEW Programming Basics Introduction

Transcript of UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW...

Page 1: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

UNMThe LabVIEW Programming Environment and Basic Operations

IntroductionIn this hands-on, you will learn about the LabVIEW programming environment. You will also write a simple Virtual Instrument (VI) to incorporate basic operations in LabVIEW. Finally, you will convert your programs into subVIs. Objectives

Learn the three parts of a VI.

Learn the three palettes.

Learn how data is passed in LabVIEW.

Distinguish between controls and indicators on the front panel and block diagram.

Create a subVI using two different methods.

References Getting Started with LabVIEW.

http://www.ni.com/getting-started/labview-basics/

View the 12 Units.

On Youtube see:

https://www.youtube.com/watch?v=ZHNlKyYzrPE&list=PLB968815D7BB78F9C

View the first 10 units

LabVIEW Technical Resources: http://www.ni.com/labview/technical-resources/

TheoryLabVIEW Programming Basics

Introduction

LabVIEW is a graphical programming language environment that uses icons instead of lines of text to create applications. In contrast to text-based programming languages, where text instructions determine program execution, LabVIEW uses dataflow programming, where the flow of data determines the execution sequence.

In LabVIEW, you build a user interface by using a set of tools and objects.

Page 2: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

The user interface is known as the front panel. You then add code using graphical representations of functions to control the front panel objects.The block diagram contains this code. In some ways, the block diagram resembles a flowchart.

LabVIEW programs are called virtual instruments, or VIs, because initially their appearance and operation imitate physical instruments, such as oscilloscopes and multimeters. Every VI uses functions that manipulate input from the user interface or other sources and display that information or move it to other files or other computers.

A VI contains the following three components!:• Front panel—Serves as the user interface. See Figure 2.

• Block diagram—Contains the graphical source code that defines the functionality of the VI. See Figure 4.

• Icon and connector pane—Identifies the VI so that you can use the VI in another VI. A VI within another VI is called a subVI. A subVI corresponds to a subroutine in text-based programming languages. See Figure 5 where the item in the drop down menu is “Select a VI”.

Front Panel

Figure 2: Blank Front Panel

Page 3: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

Figure 3: Front Panel showing Drop Down Menu, Tools, & Controls Palettes

The front panel is the user interface of the VI. You build the front panel with controls and indicators, which are the interactive input and output terminals of the VI, respectively. Controls are knobs, pushbuttons, dials, and other input devices. Indicators are graphs, LEDs, and other displays. Controls simulate instrument input devices and supply data to the block diagram of the VI. Indicators simulate instrument output devices and display data the block diagram acquires or generates.

Items to Note on Front PanelIn Figure 3, the Left Red Arrow shows the title of the VI. Right Red Arrow indicates the ICON and Connector Panel used when this VI is used as a SubVI.

Circle A is the drop down menu for selecting the Controls and Tools Palettes Display.Also the Error List can be selected here.

Circle B is the Tools Palette used to select the function of the mouse. The four most used functions are: the controls operator, first row left; the selection control, first row middle; the text entry control, first row right; and the connection tool, second row left.

Circle C is the Controls Palette where the various controls and indicators are selected for inclusion on the Front Panel.

Page 4: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

Block Diagram

Figure 4: Blank Block Diagram

Figure 5: Block Diagram with Function and Tools Palettes

After you build the front panel, you add code using graphical representations of functions to control the front panel objects. The block diagram contains this graphical source code. Front panel objects appear as terminals on the block diagram. Additionally, the block diagram contains functions and structures from built-in LabVIEW VI libraries. Wires connect each of the nodes on the block diagram, including control and indicator terminals, functions, and structures.

Page 5: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

LabVIEW Palettes

LabVIEW palettes give you the options you need to create and edit the front panel and block diagram.

The Tools palette is available on the front panel and the block diagram.A tool is a special operating mode of the mouse cursor. When you select a tool, the mouse icon changes to the selected tool icon. Use the tools to operate and modify front panel and block diagram objects.

Select View » Tools Palette to display the Tools palette. You can place the Tools palette anywhere on the screen. See Figure 3 & 5.

If automatic tool selection is enabled [ click the top most button on the Tool Palette] and you move the cursor over objects on the front panel or block diagram, LabVIEW automatically selects a likely needed, corresponding tool from the Tools palette.

The Controls palette is available only on the front panel. The Controls palette contains the controls and indicators you use to create the front panel. Select View » Controls Palette or right-click the front panel workspace to display the Controls palette. You can place the Controls palette anywhere on the screen. See C in Figure 3.

The Functions palette is available only on the block diagram. The Functions palette contains the VIs and functions you use to build the block diagram. Select View » Functions Palette or right-click the block diagram workspace to display the Functions palette. You can place the Functions palette anywhere on the screen. See Figure 5.

Dataflow Programming

LabVIEW follows a dataflow model for running VIs. A block diagram node executes when all its inputs are available. When a node completes execution, it supplies its output data to its output terminals. This passes the output data to the next node in the dataflow path.

Creating SubVIs

Introduction

After you build a VI and create its icon and connector pane, you can use it in another VI. A VI called from the block diagram of another VI is called a subVI. A subVI corresponds to a subroutine in text-based programming languages. The node is not the subVI itself, just as a subroutine call statement in a program is not the subroutine itself.

Page 6: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

Setting up the Connector Pane

Figure 6: Connector Pane on Front Panel

To use a VI as a subVI, you need to build/connect a connector pane. The connector pane is a set of terminals that corresponds to the controls and indicators of that VI, similar to the parameter list of a function call in text-based programming languages. The connector pane defines the inputs and outputs you can wire to the VI so you can use it as a subVI.

Define connections by assigning a front panel control or indicator to each of the connector pane terminals. In the newer versions of LabVIEW, the Connector Panel is visible in the upper right corner of the front panel window. (Older version: The connector pane and the icon image toggles when one or the other is right clicked.) Each rectangle on the connector pane represents a terminal or data port into or out of the VI . Use the wiring tool [Figure 7] to assign inputs and outputs. The number of terminals LabVIEW displays on the connector pane depends on the number of controls and indicators on the front panel.

Figure 7: Wiring Tool in Tool PaletteThe connector pane has, at most, 28 terminals. If your front panel contains more than 28 controls and indicators that you want to use programmatically, group some of them into a cluster (a data type similar to an array) and assign the cluster to a terminal on the connector pane. See Figure 8.

Page 7: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

Figure 8: Cluster Function for Block DiagramTo set the number of terminals needed, select a different terminal pattern for a VI by right-clicking the connector pane and selecting Patterns from the drop-down menu. See Figure 9. Select a connector pane pattern with extra terminals. You can leave the extra terminals unconnected until you need them. This flexibility enables you to make changes with minimal effect on the hierarchy of the VIs.

Figure 9: Connector Pane Terminal Patterns

If you create a group of subVIs that you often use together, give the subVIs a consistent connector pane with common inputs in the same location to help you remember where to locate each input. If you create a subVI that produces an output another subVI uses as the input, align

Page 8: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

the input and output connections to simplify the wiring patterns. Place the error in clusters on the lower left corner of the connector pane and the error out clusters on the lower right corner.

Settings Required, Recommended, and Optional Inputs and Outputs

You can designate which inputs and outputs are required, recommended, and optional to prevent users from forgetting to wire subVI connections. After being connected, right-click a terminal in the connector pane and select This Connection Is from the drop-down menu. A checkmark indicates the terminal setting. Select Required, Recommended, or Optional. See Figure 10.

Figure 10: Selecting Required, Recommended, or Optional for a terminal.For terminal inputs, required means that the block diagram on which thesubVI is dropped will be broken if the required inputs are not wired.Required is not available for terminal outputs. For terminal inputs and outputs, recommended means that the block diagram on which the subVI is dropped can be run if the input is not wired but the Warnings dialog box will generate a warning that the input has not been wired. Optional means that the block diagram on which the subVI is dropped can be run and will not generate any warnings if the terminal input or output is not wired.

Inputs and outputs of VIs in vi.lib are already marked as Required, Recommended, or Optional. LabVIEW sets inputs and outputs of VIs you create to Recommended by default. Set a terminal setting to required only if the VI must have the input or output to run properly.

In the Context Help window, required connections are bold, recommended connections are plain text, and optional connections are dimmed if you have the Detailed view selected or do not appear if you have the Simple view selected.

Creating an Icon

Page 9: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

Figure 11: Icon EditorEvery VI displays an icon in the upper right corner of the front panel and block diagram windows. An icon is a graphical representation of a VI. It can contain text, images, or a combination of both. If you use a VI as a subVI, the icon identifies the subVI on the block diagram of the VI.

The default icon contains a number that indicates how many new VIs you have opened since launching LabVIEW. Create custom icons to replace the default icon by right-clicking the icon in the upper right corner of the front panel or block diagram and selecting Edit Icon (Figure 11) from the drop-down menu or by double-clicking the icon in the upper right corner of the front panel or block diagram.

Templates—Displays icon templates you can use as a background for the icon. This page displays all .png, .bmp, and .jpg files in the Libraries\Documents\LabVIEW Data\Icon Templates directory.

Category—Lists categories of icon templates from which you can select. The names of the categories correspond to the names of the subfolders in the LabVIEW Data\Icon Templates directory. The All Templates category is always visible and includes all icon templates in the LabVIEW Data\Icon Templates directory. The All Templates category is always visible and includes all icon templates in the LabVIEW Data\Icon Templates directory.

Filter templates by keyword—Specifies a keyword to use to filter the list of icon templates. The Icon Editor dialog box displays all icon templates whose name contains the keyword you specify.

Icon Text—Specifies the text you want to display in the icon. Line text—Specifies a line of text for the icon. Line color—Specifies the color of the corresponding line of text for the icon. Font—Specifies the font of all text you enter on the Icon Text page.

Page 10: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

Alignment—Specifies the alignment of all text you enter on the Icon Text page. Size—Specifies the font size of all text you enter on the Icon Text page. Center text vertically—Specifies whether to center the lines of text vertically

within the icon. If you use an icon template with a banner and place a checkmark in this checkbox, the Icon Editor dialog box centers the icon text vertically within the body of the icon.

Capitalize text—Specifies whether to capitalize all text you enter on the Icon Text page.

Glyphs—Displays glyphs you can include in the icon. The Icon Editor dialog box displays all .png, .bmp, and .jpg files in the LabVIEW Data\Glyphs directory. By default, this page includes all glyphs in the Icon Library at ni.com. Select Tools » Synchronize with ni.com Icon Library to display the Synchronize with Icon Library dialog box and synchronize the LabVIEW Data\Glyphs directory with the most recent glyphs in the Icon Library. Layers—Displays all layers of the icon. Select Layers»Show Layers Page to display this page if it is not already showing.

Icon Text—Displays the preview, name, opacity, and visibility of the Icon Text layer. This layer consists of all text you enter on the Icon Text page of the Icon Editor dialog box. You can change only the opacity and visibility of this layer.

User Layers—Displays the preview, name, opacity, and visibility of all user layers. You can select a user layer by clicking the corresponding preview on the Layers page or by using the Move tool to select a layer in the Preview area of the Icon Editor dialog box.

Add Layer—Adds a user layer. Remove Layer—Removes the layer(s) you select. Move Up—Moves the layer(s) you select up one layer level. Move Down—Moves the layer(s) you select down one layer level.

Icon Template—Displays the preview, name, opacity, and visibility of the Icon Template layer. This layer consists of the icon template you select on the Templates page of the Icon Editor dialog box. You can change only the opacity and visibility of this layer.

Creating SubVIs from Sections of a VI

Convert a section of a VI into a subVI by using the Positioning tool to select the section of the block diagram you want to reuse and selecting Edit » Create SubVI (Figure 12). An icon for the new subVI replaces the selected section of the block diagram. LabVIEW creates controls and indicators for the new subVI and wires the subVI to the existing wires.

Creating a subVI from a selection is convenient but still requires careful planning to create a logical hierarchy of VIs. Consider which objects to include in the selection and avoid changing the functionality of the resulting VI.

Page 11: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

Figure 12: Edit Command: Creating a SubVI

Equations

Converting ºC to ºF

The formula for converting degrees Celsius to degrees Fahrenheit is as follows: °F = (1.8 * °C) + 32

For example, to convert a Celsius temperature of 100 degrees into degrees Fahrenheit, first multiply the Celsius temperature reading by 1.8 to get 180. Then add 32 to 180 and get 212 degrees Fahrenheit.

Slope of a LineThe formula for the slope of a line is as follows:

Slope = (Y2 – Y1) / (X2 – X1)

Page 12: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

where (X1, Y1) and (X2, Y2) are points on the line.

In Class ProcedurePart 1. Converting ºC to ºF

In Part 1, you will create a VI that can be used as a sub-VI in a later exercise.

1. Launch LabVIEW from Start >> Programs >> National Instruments >> LabVIEW 201x >> LabVIEW 201x . (Where x is the year of the version being used) Click File >> New VI to open a new front panel.

2. (Optional) Select Window » Tile Left and Right to display the front panel and block diagram side by side. See Figure 13.

Figure 13: Tile Left and Right3. Create a numeric digital control. You will use this control to enter the value for degrees Centigrade.

a. Right click the Front Panel work area to get to the Control Palette.b. Select the digital control on the Controls » Numeric palette. If the Controls palette is not visible, right-click an open area on the front panel to display it. See Figure 14.

Page 13: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

Figure 14: Numeric Control on Controls Palettec. Move the control to the front panel and click to place the control.d. Type deg C inside the label and click outside the label or click the Enter button on the toolbar, shown at left. If you do not type the name immediately, LabVIEW uses a default label. You can edit a label at any time by using the Labeling tool, see Fig. 7 upper right “A”.

4. Create a numeric indicator. You will use this indicator to display the value for degrees Fahrenheit.

a. Select the numeric indicator on the Controls » Numeric palette. See Figure 15.

Page 14: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

Figure 15: Numeric Indicator on Controls Paletteb. Move the indicator to the front panel and click to place the indicator.

c. Type deg F inside the label and click outside the label or click the Enter button. See Figure 16.

Figure 16: Front Panel User Interface for Temperature Conversion Program

5. Display the block diagram by clicking it or by selecting Window » Show Diagram.

LabVIEW creates corresponding control and indicator terminals on the block diagram. The terminals represent the data type of the control or indicator. For example, a DBL terminal, shown at left in Fig 18, represents a double-precision, floating-point numeric control or indicator.

6. Select the Multiply and Add functions on the Functions » Numeric palette and place them on the block diagram. If the Functions palette is not visible, right-click an open area on the block diagram to display it. See Figure 17.

Page 15: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

Figure 17: Getting to Numeric Functions on the Function Palette

7. Select the numeric constant on the Functions » Numeric palette and place two of them on the block diagram. It is further down the Numeric Function Menu. When you first place the numeric constant, it is highlighted so you can type a value.

9. Type 1.8 in one constant and repeat process for a second constant of 32.0.

If you moved the constants before you typed a label, use the Labeling tool to enter the values.

Figure 18: C to F Program9. Use the Wiring tool to wire the icons as shown in the block diagram in Figure 18.

• To wire from one terminal to another, use the Wiring tool to click the first terminal, move the tool to the second terminal, and click the second terminal. You can start wiring at either terminal.

• You can bend a wire by clicking to tack the wire down and moving the cursor in a perpendicular direction. • To identify terminals on the nodes, right-click the Multiply and Add functions and select Visible Items » Terminals from the shortcut menu to display the connector pane. Return to the icons after wiring by right-clicking the functions and selecting Visible

Page 16: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

Items » Terminals from the shortcut menu to remove the terminals uncheck Visible.

• When you move the Wiring tool over a terminal, the terminal area blinks, indicating that clicking will connect the wire to that terminal and a tip strip appears, listing the name of the terminal.

• To cancel a wire you started, press the <Esc> key or right-click.

10. Display the front panel by clicking it or by selecting Window » Show Front Panel or use <Ctrl E>.

11. Save the VI because you will use this VI later in the course. Select File » Save. Type ConvertCtoF.vi in the dialog box. Click the Save button.12. Enter a number in the digital control and run the VI.

a. Use the Operating tool or the Labeling tool to double-click the digital control and type a new number.

b. Click the Run button to run the VI.

Figure 19: Run Arrow when there are no errors

c. Try several different numbers and run the VI again.

13. Double-click the icon in the upper right corner of the front panel [Figure 6] and activate the Icon Editor dialog box. See Figure 11.14. Double-click the Select tool on the left side of the Icon Editor dialog box and select all the default icon by dragging the select tool across the entire icon. See Figure 20.

Figure 20: Icon selection tool.15. Go to Edit >> Clear All to remove the default icon.

Page 17: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

16. Go to Layers tab, select the line tool and draw lines on the extreme most edges making a box

17. Go to the Icon Text tab, and type “C [8 spaces] F” into the Line 2 text box.

18. Go to the Layers taba. Use the Pencil tool to create the arrow pointing from C to F.

b. When the icon is complete, click the OK button to close the Icon Editor dialog box. The icon appears in the upper right corner of the front panel and block diagram.

18. Go to the Front Panel and locate the Connector Pane.

In an Older Version LabVIEW, right-click the icon on the front panel and select Show Connector from the shortcut menu to define the connector pane terminal pattern.LabVIEW selects a connector pane pattern based on the number of controls and indicators on the front panel. For example, this front panel has two terminals, deg C and deg F, so LabVIEW selects a connector pane pattern with two terminals.

19. Assign the terminals to the digital control and digital indicator.

a. Click the upper left terminal in the Connector Pane and the mouse tool should change to the wiring tool and the terminal becomes black.

b. Now place the wiring tool over the “deg C” input control and click. This control is now connected to the program input terminal. The terminal should have changed an orange color.

c. Click the upper right terminal in the Connector Pane and the “deg F” indicator to complete the program interface, [API, Application Program Interface]

20. Select File » Save to save the VI as C2F on the Desktop. 21. Test the program for proper operation with techniques described in Part 4. Be sure to record the input vales and results produced in a table in your lab notebook.

22. Select File » Close to close the VI.

Part 2. Develop a Program to convert o F to o C.

Follow the same steps as in Part 1 but with a different formula.

Page 18: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

Part 3. Calculating the Slope of a LineUsing the techniques you learned in Part 1, create a VI to calculate the slope of a line. Then, transform the code into a subVI using the Edit » Create SubVI method. Save the VI as Slope.vi. Save the subVI as SlopeSub.vi. The equation for slope is given in the Theory section. Open a new VI and complete the front panel and block diagram as follows:

Front Panel

Block Diagram before subVIAfter creating the subVI, your block diagram will resemble the one below.

Block Diagram with subVI

To create the subVI, use the selection tool (mouse) to high the athematic operators minus and divide and part of their connection wires. Do not have the data terminals selected.

With this section highlighted go to the Edit drop-down menu and select “Create SubVI”.

Page 19: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

In the Block Diagram, the highlighted section should be replaced with a function box. Double click this function box.

The function box’s Front Panel will open and it will have the same controls and indicator that the original VI had. Open the function box’s Block Diagram and it will appear the same as the original VI’s Block Diagram.

Click the boxed x in the upper left corner of the subVI’s Front Panel and a dialog will ask you to save this subVI. Click “Save”.

A dialog window to save the file appears. Make the filename, “slopeSubVI” and save it to the Desktop.

Save the main program as “Slope” on the Desktop.

Test your slope program as described in Part 4.

Part 4. Testing the Programs

Test the programs and report the results in the report.

The test for a program should have predetermined set of test inputs and each test input should have an expected result or action. The test inputs here should test the range of the possible temperature inputs and obvious user input errors. Test inputs for the C to F converson program should include positive temperatures to positive temperatures (100 to 212), negative temperatures to positive temperatures (ie -5 deg C to ? F), and negative temperatures to negative temperatures (-40 C to ? F), and any limits (-273.15°C or 459.67 degrees Fahrenheit). User errors would be attempting to input alpha characters into the input or enter a number below absolute zero. For the slope program test cases should product a positive slope, zero slope, negative slope, infinite slope, and no slope.

Part 5. Lab Reporting

There should be one report written by both partner.

The lab report should follow the example report format on the class website. There should be a Title Page with the name of the report, the date, and the authors. The name should contain the word “LabVIEW” somewhere.

There should be an Abstract consisting of a short explanation of what the report is about.This report was about LabVIEW programs for converting temperatures and determining line slopes.

There should be a Table of Contents followed by a List of Figures, a List of Tables, a section describing the Background and References, a section describing the Lab Procedure and

Page 20: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

Equipment, a Theoretical Analysis section, a Verification Results section, and finally a Discussion section.

The List of Figures should contain the figure number and figure title of all figure in the report.

The List of Tables should contain the table number and table name of all tables in the report.There will always be at least two tables – the table of expected values and the table comparing the expected values with the measured (or produced) values. See Report Format on website.

The Background and Reference section should provide the references used to understand, setup, and perform the experiment. It will include a reference to the experiment instructions, reference to books, articles, and manuals used in the experiment.

The Lab Procedure and Equipment section will note the above reference to the experiment instructions as the procedure. Any variations from the referenced procedure should be noted in this section. This section should contain everything needed to perform the experiment and duplicate the results, either by reference or explicit statements. Circuit Diagrams should explicitly appear here. Besides the reference to the Lab Procedure, screen shots of the program’s front panel and block diagram can appear in this section.

The Theoretical Analysis section should explicitly state the formulas used and show the calculations to obtain the expected results. These expected results should use the actual measured values of the components used in the experiment. For this lab the formulas are the conversion formulas and the expected results are the converted temperature values for the input test cases.

The Verification Results section should contain the actual results of the experiment and how they compare to the expected results. This information should be presented in a table where the first column is the name of the characteristic being measured, the second column is the expected value of the measurement, the third column is the actual value measured, the forth column is the error between the two values, the fifth column is the percentage error, and the last column is for comments. There should always be a comment if the percentage error is greater than 15%. This comment will express the reason for the large error. For this lab the tables would have the program input values, the expected output values (from the Theoretical Analysis section), the actual output, the difference between these two (should be zero in most cases but there can be some very small errors for some temperature values).

The Discussion section should describe difficulties and possible improvements in accuracy concerning the measurements will be made. Any questions raised in the assignment will be answered. Any extensions, improvements, and suggestions for the experiment will be detailed.

Questions1. What is a VI? What are the three main parts of a VI? Briefly describe each.

2. What are the three palettes? Briefly describe each.

Page 21: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming

3. How is data passed in LabVIEW?

4. How can you tell the difference between controls and indicators on the front panel? On the block diagram?

5. Explain the two methods of creating a sub-VI.

Page 22: UNM - PBworksecelabs.pbworks.com/w/file/fetch/119934297/LabVIEW-L…  · Web viewThe LabVIEW Programming Environment and Basic Operations. ... LabVIEW is a graphical programming