Lab 1 Presentation
Lab 1 Presentation
Labs Introduction
General Introduction
Lab 1 Introduction
Fill in swipe card form
Make groups (min 2 students, max 3)
Start work on Lab 1
ENGG*4420 Lab 1 2
General Introduction
ENGG*4420 Lab 1 3
Deadlines
ENGG*4420 Lab 1 4
Marking
ENGG*4420 Lab 1 5
Lab 1
ENGG*4420 Lab 1 6
Lab 1 Development Environment
ENGG*4420 Lab 1 7
Lab 1 – Simple Hot Air Blower
PT 326 Process Trainer
ENGG*4420 Lab 1 8
Lab 1 Architecture
ENGG*4420 Lab 1 9
Control of a Thermal System
LabVIEW
Altera
Plant Model
dS
Vi Ke
Equation (6)
VO s 1
LabVIEW Plant Implementation
The Plant system is defined in LV
using transfer function VIs.
Setup Plant Transfer Function Execute Plant System
Control System
PID-based control system
Proportional
Integral
Derivative
Control is based on an Error signal
Implemented in LabVIEW using the
PID VI
Set Point
Output
Process Variable
Lab 1 Requirements/Steps
ENGG*4420 Lab 1 14
Lab 1 Requirements/Steps
ENGG*4420 Lab 1 16
LabVIEW
ENGG*4420 Lab 1 17
LabVIEW Virtual Instruments
(VIs)
Built in functions used to create any
application
ENGG*4420 Lab 1 19
Block Diagram
ENGG*4420 Lab 1 20
Altera Nios II Embedded
Evaluation Kit
ENGG*4420 Lab 1 21
Altera Nios II Board Devices
16 MB of Intel P30/P33 flash.
32 MB of DDR SDRAM.
Color LCD touch-screen display.
USB connector.
Serial connector.
10/100 Ethernet physical layer/media
access control (PHY/MAC).
Six push buttons total.
Seven LEDs total.
Embedded FPGA board.
ENGG*4420 Lab 1 22
Altera Nios II IDE
ENGG*4420 Lab 1 23
uC/OS-II is a highly portable, very scalable,
preemptive real-time, deterministic,
multitasking kernel.
It can manage up to 64 tasks
It has connectivity with uC/GUI and uC/FS.
It is ported to more than 100
microprocessors and microcontrollers.
It supports all type of processors from 8 to
64 bits
ENGG*4420 Lab 1 24
How to implement Lab1?
1. Read chapter 1 of the lab manual.
2. Preparation 1- Review the Implementation
of the Plant System.
Hot Air Blower.VI
3. Preparation 2 – Review and Analyze the
implementation of the uC/OSII tasks
ENGG4420_example.c
ENGG4420_example.h
4. Preparation 3 – Establish connection
between LabVIEW and Altera board
ENGG*4420 Lab 1 25
How to implement Lab1? Cont.
ENGG*4420 Lab 1 26
How to implement Lab1? Cont.
ENGG*4420 Lab 1 27
How to implement Lab1? Cont.
6. Cont.
a) LabVIEW-> Transmit the plant output
value to the Altera board using serial
communication.
b) Altera-> Receive the transmitted
value and graph it on the LCD in RT.
c) Altera-> Send the output value back
to LabVIEW.
d) LabVIEW -> Read the plant value
from serial IO and process it (PID).
ENGG*4420 Lab 1 28
Implementation Suggestions
Use synchronization semaphores to
organize the communication process.
Create a new RxTx_uart on the Altera
board. Set a delay on the task that
matches the LabVIEW sample
interval.
Create a separate task on the Altera
board for graphing the voltage values
Notes - How to set up Hyper
Terminal?
Start All Programs
Accessories
Communication Hyper
Terminal Assign a
name to your hyper
terminal select COM1
select 115200, 8,
None, 1, None.
ENGG*4420 Lab 1 30
Notes - LabVIEW
ENGG*4420 Lab 1 31
Notes - LabVIEW
ENGG*4420 Lab 1 32
Notes - LabVIEW
ENGG*4420 Lab 1 33
Notes - LabVIEW
ENGG*4420 Lab 1 34
Note – LabVIEW examples
LabVIEW
examples can
be found in the
‘Help’ Menu
under ‘Find
Examples’.
Note – LabVIEW examples
Examples
using specific
VIs can be
found through
the ‘context
help’
Notes – Serial Communication
ENGG*4420 Lab 1 37
Note – Serial Communication Cont.
Order of operations:
Configure serial port:
Enable read on termination char.
Set termination char.
Set timeout.
Define VISA resource (COM1 or COM2).
Define Baud rate ….
Define ‘write’ termination char.
Define input buffer size.
Write string (data must be in char not float).
Close session at end.
Deadlines and Marking
ENGG*4420 Lab 1 39