Sie sind auf Seite 1von 33

Project NI myRIO :

I- Introduction:
National Instruments Corporation, or NI, is an American company with
international operation. Headquartered in Austin, Texas, it is a producer
of automated test equipment and virtual instrumentation software. Common
applications include data acquisition, instrument control and machine vision.

Since 1976, NI has made it possible for engineers and scientists to solve the
world’s greatest engineering challenges with powerful, flexible technology
solutions that accelerate productivity and drive rapid innovation ,using NI’s
integrated hardware and software platform for a wide variety of industrial
applications .

Over the next several years, the engineers at NI continued to break the
boundaries of virtual instrumentation, to progress the hardware and software
controlling system and they designed a very capable embedded hardware device
aimed at students to provide a small device with lots of ports which allow it to be
used for a wide variety of projects .

For nearly a decade, National Instruments has been providing reconfigurable


hardware paired with graphical programming to cutting-edge researchers and
companies around the globe. this unique hardware/software approach is called
the LabVIEW reconfigurable I/O (RIO) architecture. It is based on four
components: a processor, a reconfigurable FPGA, inputs and outputs, and
graphical design software. Combined, these components provide the ability to
rapidly create custom hardware circuitry with high-performance I/O and
unprecedented flexibility in system timing control.
NI CompactRIO and NI Single-Board RIO are two popular RIO products
designed for professional engineers. The impact of this technology has led to
industry demand of LabVIEW and RIO knowledge in graduates.

NI myRIO is a revolutionary tool that places the power of the LabVIEW RIO
architecture, a globally adopted, industry proven hardware/software design
approach, in the hands of students.
NImyrio is an embedded hardware device created specifically to help students
design real, complex engineering systems more quickly and affordably.
With a gradual approach to learning advanced concepts in embedded and
FPGA programming.
NI myRIO delivers the powerful hardware and software technology needed for
students to complete meaningful projects in a single semester while being
assured that they are learning on a tool that prepares them for their careers as
professional engineers.
A Gradual Approach to Advanced Programming
When designing NI myRIO, our aim was to give students access to the same
industry-grade technology they would see upon graduation;

Depending on programming knowledge, students can begin with configuration-


based Express VIs and move to advanced modes of programming.

Express VIs are configuration-based functions that minimize programming and


can be found on the NI myRIO palette in LabVIEW .

As students gain programming knowledge, they can graduate to more advanced


programming using the NI myRIO Adanced I/O API.
To help students transition from Express VIs to traditional LabVIEW
programming, each Express VI includes a “View Code” button that gives
students the ability to see the detailed underlying code.

Students can copy and paste this code to a LabVIEW block diagram or can program from scratch with
lower level peripherals using the Advanced I/O subpalette.

At the most fundamental level, students can investigate and implement the same LabVIEW
programming techniques used by professional engineers. By double-clicking on any Advanced
I/O VI, students can see the low-level handshake between processor code and the FPGA bitfile.

Powerful Hardware for Real-World Projects


As crucial as the approachability of the programming experience was to the design of NI myRIO, the
algorithms that students develop need to be backed by powerful hardware that delivers the performance
required to give students the ability to design complex, real-world systems. NI myRIO features the Xilinx
Zynq-7010 all-programmable system on a chip, which includes a dual-core ARM Cortex-A9 processor and
an Artix-7 FPGA.
the dual-core ARM Cortex-A9 processor on NI myRIO runs the NI Linux Real-Time OS, users can choose
to program the processor in C. This gives students the ability to choose the programming language that is
best for the task at hand.
This industry proven hardware empowers students to imagine an idea and then create it, innovating with
the confidence of powerful technology.

It features a 667
MHz dual-core ARM Cortex-A9 programmable processor and a customizable Xilinx field-
programmable gate array (FPGA) that students can use to start developing systems and solve
complicated design problems faster—all in a sleek enclosure with a compact form factor.
The NI myRIO device features the Zynq-7010 All Programmable system on a chip (SoC) to
unleash the power of NI LabVIEW system design software both in a real-time (RT)
application and on the FPGA level.
How Xilinx All Programmable technology has
fundamentally changed business at National Instruments

