Doing some Boolean: On/Off

Slides:



Advertisements
Similar presentations
LabVIEW is a graphical programming development environment for data acquisition and control, data analysis, and data presentation. With LabVIEW you can.
Advertisements

Lesson 2 Navigating LabVIEW
Based on LabVIEW 2011 Student Edition
Add and Use a Sensor & Autonomous For FIRST Robotics
1. 2 LabVIEW for FRC Doug Norman National Instruments January 6, 2012.
De la Rosa-Pohl ECE 1100 Introduction to Engineering Intro to LabVIEW: Programming for Symon University of Houston Diana de la Rosa-Pohl Len Trombetta.
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 5 Loops  Read Bishop, Sections 5.1 and 5.2.  Lab #5 and Homework #5 due next week.  Exam #1 next.
CS320n –Visual Programming LabVIEW Foundations. Visual ProgrammingLabVIEW Foundations2 What We Will Do Today Hand back and review the midterm Look at.
Laboratory 5: Introduction to LabVIEW. Overview Objectives Background Materials Procedure Report / Presentation Closing.
Introduction to LabVIEW Seth Price Department of Chemical Engineering New Mexico Tech Rev. 10/5/14.
EG1003: Introduction to Engineering and Design Introduction to LabVIEW.
Infinity-project.org Engineering education for today’s classroom The Infinity Project SM LabVIEW for The Infinity Project.
Visual Basic Chapter 1 Mr. Wangler.
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Software: Building apps Suitable for: Advanced.
LabView Basics The Fighting Pi Controls Group. About LabView LabView is a highly adaptable programming GUI (Graphic User Interface) LabView compiles the.
Chapter 1 LabVIEW Basics. Features > Uses Graphic Symbols > Created by National Instruments > Virtual Instruments (VIs) > Extensive Library of VIs.
Virtual Instrumentation With LabVIEW. Front Panel Controls = Inputs Indicators = Outputs LabVIEW Programs Are Called Virtual Instruments (VIs) Block Diagram.
LabVIEW an Introduction
Introduction to LabVIEW
DRAFTING TECHNIQUES I 136. Here is a basic shape. From here, we will do some advanced drafting once we put this shape on a sheet as a drawing. Select.
Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.
CS320n –Visual Programming More LabVIEW Control Structures.
1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.
Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.
Introduction to LabVIEW 8.5
Lab 1 : Introduction to LabView 1 Southern Methodist University Bryan Rodriguez.
Using Pro-Engineer to Create 3 Dimensional Shapes Kevin Manner Kevin Manner Tim Reynolds Tim Reynolds Thuy Tran Thuy Tran Vuong Nguyen Vuong Nguyen.
CS320n –Visual Programming
Virtual Instrumentation With LabVIEW. Front Panel Controls = Inputs Indicators = Outputs Block Diagram Accompanying “program” for front panel Components.
CS320n –Visual Programming More LabVIEW Foundations.
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 9 Arrays  Read Bishop, Sections 6.1 to 6.3.  Homework #9 and Lab #9 due next week.  Quiz #5 next.
Computer Programming Modeling a Passive Solar Home.
Digital Electronics and Computer Interfacing Tim Mewes 2. LabVIEW Basics part II.
Introduction to LabVIEW
Computer Programming Modeling a Passive Solar Home.
MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering.
Introduction to LabVIEW. Overview Objectives Background Materials Procedure Report/Presentation Closing.
Week 3 Data Structures and Common Tools. Common Tools in Labview Automatic Tool Selector Using the Operating Tool Using the Positioning Tool to Select.
EG1003: Introduction to Engineering and Design Introduction to LabVIEW.
Working with Tables A table is a grid of cells arranged in rows and columns. Tables can be customized and are useful for various tasks such as presenting.
ECT 109 Help Bcome Exceptional
Visual Basic.NET Windows Programming
Invitation to Computer Science, C++ Version, Fourth Edition
Introduction to LabVIEW
Welcome! Workshop 3 of 7.
EET 2259 Unit 4 SubVIs Read Bishop, Chapter 4.
Scratch for Interactivity
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
EET 2259 Unit 3 Editing and Debugging VIs
Invitation to Computer Science, Java Version, Third Edition
Course Learning Map Lesson # Lesson Title Lesson 3 Lesson 2 Lesson 1
MicroEconomix 1500 RSLogix 500 LAB#2
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
Introduction to LabVIEW
Coding Concepts (Basics)
Introduction to LabVIEW
Structures- case, sequence, formula node
CST-115 Introduction to Computer Programming
Introduction to LabVIEW
EET 2259 Unit 9 Arrays Read Bishop, Sections 6.1 to 6.3.
Introduction to LabVIEW
CS334: Logisim program lab6
EET 2259 Unit 7 Case Structures; Sequence Structures
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
EET 2259 Unit 2 Virtual Instruments
EET 2259 Unit 4 SubVIs Read Bishop, Chapter 4.
EET 2259 Unit 8 Other Structures; Local Variables
EET 2259 Unit 3 Editing and Debugging VIs
Presentation transcript:

