Control
and
[Link]
in
LabVIEW
Hans-Pe:er
Halvorsen,
[Link].
Hardware
Air
Heater
USB-6008
Wi-Fi
DAQ
Water
Tank
Pt-100
TC-01
Arduino
ZigBee
Vision
System
cRIO
NOx
Sensor
LabVIEW
[Link]
Note!
The
Serial
Number
is
in
Fronter!
Download
the
soUware
here:
h:ps://[Link]/nicif/us/acadevallvdl/[Link]
These
are
the
main
modules
we
use
in
the
dierent
courses
at
Telemark
University
College:
LabVIEW
(LabVIEW
Professional
Development
System
32-Bit:
English)
LabVIEW
MathScript
RT
Module
LabVIEW
Control
Design
and
Simula>on
Module
LabVIEW
PID
and
Fuzzy
Logic
Toolkit
LabVIEW
System
Iden>ca>on
Toolkit
NI-DAQmx
Note!
These
packages
are
separate
downloads!
Make
sure
to
download
and
install
all
of
them!
Select
the
SoUware
in
the
August
2013
column
(LabVIEW
2013).
LabVIEW
Training
LabVIEW
Training
for
Students
([Link]
Instruments):
h:p://[Link]/academic/students/learn-labview/
LabVIEW
Course:
h:p://[Link]/~hansha/?training=labview
Control
and
[Link]
in
LabVIEW
Control
Design
&
[Link]
Pale:e
in
LabVIEW
Control
Design
Pale:e
in
LabVIEW
Students:
Check
that
you
have
all
these
pale:es
[Link]
Pale:e
in
LabVIEW
PID
Pale:e
in
LabVIEW
LabVIEW
Control
and
[Link]
Example
We
are
going
to
learn
to
create
such
a
system!
[Link]
in
LabVIEW
[Link]
Pale:e
in
LabVIEW
Simula>on
Loop:
Similar
to
a
While
Loop,
but
cusomized
for
used
together
with
the
[Link]
Blocks
available
in
LabVIEW
Dierent
[Link]
Blocks
by
Category
[Link]
Systems
Discrete
Systems
Nonlinar
Systems
etc.
Simula>on
PaleJe
Video
(15
minutes)
h:p://[Link]/%7Ennh/videos/sim_module/sim_pale:e_overview/sim_pale:e_overview.html
[Link]
Example
Students:
Implement
and
Simulate
this
system
in
LabVIEW
[Link]
Example
-
[Link]
In
the
example
the
following
[Link]
parameters
could
be
used
(right-click
on
the
[Link]
Loop
border
and
select
Congure
[Link]
parameters):
[Link]
Example
-
[Link]
Step
Response
We
see
the
Step
Response
is
as
expected!
PID
Control
in
LabVIEW
Alterna>ve
2:
Alterna>ve
1:
PID
Pale:e
in
LabVIEW
(PID
Toolkit)
Note!
The
[Link]
[Link]
and
PID
[Link]
requires
that
Ti
and
Td
is
in
minutes,
while
its
normal
to
use
seconds
as
the
unit
for
these
parameters.
You
can
use
the
following
piece
of
code
in
order
to
transform
them:
This
means
we
entervalues
for
Ti
and
Td
in
secons
on
the
Front
Panel
and
the
values
are
converted
to
minutes
in
the
code.
This
[Link]
uses
seconds!
PID
Example
Students:
Replace
u
in
the
previous
example
with
the
built-in
PID
Controller
(use
[Link]
2)
PID
Example
-
[Link]
Front
Panel:
PID
Example
-
[Link]
Block
Diagram:
PID
Example
[Link]
[Link]
Right-click
on
the
[Link]
Loop
border
and
select
Congure
[Link]
Parameters
Add
a
Stop
Bu:on
and
a
Halt
[Link]
block
Students:
Run
your
[Link]
with
these
changes
PID
Example
[Link]
[Link]
-
[Link]
[Link]
Subsystem
A
Way
to
structure
your
code,
similar
to
SubVIs
File
->
New
This
is
the
recommended
way
to
do
it!
You
can
easly
reuse
your
Subsystems
in
dierent
VIs
and
your
code
becomes
more
structured!
Create
a
Subsystem
of
this
part
Students:
Change
your
code
above
where
you
create
a
[Link]
Sub
System
for
your
Process
[Link]
Subsystem
-
[Link]
[Link]
Subsystem
Solu.ons2
[Link]
Sub
Systems
Now
your
code
has
become
really
simple
to
understand!
[Link]
using
a
While
Loop
The
[Link]
Loop
has
some
drawbacks/is
more
complicated
to
use
than
an
ordinary
While
Loop.
If
we
use
[Link]
Subsystems,
we
can
use
them
inside
a
While
Loop
instead!
[Link]
Subsystems
So
for
real
[Link]
that
involves
more
than
just
[Link],
I
recommend
to
use
a
While
Loop
instead
of
a
[Link]
Loop.
Hans-PeJer
Halvorsen,
[Link].
Telemark
University
College
Faculty
of
Technology
Department
of
Electrical
Engineering,
Informa>on
Technology
and
Cyberne>cs
E-mail:
[Link]@[Link]
Blog:
hJp://[Link]/~hansha/
22