, National Instruments (NI) announced an exciting product for engineering students called the NI
myRIO hardware/software development platform, which is based on the Zynq-7010 All Programmable SoC.
About the size of a small paperback book (so that it easily drops into a backpack), the NI myRIO features
the Zynq SoC’s dual-core ARM Cortex-A9 processor and 7 series FPGA logic cells for hardware and
software development.

The NI myRIO box sports ten analog inputs, six analog outputs, left and right audio channels, 40 digital I/O
lines (SPI, I2C, UARD, PWM, rotary encoder) and an on-board, 3-axis accelerometer, and two 34-pin
expansion headers. Most of that functionality comes straight from the on-board Zynq-7010 SoC.

The new Zynq-based NI myRIO easily drops into a student backpack

The NI myRIO was only one of three major NI announcements built upon the Xilinx Zynq SoC. The second
new product, announced on Tuesday, is the NI CompactRIO-9068 measurement and control platform. NI
introduced its first RIO (reconfigurable I/O) platform in 2004. It was based on a mix of discrete processors,
FPGAs, and pluggable I/O modules. The addition of an FPGA into the NI RIO platform permits large
performance improvements.

NI now offers more than 70 different I/O modules for its multiple generations of the NI cRIO platforms. The
newly announced NI cRIO-9068, based on a Zynq-7020 SoC.
The NI CompactRIO-9068 uses a Zynq-7020 SoC to boost performance 10x

. NI introduced its first NIroboRIO (reconfigurable I/O) platform.


The NI roboRIO features analog inputs, digital inputs and outputs, relay outputs, PWM outputs, SPI and
I2C ports, USB, and of course an Ethernet connection. No surprise, it’s based on a Xilinx Zynq-7020 SoC.
That’s right, NI is driving familiarity with the Zynq platform and Xilinx All Programmable technology down to
the high school level.

Every FRC team competing in 2015 will receive a free Zynq-based NI roboRIO to control its robot

NI myRIO is an Education Platform Powered by Xilinx Zynq-Z7010

National Instruments has been working on a device called NI myRIO, an hardware & software
platform that aims at giving engineering students the ability to design real systems quickly
for automation, robotics, data logging or embedded systems. The hardware is based on Xilinx
Zynq-7010 with a dual-core ARM Cortex-A9 processor and an FPGA with 28,000
programmable logic cells, and features 10 analog inputs, 6 analog outputs, audio I/O
channels, and up to 40 lines of digital input/output (DIO).
NI myRIO Hardware Specifications:
 SoC – Xilinx Zynq-7010 with a dual core Cortex A9 processor and FPGA with 28,000 cells
 System Memory – Unknown
 Storage – Unknown
 Expansion Ports:
o myRIO exPansion Ports (MXP) – Two identical ports (MXP A and MXP B) with 4 analog inputs,
6 digital inputs/outputs, 2 analog outputs, 1 quad encoder, 3 PWMs, 1 UART, 1 I2C and 1 SPI
by default. Ports configuration is customizable with Labview FPGA.
o miniSystems Port (MSP) – Power, 2 analog outputs, 4 analog inputs, and 8 digital
inputs/outputs by default. Ports configuration is customizable with Labview FPGA.
 Connectivity – Wi-Fi
 USB – 1x USB host port, 1x USB device port for connection to PC
 Audio – Audio In, Audio Out
 Misc – User and reset buttons, power, status and Wi-Fi LEDs, 4 user-defined LEDs, on-board
accelerometer.
 Power – 6-16V input, or battery.

myRIO MXP Connectors

The device runs Linux, and is programmable with C/C++, or Labview. It will also possible to
purchase the board only without enclosure, but you’ll lose Wi-Fi connectivity, a few IO pints,
and compatibility with NI miniSystems. The tables below show the difference between myRIO
products with regards to hardware/software:
and education resources and uses:
What Is NI myRIO? NI myRIO is a revolutionary hardware/software platform that gives students the
ability to “do engineering” and design real systems more quickly than ever before.

Complete with the latest Zynq integrated system-on-a-chip (SoC) technology from Xilinx, the NI myRIO
boasts a dual-core ARM® Cortex™-A9 processor and an FPGA with 28,000 programmable logic cells, 10
analog inputs, 6 analog outputs, audio I/O channels, and up to 40 lines of digital input/output (DIO).
Designed and priced for the academic user, NI myRIO also includes onboard WiFi, a three-axis
accelerometer, and several programmable LEDs in a durable, enclosed form factor.