Doing some Boolean: On/Off Examples of Boolean devices are switches LED’s Toggles, Sliders All of these items can be either controls (a switch) or an indicator (an output). Usually a switch would control and LED, but it can be arranged with LED’s controlling switches

Create a new VI from the File menu. This should show both a Front Panel and Block Diagram

Add a Boolean Control on the Front Panel Right-click anywhere in the Front Panel to bring up the Controls Palette. Hover on the Boolean Controls and left-click to select a Horizontal Toggle Switch. Left-click on the Front Panel to place the Toggle Switch in position.

You can resize the switch You can resize the switch. This can usually be done for any Control or Indicator. Left-click on the switch to turn it on/off. This uses the Operating Tool from the Tool Menu. It should get automatically chosen for you.

Add a Boolean Indicator on the Front Panel Right-click anywhere in the Front Panel to bring up the Controls Palette. Hover on the Boolean Controls and left-click to select a Square LED. Left-click on the Front Panel to place the LED on the Panel.

The Switch and the LED are now on the Front Panel Right click on any of the objects change their attributes and properties.

A simple wiring of the Block Diagram completes the program. It is a good idea to label the items with names that make sense to you.

Run this program and turn the LED on and off using the switch You are now a Labview Programmer. Able to make lots of money for any company that wants to automate a test or measurement system.

Boolean Logic Booleans can often be used to control things in the program using logical conditions. We will do a simple “and” logic to demonstrate.

Add a Boolean Function on the Block Diagram Right-click anywhere in the Block Diagram to bring up the Functions Palette. Hover on the Boolean and left-click to select an “And” logical. Left-click on the Block Diagram to place the And block in place.

The Block Diagram now has the “And” block. An “And” goes True if both inputs are True. The two necessary controls could be added on the Front Panel and then wired. An easier method is to make them directly on the Block Diagram. Carefully place your curser on the top left Node of the And block. Right-click and create the Control for this Node. This will create the “x” Control Node. Repeat for the “y” Control Node.

Arrange the blocks neatly. The corresponding controls show up on the Front Panel. Very Useful Technique This technique of right-click on the Node to create either a control or indicator makes programming much more efficient.

Right click to add the boolean indicator on the output of the And block. Take the time to notice what the Nodes say when you hover over them. This describes how many of the blocks work.

The Front Panel comes out looking this way. Run the program continuously and you should be able to figure out the logic of the And block.

You can right-click on any of the objects and replace them with ones that you like better. Properties can be modified also to change the appearance or the operation of controls and indicators. Sometimes it can be difficult to tell what is on/off for certain types of these boolean devices.

Numeric comparisons have a Boolean output. Numerical values can be compared in a variety of ways. Right-click on the Block Diagram and look at the Comparisons that can be made.

Place a pair of numerical controls on the Front Panel of your VI. Go to the Block Diagram and place an Equals block in it. Wire the controls to it. Create the indicator by right-clicking on the correct Node of the block. Continuously run this vi and see that the LED goes on when the two values are equal.

Your finished project should look something like this Your finished project should look something like this. One issue you might have is Getting the numbers to be equal because of the decimal points. You can change the Numbers to integer representations to make them easier to make equal. This is done Under the “Properties” menu and I did it with the Slider so that it can be equal to 7.

Labview Boolean Assignment Make the basic LabView VI that corresponds to this tutorial. Add some other feature to your VI that demonstrates that you can do something with booleans. I suggest putting more than 1 boolean “and” or “or” block. Compare some numbers for larger or smaller. If you are in Geometry, you could make a LabView VI that will tell if three lengths of bar will go together to make a triangle.