Lesson 1 - Problem Solving-1

Embed Size (px)

Citation preview

  • 7/28/2019 Lesson 1 - Problem Solving-1

    1/29

    LabVIEW Basics I: Introduction

  • 7/28/2019 Lesson 1 - Problem Solving-1

    2/29

    What You Need To GetStarted

    Computer runningLabVIEW 8.5 or later

    and Windows 2000 or later

    LabVIEW Basics I Course Manual

    LabVIEW Basics I Course CD

    Multifunction DAQ device

    GPIB interface

    DAQ Signal Accessory, wires, and cable

    NI Instrument Simulator and power supply

    Serial and GPIB cables

  • 7/28/2019 Lesson 1 - Problem Solving-1

    3/29

    File Locations

    The course installer places the course files in the

    following location:

    Root DirectoryExercises

    Solutions

    LabVIEWBasics I

  • 7/28/2019 Lesson 1 - Problem Solving-1

    4/29

    Instructional Methods

    Lecture gives a foundation in the topic

    Instructor reinforces foundation

    through demonstrations and quizzes

    Use concept exercises to further

    explore a topic

    Watch a simulation, experiment

    with example VIs

    Use development exercises to gain

    hands-on experience Demonstration of a finished

    development exercise further

    reinforces the learning process

    Topic

    Lecture

    Quizzes

    Demonstrations

    Concept

    Exercise

    Development

    Exercise

  • 7/28/2019 Lesson 1 - Problem Solving-1

    5/29

    Getting The Most Out OfThis Course

    Experiment with hands-on exercises to understand the

    methods used

    Implementations explore a possible solutionyou

    may find a better one Do not come to class prepared to develop an outside

    application; concentrate on the exercises given to

    build a good foundation

  • 7/28/2019 Lesson 1 - Problem Solving-1

    6/29

    CoursesNew User

    LabVIEW Basics ILabVIEW Basics II

    Experienced User

    LabVIEW Intermediate ILabVIEW Intermediate II

    Advanced User

    LabVIEW Advanced I

    Certified LV Associate

    Developer Exam

    Skills tested:

    LabVIEW environment

    knowledge

    Certified LabVIEW

    Developer Exam

    Skills tested:

    LabVIEW application

    development expertise

    Certified LabVIEW

    Architect Exam

    Skills tested:

    LabVIEW application

    development mastery

    Skills learned:

    LabVIEW environment

    navigation

    Basics application creationusing LabVIEW

    Basics of data acquisition

    and instrument control

    Skills learned:

    Modular application

    development

    Structured design anddevelopment practices

    Inter-application

    communication and

    connectivity techniques

    Skills learned:

    Large application design

    Advanced development

    techniques

    Implementing

    multideveloper projects

    Certifications

  • 7/28/2019 Lesson 1 - Problem Solving-1

    7/29

    Course Learning Map

    Lesson 3

    Troubleshooting & Debugging VIs

    Lesson 2

    Navigating LabVIEW

    Lesson 1

    Problem Solving

    Lesson 6

    Storing Measurement Data

    Lesson 5

    Relating Data

    Lesson 4

    Implementing a VI

    Lesson 10

    Common Design Techniques

    Lesson 9

    Instrument Control

    Lesson 8

    Data Acquisition

    Lesson 7

    Developing Modular Applications

  • 7/28/2019 Lesson 1 - Problem Solving-1

    8/29

    Course Goals

    8

    This course prepares you for the following:

    Solve problems using LabVIEW

    Use data acquisition and instrument control in

    LabVIEW applications Use modular programming practices

    Develop, debug, and test LabVIEW VIs

    Effectively use a state machine architecture

  • 7/28/2019 Lesson 1 - Problem Solving-1

    9/29

    Lesson 1: Problem Solving

    TopicsA. Software Development Method

    B. ScenarioC. Design

    D. Implementation

    E. TestingF. Maintenance

    G. Project

  • 7/28/2019 Lesson 1 - Problem Solving-1

    10/29

    A. Software DevelopmentMethod

    10

    Problem solving skills are essential to creating

    software solutions

    Computer programmers use a software development

    method Using the software development method, code is

    more likely to be successful, readable, scalable, and

    maintainable

  • 7/28/2019 Lesson 1 - Problem Solving-1

    11/29

    Software DevelopmentMethod

    11

    1. Define the problem (Scenario)

    2. Design an algorithm or flowchart

    3. Implement the design

    4. Test and verify the implementation

    5. Maintain and update the implementation

  • 7/28/2019 Lesson 1 - Problem Solving-1

    12/29

    Software DevelopmentMethod

    12

    Used in all hands-on development exercises in this

    course

    Scenario and Design are usually given; you implement

    the design and test the implementation

  • 7/28/2019 Lesson 1 - Problem Solving-1

    13/29

    B. Scenario

    13

    Define the problem

    Furnace Example:

    Cure a material at a certain temperature for a set

    amount of time in a furnace. You must know:

    Cure time

    Cure temperature

    Method for adjusting the temperature

  • 7/28/2019 Lesson 1 - Problem Solving-1

    14/29

    C. Design

    14

    Design a solution by analyzing the problem:

    Identify the software inputs

    Identify the software outputs

    Identify additional requirements

    Design an algorithm or flowchart

  • 7/28/2019 Lesson 1 - Problem Solving-1

    15/29

    DesignSoftware Inputs

    15

    Raw data you want to process, such as information

    received from the user, data acquisition, instrument

    control and so on

    Furnace Example:

    Cure Time (seconds)

    Desired Cure Temperature (degrees Kelvin)

    Current Furnace Temperature (degrees Kelvin)

  • 7/28/2019 Lesson 1 - Problem Solving-1

    16/29

    DesignSoftware Outputs

    16

    Results of calculations, processing, or other

    implemented conditions such as information

    displayed to the user, data written to file, signal

    generation, and so on

    Furnace Example:

    On/Off switch to control coil voltage

  • 7/28/2019 Lesson 1 - Problem Solving-1

    17/29

    Design Additional Requirements

    17

    Factors that influence solving the problem

    Furnace Example:

    Assume the furnace cannot start until the interior

    temperature is the same as the exterior

    temperature. This requirement adds an additional

    input: Exterior Temperature (degrees Kelvin).

  • 7/28/2019 Lesson 1 - Problem Solving-1

    18/29

    Design Algorithm

    1. Read exterior temp

    2. Read interior temp

    3. If interior temp

    exterior temp, go tostep 1

    4. Read interior temp

    5. If current temp desiredtemp, turn off voltage to coil

    6. If current temp < desired

    temp, turn on voltage to coil7. If time < cure time, go to step

    4

    8. Turn off voltage to coil

    18

    Steps that process your inputs and create outputs

    Furnace Example:

  • 7/28/2019 Lesson 1 - Problem Solving-1

    19/29

    Design Flowchart

    Visual design

    of an algorithm

    Furnace Example:

  • 7/28/2019 Lesson 1 - Problem Solving-1

    20/29

    Design StateTransition Diagram

    20

    Type of flowchart that indicates the states of a

    program and transitions between states

    Statepart of a program that satisfies a condition,

    performs an action or waits for an event Transitioncondition, action, or event that causes the

    program to move to the next state

    i

  • 7/28/2019 Lesson 1 - Problem Solving-1

    21/29

    Design StateTransition Diagram

    Furnace

    Example:

    21

  • 7/28/2019 Lesson 1 - Problem Solving-1

    22/29

    D. Implementation

    22

    Create code for the algorithm or flowchart

    Course goal to successfully create implementations

    in LabVIEW

  • 7/28/2019 Lesson 1 - Problem Solving-1

    23/29

    E. Testing

    23

    Test implementation with logical and illogical data

    Does logical data produce expected result?

    Does illogical data produce expected error?

    How does illogical data affect the results?

    Is error handling strategy sufficient?

  • 7/28/2019 Lesson 1 - Problem Solving-1

    24/29

    F. Maintenance

    24

    Ongoing process of resolving programming errors

    Implement changes to the original solution

  • 7/28/2019 Lesson 1 - Problem Solving-1

    25/29

    Exercise 1-1: SoftwareDevelopment Method

    25

    Solve a non-programming problem using the

    software development method described in this

    course.GOA

    L

  • 7/28/2019 Lesson 1 - Problem Solving-1

    26/29

    G. Project TemperatureWeather Station

    26

    1. Acquires a temperature every half second

    2. Analyzes each temperature to determine if thetemperature is too high or too low

    3. Alerts the user to if there is a danger of a heatstroke or a freeze

    4. Displays the data to the user

    5. Logs the data if a warning occurs

    6. If the user does not stop the program, the entireprocess repeats

  • 7/28/2019 Lesson 1 - Problem Solving-1

    27/29

    G. Project

    27

  • 7/28/2019 Lesson 1 - Problem Solving-1

    28/29

    G. Project

    Many possible

    solutions

    Example of

    an alternate solution:

    28

  • 7/28/2019 Lesson 1 - Problem Solving-1

    29/29

    SummaryMatching Quiz

    1. Scenario

    2. Design

    3. Implementation

    4. Testing

    5. Maintenance

    A. Apply an algorithm

    or flowchart

    B. Verify the code

    C. Define the problem

    D. Update the code

    E. Identify the inputs

    and outputs