Unable to access myRIO


The NI myRIO can serve as a product development platform or as a data-acquisition unit. Students develop
code for this platform using a special myRIO edition of NI’s LabVIEW graphical design software. One of the
most amazing things about this package is that the NI myRIO hardware and the bundled development
software license cost an incredibly low $495. .

When you receive the myRIO hardware,you install the software (3 Disks) and you use the NI update
service to make sure you made the latest versions .
during developement you normally connect NImyRIO to your computer with USB cable.

. It's well detected by my computer when connected through USB .


,
"Launch the Getting started Wizard" works as well in its first step :

when i click "next" (or directly on the myRIO detected) it tells me that it can communicate with the myRIO...

I double-checked power supply and USB cable and everything works well.

The unit is powered and connected to the USB port on my computer, because the myRIO Unit does show
up under MAX .

NI-MAX is also detecting myRIO .It communicates .when i try to access myRIO configuration, web page
configuration is also reachable....

The Project manager detects the myRIO only if USB connected

If you are having any trouble connecting,then if you create a myRIO project in LabVIEW and if you use
the "Launch the Getting Started Wizard" , the project wizard detects your myRIO.
If so, when you complete the wizard and after development is complet, you can easily deploy your
LABVIEW project as a stand-alone application stored on the MyRIO solid-state hard drive that
starts automatically when you power up the myrio .

You can right click the myRIO and connect to it.

4 MAX
Measurement & Automation Explorer (MAX) provides access to your National Instruments
devices and systems.

With MAX, you can:

• Configure your National Instruments hardware and software


• Create and edit channels, tasks, interfaces, scales, and virtual instruments
• Execute system diagnostics
• View devices and instruments connected to your system
• Update your National Instruments software
In addition to the standard tools ,MAX can expose item-specific tools that you can use
to configure ,diagnose,or test your system,depending on which NI products you install.
As you navigate through MAX, the contents of the application menu and toolbar change to
reflect these new tools.
LABVIEW installs MAX to establisch all devices and channel configuration parameters .MAX
reads the information the Device Manager records in the Windows Registry and assigns a
logical device number to each NImyRIO device.

.you can access MAX by selecting Tools »Measurement &Automation Explorer in LABVIEW .this displays
the primary MAX window.

Before using a data acquisition board, you must confirm that the software can communicate
with the board by configuring the devices. For Windows, the Windows Configuration Manag
er keeps track of all the hardware installed in the computer, including National Instruments
NImyRIO devices. The
Windows Configuration Manager automatically detects and configures Plug & Play (PnP) devic
es.
pmmlm

What’s New for NI myRIO


NI myRIO Express VIs - Overview
Express Vis are special Vis that allow the user to configure their
settings when placed on the block diagram.
This avoids having to wire controls /constants to terminals taking
up time and block diagram space.

• NI myRIO has a palette of express VI that can be found by


right-clicking on the block diagram and navigating to myRIO
1. Software Features
The LabVIEW 2014 myRIO Toolkit introduces several new features for myRIO users.
With the myRIO I/O Monitor, students and educators can quickly test connections to any pin available on
the default FPGA personality of myRIO.

myRIO I/O Monitor


Using the new Express VI layout, students not only visualize underlying code but also view the physical
connections they need to make to take advantage of the I/O types they chose.

NI myRIO Express VIs - Configuration


When an Express VI is placed on the block diagram,a
configuration dialog box opens.
myRIO Express VI
Clicking the View Code tab of any myRIO Express VI reveals lower level code, which helps students learn
more advanced programming concepts.

myRIO Express VI View Code Feature


Selecting the Connection Diagram tab reveals a reference diagram to aid in wiring sensors and actuators to
myRIO.
myRIO Express VI Connection Diagram
Advanced users can download an alternate FPGA personality, which provides buffered reads and writes on
select channels if waveform data is required for an application.

NI myRIO Express VIs – G-Code


If the view code button is selected in the configuration dialog,labview will generate a
window like this :

