0% found this document useful (0 votes)
79 views

Labview FPGA Hands-On: Adriaan Rijllart Odd Øyvind Andreassen Cern

This document provides an overview of LabVIEW FPGA hands-on part 2. It begins with some more basics of LabVIEW, then provides an introduction to LabVIEW FPGA. It describes FPGAs and how they work as parallel dataflow systems. It also provides an overview of the NI myRIO product, including its features and the Zynq system-on-chip. Finally, it presents three exercises for users to complete using the myRIO, including blinking an LED, controlling an LED with a photodiode, and acquiring the step response of an RC circuit.

Uploaded by

chuyen truong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

Labview FPGA Hands-On: Adriaan Rijllart Odd Øyvind Andreassen Cern

This document provides an overview of LabVIEW FPGA hands-on part 2. It begins with some more basics of LabVIEW, then provides an introduction to LabVIEW FPGA. It describes FPGAs and how they work as parallel dataflow systems. It also provides an overview of the NI myRIO product, including its features and the Zynq system-on-chip. Finally, it presents three exercises for users to complete using the myRIO, including blinking an LED, controlling an LED with a photodiode, and acquiring the step response of an RC circuit.

Uploaded by

chuyen truong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 44

LabVIEW

FPGA hands-
on
part 2

Adriaan Rijllart
Odd Øyvind Andreassen
CERN
Content of LabVIEW FPGA hands-on 2

• A few more LabVIEW basics

• Introduction to LabVIEW FPGA

• Overview of NI myRIO

• Exercises

• Resources and Next Steps

2
A few more LabVIEW
basics

3
While loop tunnel

• Tunnels transfer data into and out of structures.


• When a tunnel passes data into a loop, the loop
executes only after data arrive at the tunnel
(at all tunnels,
if there is more
than one).
• Data pass out of
a loop after the
loop terminates.

4
For loop

• The value in the count terminal (an input terminal)


indicates how many times to repeat the subdiagram.
Last value

Indexed

5
Shift register

• When programming with loops, you often need to


know the values of data from previous iterations of the
loop.
• Shift registers transfer values from one loop iteration to
the next.

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

LabVIEW FPGA Code E F

A
B
C
D

11
FPGAs are Parallel Dataflow Systems
E F

A
B
C
D

W X Y

12
LabVIEW FPGA vs. VHDL

66 Pages ~4000 lines

I/O with DMA


13
Why Are FPGAs Useful?

• 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

XILINX Zynq SoC

16
What is Zynq?

Traditional Implementation

Analogue Input

AXI
PCI Bus Analogue Output
Processor FPGA
Digital I/O

Custom I/O

Single System on Chip

17
Why Zynq Matters in Education

•Smaller Size, Lower Power

•667 MHz Dual-Core ARM Cortex-A9


Processor

•Artix-7 FPGA, 28k logic cells

•16 DMA Channels

•92 Billion calculations per second

18
Why Zynq Really Matters in Education

Leading Industry
Grade Technology

The same technology is used in our


latest industry and research ready
Compact RIO systems

19
Robotic Table Football
Revolutionising Mechatronics Education

The Challenge The Solution

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

The Challenge The Solution

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

The Challenge The Solution

A four-finned robot, each fin equipped with nine


Creating a nautical robot driven by cuttlefish servo motors to generate waves of various shapes
inspired fins to study this unique propulsion and perform any conceivable manoeuver. All this
mechanism and its advantages is coordinated by a single NI myRIO at the heart
of the drone.

22
NI myRIO Product Overview: Front View

User Defined LEDs

Built-in Accelerometer

23
Top View

Connection to PC

USB Port Power

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)

Audio in/out more analog and digital I/O

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

Make the LED blink with a controllable speed


3.3 V
from 1 to 40 Hz

47 kΩ

DIO4

Question:
At what frequency you don’t see the
blinking anymore?

29
Exercise 2 Switch on when it’s dark

5V 3.3 V Switch on the LED when the photodiode signal is


below the threshold 100 (arbritrary units)
photodiode 2.2 kΩ • Plot the photodiode signal in a chart
AI0 • The threshold value should be set using a control
LED • Remember the LED is on when D4 is False
1 MΩ

D4

To test, block the light to the photodiode


or increase light using your mobile phone

Question:
• What would happen when the photodiode would pick up the LED light?

30
Exercise 3 Acquire transient

Generate a step function from 0 – 5 V (int. value 4095)


AO0 AI1 Acquire step function signal and response of RC circuit
47 kΩ
• Once per second
AI2 • Generate output voltage from 0 to 5 V (and reverse)
10 nF • Acquire both AI1 and AI2 signals using 20 points
• Show both in a graph
• RC value is 470 µs
• Set DAQ loop time (with a control) to 100 µs

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

Generate short pulse on D0 and D2 (low – high – low)


DIO0 DIO1 Make a separate control for low D0 and D2 (using ticks)
DIO2 DIO3 Acquire 20 points on D1 and D3 with 1 tick loop delay
Repeat at 100 ms (10 Hz)

• Control for low time of pulse (4 ticks)


• Control for high time of pulse (8 ticks)
• Control for DAQ loop (1 tick)
• Graph D1
• Graph D3

Questions:
• What do you see when changing the high and low values?
• Can you explain?

32
FPGA to ARM communication

Which Which Which


myRIO? VI? data?

ARM

FPGA

33
Resources and Next Steps

ni.com/students/learn-rio
NI myRIO Kits | ni.com/myrio

Starter Mechatronics Embedded


LEDs & switches DC gear motors/encoders RFID reader kit
7-segment display H-bridge driver Numeric keypad
Potentiometer Accelerometer LED matrix
Thermistor Triple-axis gyro Digital potentiometer
Photo resistor Infrared proximity sensor Character LCD
Hall effect Ambient light sensor Digital temp sensor
Microphone/Speaker Ultrasonic range finder EEPROM
Battery holder Compass
DC motor Hobby servo motors
35
From small to big

1. myRIO

2. sbRIO

3. cRIO

4. PXIe R-series boards

5. PXIe FlexRIO boards

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

You might also like