Labview FPGA Hands-On: Adriaan Rijllart Odd Øyvind Andreassen Cern
Labview FPGA Hands-On: Adriaan Rijllart Odd Øyvind Andreassen Cern
FPGA hands-
on
part 2
Adriaan Rijllart
Odd Øyvind Andreassen
CERN
Content of LabVIEW FPGA hands-on 2
• Overview of NI myRIO
• Exercises
2
A few more LabVIEW
basics
3
While loop tunnel
4
For loop
Indexed
5
Shift register
6
Shift register, multiple values
• Stacked shift registers remember values from multiple
previous iterations and carry those values to the next
iterations.
• Right-click the left shift register and select Add Element
from the shortcut menu to stack a shift register.
7
Introduction to LabVIEW FPGA
FPGA Technology
Programmable
Interconnects
Logic
Blocks
I/O Blocks
9
FPGAs are Dataflow Systems
E F
Implementing Logic
on FPGA: A
B
F = {(A+B)CD} E C
D
10
FPGAs are Dataflow Systems
Implementing Logic on FPGA: F = {(A+B)CD} E
A
B
C
D
11
FPGAs are Parallel Dataflow Systems
E F
A
B
C
D
W X Y
12
LabVIEW FPGA vs. VHDL
• True Parallelism
Provides parallel tasks and pipelining
• High Reliability
Designs become a custom circuit
• High Determinism
Runs algorithms at deterministic rates down to 25 ns (faster in
many cases)
• Reconfigurable
Create new and alter existing tasks easily
14
LabVIEW FPGA: How does it work?
Xilinx ISE
Compiler
Xilinx
LabVIEW VHDL Bitfile FPGA
Chip
VI
LabVIEW LabVIEW
FPGA FPGA
15
NI myRIO Product Overview: Front View
16
What is Zynq?
Traditional Implementation
Analogue Input
AXI
PCI Bus Analogue Output
Processor FPGA
Digital I/O
Custom I/O
17
Why Zynq Matters in Education
18
Why Zynq Really Matters in Education
Leading Industry
Grade Technology
19
Robotic Table Football
Revolutionising Mechatronics Education
Students struggled to realise their innovations using textual Using LabVIEW and myRIO to develop the Robotic Table
programming, due to unintuitive syntax and complex hardware Football challenge. This practical approach to teaching
integration. Following many research successes, mechatronic systems integration resulted in a marked
Loughborough wanted to incorporate LabVIEW into their increase in student engagement, improved grades and the best
refined Mechatronic module system implementations to date.
20
Orseus
myRIO in Space
Developing an embedded system which operates Using myRIO to control all on-board sensors and
under low pressure and temperature conditions - experimental equipment in a high altitude balloon,
space. The system must carry out various from the launch to the landing with real time
experiments, including the study of solar radiation monitoring and post processing.
and atmospheric pollution
21
Student Design Contest Winner 2014
Sepios, the Omnidirectional Cuttlefish Robot
22
NI myRIO Product Overview: Front View
Built-in Accelerometer
23
Top View
Connection to PC
24
NI myRIO Expansion Port (MXP)
Identical Connectors
4 AI MXP A MXP B
6 DIO 2 AO 1 UART
1 SPI
1 Quad Encoder
1 I2C
3 PWMs
25
NI miniSystems Port (MSP)
26
myRIO exercise board
Exercise board
3.3 V
DIO0 DIO1
2.2 kΩ
DIO2 DIO3
DIO4
5V
AO0 AI1
47 kΩ
AI0 AI2
1 MΩ 10 nF
28
Exercise 1 Blinking LED
47 kΩ
DIO4
Question:
At what frequency you don’t see the
blinking anymore?
29
Exercise 2 Switch on when it’s dark
D4
Question:
• What would happen when the photodiode would pick up the LED light?
30
Exercise 3 Acquire transient
Questions:
• Is the step function (AI1) really a step?
• What do you see when changing the DAQ loop time (both AI1 and 2)?
31
Exercise 4 Pulse delay
Questions:
• What do you see when changing the high and low values?
• Can you explain?
32
FPGA to ARM communication
ARM
FPGA
33
Resources and Next Steps
ni.com/students/learn-rio
NI myRIO Kits | ni.com/myrio
1. myRIO
2. sbRIO
3. cRIO
36
Learn More About Programming NI myRIO
ni.com/learn-myRIO
ni.com/community/myrio
37
Thank you !!!
38
Solutions
39
Diagram: Blinking LED
40
Diagram: Photodiode
41
Diagram: Acquire transient
42
Diagram: Pulse delay (front panel)
43
Diagram: Pulse delay (diagram)
44