The National Instruments myRIO-1900 is a portable reconfigurable I/O
(RIO) device that students can use to design control, robotics, and
mechatronics systems.
Hardware overview :

The NI myRIO-1900 provides analog input (AI), analog output (AO), digital input and output (DIO), audio, and
power output in a compact embedded device. The NI myRIO-1900 connects to a host computer over USB and
wireless 802.11b,g,n.

The following figure schows the functions of NI myRIO-1900 components.


Connector Pinouts :
NI myRIO-1900 Expansion Port (MXP) connectors A and B carry identical sets of
signals. The signals are distinguished in software by the connector name, as in
ConnectorA/DIO1 and ConnectorB/DIO1.
3.2 Signals

The appropriate transducers convert physical phenomena into measurable signals.


However,

different signals need to be measured in different ways. For this reason, it i


s important to understand the different types of signals and their correspond
ing attributes. Signals can be categorized into two groups:

• Analog

• Digital

Analog input channels :

The NI myRIO-1900 has analog input channels on myRIO Expansion Port (MXP) connectors A and B, Mini System
Port (MSP) connector C, and a stereo audio input connector. The analog inputs are multiplexed to a single analog-
to-digital converter (ADC) that samples all channels.

MXP connectors A and B have four single-ended analog input channels per connector, AI0-AI3, which you can use
to measure 0-5 V signals. MSP connector C has two high-impedance, differential analog input channels, AI0 and
AI1, which you can use to measure signals up to
±10 V. The audio inputs are left and right stereo line-level inputs with a ±2.5 V full-scale range

Analog output channels :

The NI myRIO-1900 has analog output channels on myRIO Expansion Port (MXP) connectors A and B, Mini
System Port (MSP) connector C, and a stereo audio output connector. Each analog output channel has a dedicated
digital-to-analog converter (DAC), so they can all update simultaneously. The DACs for the analog output channels
are controlled by two serial communication buses from the FPGA. MXP connectors A and B share one bus, and
MSP connector C and the audio outputs share a second bus. Therefore, the maximum update rate is specified as an
aggregate figure in the Analog Output section of the Specifications.

MXP connectors A and B have two analog output channels per connector, AO0 and AO1, which you can use to
generate 0-5 V signals. MSP connector C has two analog output channels, AO0 and AO1, which you can use to
generate signals up to ±10 V. The audio outputs are left and right stereo line-level outputs capable of driving
headphones.

DIO Lines :
The NI myRIO-1900 has 3.3 V general-purpose DIO lines on the MXP and MSP connectors. MXP connectors A and
B have 16 DIO lines per connector. On the MXP connectors, each DIO line from 0 to 13 has a 40 kΩ pullup resistor
to 3.3 V, and DIO lines 14 and 15 have 2.2 kΩ pullup resistors to 3.3 V. MSP connector C has eight DIO lines. Each
MSP DIO line has a 40 kΩ pulldown resistor to ground. DGND is the reference for all the DIO lines. You can
program all the lines individually as inputs or outputs. Secondary digital functions include Serial Peripheral interface
Bus (SPI), I2C, pulse-width modulation (PWM), and quadrature encoder input. Refer to the NI myRIO software
documentation for information about configuring the DIO lines.

When a DIO line is floating, it floats in the direction of the pull resistor. A DIO line may be floating in any of
the following conditions:
• when the myRIO device is starting up
• when the line is configured as an input
• when the myRIO device is powering down

You can add a stronger resistor to a DIO line to cause it to float in the opposite direction.
UART Lines :
The NI myRIO-1900 has one UART receive input line and one UART transmit ouput line on each MXP connector.
The UART lines are electrically identical to DIO lines 0 to 13 on the MXP connectors. Like those lines, UART.RX
and UART.TX have 40 kΩ pullup resistors to 3.3 V. Use LabVIEW Real-Time to read and write over the UART
lines.

ACCELEROMETRE :

NI myRIO-1900 contains a three-axis accelerometer. The accelerometer samples each axis continuously and
updates a readable register with the result. Refer to the Accelerometer section of the Specifications for the
accelerometer sample rates.

