Search for question
Question

Procedure for: LabVIEW Purpose: This procedure is to continue to introduce the LabVIEW programming environment and the G programming language. The lab demonstrates several key concepts including: The FOR loop,

The WHILE loop, Data Types: Integers: 8-bit signed 8-bit unsigned 16-bit signed and 16-bit unsigned Fixed Point Numbers Floating Point Numbers Single Numbers Double Numbers Extended Numbers Complex Numbers Strings (Characters) Data Structures: Stings Arrays Clusters G-Functions Laboratory Procedure Build Array Convert Boolean Array to a Number Convert a number to a Character String Concatenate Strings Greater Than Or Equal To, Comparison Arithmetic Functions, Add, Subtract, multiply, divide Debugging Features: Data Flow Error List and broken arrow Breakpoints Probes I. In this section, you should learn (review): 1. How to create a VI (LabVIEW Program) and what are its major parts Build the First VI: Numbers-FOR-WHILEloop.VI Laboratory Procedure 2. How to change and use the various mouse functions/Tools. 3. How to access the various Controls and indicators for the User Interface. 4. How to access the various coding Functions for writing the program. 5. How to arrange and connect the functions together to accomplish a task. 6. How to use the WHILE loop to repeat operations. 7. How the Event Structure is used. 8. How to align and space items on both the User Interface and the Code window to make the program more usable and understandable. 9. How Boolean buttons are used 10. How to build an Array of Booleans and convert it into a decimal number. 11. How Loops that do not depend on each other execute in parallel. Lets begin. A. Start LabVIEW; Find LabVIEW in the start menu or the LabVIEW Icon on the desk top and activate it. B. When the splash screen appears Click "Close" to remove the "Welcome to LabVIEW" screen. C. At the LabVIEW screen go to FILE>>NEW VI D. Two Windows will appear that are the first two of the three parts of a VI: X Untitled 1 Front Panel File Edit View Project Operate Tools Window Help II 20pt Application Font ➜ 23 90x • +0 69 Front Panel: User Interface of the VI Untitled 1 Block Diagram File Edit View Project Operate Tools Window Help 20 20pt Application Font P 40 m 3 D Search Y E Search ? Q? Block Diagram: Functional Code of the VI E. On the Front Panel is the Third of the three parts of a VI – the Icon &Connector Laboratory Procedure ICON & Connector from the upper right of the Front Panel The Application Interface of the VI F. Select the Front Panel to begin work. 1. Drop down the menu under “Window” on the tool bar and select Tile left and Right Untitled 1 Front Panel * File Edit View Project Operate Tools II 13pt Application Fo t 2018.JPG + Untitled 1 Front Panel * File Edit View Project Operate Tools Window T Controls Palette Functions Palette: Tools Palette Quick Drop Breakpoint Manager Probe Watch Window Error List Load and Save Warning List Window Help Show Block Diagram Show Project VI Hierarchy LabVIEW Class Hierarchy Browse Relationships This VI in Project Window Menu from Tool Bar The Front Panel is the user interface of the VI (LabVIEW Program). Class Browser .NET Assemblies in Memory ActiveX Property Browser Getting Started Window... Navigation Window Toolbars 2. Click the "View" drop-down memu and select Tool Palette, the first of the three palettes used. Ctrl+Space Ctrl+L Tile Left and Right Tile Up and Down Full Size Ctrl+Shift+E 1 Untitled 1 Front Panel * 2 Untitled 1 Block Diagram * All Windows... Ctrl+Shift+B Ctrl+Shift+N Ctrl+E Ctrl+T Tools Ctrl+/ Ctrl+Shift+W X A M. Dank (H₂) Tool Palette The Tool Palette is used to select the function of the mouse. The functions used most are: a. The finger to operate controls b. The Arrow to select items c. The Text "A" for entering text d. The Spool of Wire for connecting items and e. The Paint Brush for adding colors for quick recognition of items 3. Click the Help button on the Tool Bar and select "Show Context Help" a. The context help will provide a brief description of items when the mouse hovers over the item Laboratory Procedure b. There is a link on the context help to a more detailed explanation of the item if more detail is required. 4. Right click on an empty area of the Front Panel and the "Controls Palette" will appear. The Control Palette contains the Controls and Indicators used by the application operator to enter and obtain information. Modern Controls Modern 1.23 Numeric 812 Boolean String & P... E9 efc Array, Mat... List, Table... Ring T4 Ring & En... Containers. Controls System Classic Variant &... Decoratio... Silver System Classic Express Control & Simulation .NET & ActiveX Signal Processing Addons User Controls Select a Control... Vision 123 Numeric 102 HP Array, Mat... List, Table Change Visible Palettes... Controls Palette for Front Panel Development 5. From the Boolean sub-Palette select the OK button. Search Boolean ES Boolean Express .NET & ActiveX Push Button Select a Control... Vision Search Graph 8, OK I/O 14 Ring & En... Containers Round LED Horizonta..... Vertical T... 0 Refnum Radio But... Variant &... Decoratio... Square LED Slide Swit... Vertical SI.... Silver OK Button Rocker Vert Rocker D CANCIL STOP OK Button Cancel Bu... Stop Butt.... Boolean sub-Palette of the Function Palette 6. Place the button on the Front Panel in the upper left corner. The button Label is highlighted and the text is "OK Button". 7. Type "EMO" for Emergency Off and click the check mark in the the upper left of the window. Also, notice that on the Block Diagram a green Boolean Data Source appeared. 8. Right Click the EMO button on the Front Panel. Laboratory Procedure Untitled 1 Front Panel * File Edit View Project 11 a. Size: 24 b. Style: Bold c. Color: Red Size Style Justify Color 24pt Application Font Font Dialog... Application Font System Font Dialog Font ✓ Current Font EMO OK +0 Visible Items Find Terminal Change to Indicator Make Type Def. Description and Tip... Create Replace Data Operations Advanced Fit Control to Pane Scale Object with Pane 9. Select "Visible Items and uncheck "Label" 10. Select the Text tool "A" for the mouse from the Tool Palette and highlight the OK on the button. Untitled 1 Front Panel File Edit View Project Operate Tools Window Help II 20pt Application Font to ▪00 Mechanical Action. Release Text 11. Type "Emergency [return]Stop" click the check mark and then highlight this text with the text select tool. 12. Move the mouse to the Text Manipulation Menu and select: -00 Text Manipulation Menu Properties The Menu for Buttons & Controls Ctrl+0 Ctrl+1 Ctrl+2 Ctrl+3 Ctrl+4 Text Manipulation Menu User History 69. Search > G. Select the Block Diagram to develop the code. Text Color Select Tool X ✓Label Caption ✓ Boolean Text Search Thermometer Fill ? ? HH System X X