Lesson 1 - Problem Solving
Lesson 1 - Problem Solving
Computer running
LabVIEW 8.6 or later
and Windows 2000 or later
ni.com/training
File Locations
ni.com/training
Courses
New User Experienced User Advanced User
LabVIEW Basics I LabVIEW Intermediate I LabVIEW Advanced I
LabVIEW Basics II LabVIEW Intermediate II
ni.com/training
6
Course Learning Map
ni.com/training
Course Goals
ni.com/training
8
Lesson 1
Problem Solving
TOPICS
A. Software Development E. Testing
Method F. Maintenance
B. Scenario G. Project
C. Design
D. Implementation
ni.com/training
A. Software Development Method
• 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
ni.com/training
10
Software Development Method
ni.com/training
11
Software Development Method
• Used in all hands-on development exercises in this course
• Scenario and Design are usually given; you implement the
design and test the implementation
ni.com/training
12
B. Scenario
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
ni.com/training
13
C. Design
ni.com/training
14
Design—Software Inputs
Furnace Example:
Cure Time (seconds)
Desired Cure Temperature (degrees Kelvin)
Current Furnace Temperature (degrees Kelvin)
ni.com/training
15
Design—Software Outputs
Furnace Example:
On/Off switch to control coil voltage
ni.com/training
16
Design – Additional Requirements
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).
ni.com/training
17
Design – Algorithm
Furnace Example:
1. Read exterior temp 5. If current temp ≥ desired temp,
2. Read interior temp turn off voltage to coil
3. If interior temp ≠ 6. If current temp < desired temp,
exterior temp, go to turn on voltage to coil
step 1 7. If time < cure time, go to step 4
4. Read interior temp 8. Turn off voltage to coil
ni.com/training
18
Design –
Flowchart
Visual design
of an algorithm
Furnace Example:
ni.com/training
19
Design – State Transition Diagram
ni.com/training
20
Design – State Transition Diagram
Furnace
Example:
ni.com/training
21
D. Implementation
• Create code for the algorithm or flowchart
• Course goal— to successfully create implementations in
LabVIEW
ni.com/training
22
E. Testing
ni.com/training
23
F. Maintenance
• Ongoing process of resolving programming errors
• Implement changes to the original solution
ni.com/training
24
Exercise 1-1: Software Development Method
ni.com/training
G. Project – Temperature Weather Station
ni.com/training
26
G. Project
ni.com/training
27
G. Project
ni.com/training
28
Summary—Matching Quiz
ni.com/training
29
Summary—Matching Quiz Answers
ni.com/training
30