1 NI MyRIO
The myRIO is a very capable embedded hardware device designed by Na-
tional Instruments and aimed at students to provide a small device with lots
of ports which allow it to be used for a wide variety of projects. The myRIO
features ten analog input channels, six analog output channels and forty
digital input/output channels. It also has audio input and output, a USB
host port, a USB device port, an accelerometer, a programmable button
and four programmable LEDs. The myRIO also has wireless capabilities
allowing it to act as a wireless host or connect to a server, this means that
the myRIO can be controlled or reprogrammed without hooking it up via
USB.
The myRIO acts as the processing unit for the robot and was the only pro-
cessing power allowed by National Instruments for the Competition, the only
exception to this is certain cameras which include onboard image process- ing. This
meant that while the myRIO is reasonably powerful containing a Xilinx Z-7010
(Instruments,2013) which is a dual-core ARM Cortex A9 processor with a small
FPGA, the processing power is still limited and any particularly taxing algorithms
would have trouble running on the device.

Abbildung 1.1 { Das NI myRIO mit seinen wichtigsten Features

Exercise 3: Create Real-Time Code to Run on the NI myRIO Device

Using the NI myRIO project template, write a LabVIEW VI to run on the NI myRIO device to explore
some of the built-in functionality of the device. In this exercise, you will create a stand-alone application
using the push button and onboard LEDs.

If the project from the last exercise is still open, follow the steps below to create the RT VI. If the project
from the last section is not open, go back to the last section and follow the instructions to create a new NI
myRIO project.

1. Open Main.vi under the myRIO-1900 (xxx.xx.xx.x) target device in the LabVIEW Project Explorer.
2. Open the block diagram.
3. Enlarge the center frame of the sequence structure and the While Loop within.
a. Move the mouse cursor to the bottom edge of the sequence structure and locate the
blue resizing node that appears in the center of the bottom border of the structure. Click and drag the node
down to increase the space available for placing icons.
b. Move the cursor to the right edge of the center frame of the sequence structure and locate the blue
resizing node. Click and drag this node to the right to increase the area in the center frame.
c. Move the cursor to the bottom right corner of the While Loop. Click and drag the resizing
node to enlarge the While Loop to fill the space created in steps a and b.
4. Create a rising-edge trigger to detect when the button on the NI myRIO unit is pressed (ignoring the
output when the button is held).
a. Place a Button Express VI on the block diagram from the NI myRIO palette.
i. Right-click and navigate to myRIO»Onboard»Button. Place the Express VI inside the While Loop just
below the accelerometer VI.
ii. Press OK in the configuration dialog box to keep the default settings for the Express VI. This
Express VI handles opening a reference to the physical hardware through the default FPGA personality
on the NI myRIO device and reading the current value from the button. Since you are placing this VI in
the
While Loop, all the code in the VI executes during each iteration of the loop. This might seem wasteful
because the code has to open a reference to the particular data channel you are reading from on the FPGA
every cycle. However, the Express VIs for the NI myRIO device have been written with a “smart open”
feature that avoids opening the reference on every iteration. So, after the first iteration of the code, the VI
executes faster because it needs to only read data in from the button.
b. Wire the Value output of the button Express VI to the right edge of the While Loop.
c. Right-click on the tunnel created at the right edge of the While Loop by the button value
Boolean data and select Replace with Shift Register. This changes the icon of the tunnel and
generates another icon in the same location on the left side of the While Loop. Both of these tunnels
create a shift register. The right side of the register stores data from the current iteration, while the
left side of the register calls the data from the previous iteration. With this register, you can compare
the value of the button on the current iteration to the value of the button on the previous iteration (on
the first iteration the previous value defaults to FALSE).

d. Place an Exclusive Or node on the block diagram.


i. Right-click and navigate to Programming»Boolean»Exclusive Or. Place the Exclusive Or node on
the block diagram just below and to the right of the button Express VI.
ii. Wire the value output of the button Express VI to the top terminal of the
Exclusive Or node.
iii. Wire the shift register that stores the value of the button to the bottom input of the Exclusive Or
terminal.

e. Place an And node on the block diagram.


i. Right-click and navigate to Programming»Boolean»And. Place the And node on block diagram to
the right of the Exclusive Or node.
ii. Wire the output of the button Express VI to the top terminal of the And node. iii. Wire the
output of the Exclusive Or node to the And node bottom terminal.
f. Use the keyboard shortcut <Ctrl-H> to open Context Help to aid in understanding the
functionality of the And and Exclusive Or nodes. With Context Help open, you can hover over any
front panel or block diagram item to learn more about the function of that item. Now that the logic is
in place to detect the rising or positive edge of the signal from the button on board the NI myRIO unit,
you can use the logic to provide some functionality.
5. Create a cycle of lighting the onboard LEDs when the button is pressed.
a. Place a True Constant on the block diagram.
i. Right-click and navigate to Programming»Boolean»True Constant. Place the constant in the
initialize frame of the sequence structure.
ii. Wire the true constant to the left edge of the While Loop (it automatically tunnels through
the frame of the sequence structure).

b. Place three False Constants on the block diagram.


i. Right-click and navigate to Programming»Boolean»False Constant. Place three constants in the
initialize frame of the sequence structure—the first below the true constant and the subsequent two
below one another.
ii. Wire the false constants to the left edge of the While Loop.
c. Replace the constant tunnels with shift registers.
i. Right-click on each Boolean data tunnel just created on the left side of the While
Loop and select Replace with Shift Register.

d. Each of the four Boolean constants (one true, three false) just placed on the block
diagram is used to track the state of one of the four LEDs on board the NI myRIO device. This code is
a very simple and straightforward implementation of the concept of shifting the value of the LED to the
next LED in the set. Another method could use a counter and modulus function to take the remainder
of the count and compare it to an assigned LED value (0, 1, 2, or 3) and light up the corresponding
LED. This approach could use one
shift register but requires placing more function blocks down on the block diagram.
e. Place a case structure on the block diagram.
i. Right-click and navigate to Programming»Structures»Case Structure. Place a case structure in
the While Loop just below and to the right of the rising-edge trigger logic (Exclusive Or and And
nodes).

ii. Wire the output of the And node to the case selector on the case structure.

iii. Switch the case structure to the false case by pressing the small arrows to the left or right of the
case indicator box or by selecting the drop-down arrow just to the right of the case name and
choosing false from the drop-down menu.
iv. Wire the shift registers straight through the case structure by wiring from the left registers to
the left edge of the case structure, and then wiring straight to the right side of the register on the
While Loop. If the value isn’t first wired to the left edge of the case structure, the automatic wiring
tool passes the wire around the case structure rather than going through it.

v. Switch the case structure to the true case.


vi. Wire the tunnel for each Boolean value to the next tunnel below it by wiring the last tunnel on the
left to the first tunnel on the right.

f. The logic here is that when the rising edge of the signal from the button is detected (in
other words, the moment someone presses the button), the true case of the case structure shifts the
value of each LED to the next LED. Then the LED that is on shifts to the next LED and the others are
off. Each time the button is pressed this happens, and when the fourth LED is lit and the button is
pressed, the first LED lights up and the fourth turns off. However, none of this code works if you
don’t tell the NI myRIO device to interpret the Boolean data as a signal for the LEDs.
6. Signal the onboard LEDs to turn on and off based on the logic that you have created.
a. Place an onboard LED Express VI on the block diagram.
i. Right-click and navigate to myRIO»Onboard»LED. Place the LED Express VI in the lower right
corner of the While Loop. Select OK on the Configure LED Express VI dialog box to keep the default
settings. By default, the Express VI allows all four LEDs to be written to.
ii. Wire each of the Boolean values created in the previous step to the inputs LED0, LED1, LED2,
and LED3 on the LED Express VI.

7. Run the VI by pressing the run arrow on the toolbar. Verify the functionality of the code by
pressing the button on the NI myRIO device and observing the lit LED shift to the next one over, and
loop back from the fourth to the first on the fourth button press.
8. To verify that the code is running on the NI myRIO device and not on the development
computer, right-click on NI myRIO in the LabVIEW project and select Disconnect.
9. Unplug the USB cable from the NI myRIO device and verify that the code is still running.
10. When finished, reconnect the USB cable.
11. In the LabVIEW project, select Connect.
12. Click the stop button on the LabVIEW front panel to stop your code.

Das könnte Ihnen auch gefallen