NI CompactRIO Waveform Reference Library

advertisement
NI CompactRIO Waveform Reference Library
Publish Date: Dec 28, 2015
Overview
The following installer contains host VIs, FPGA templates, and example projects for performing waveform data acquisition on N
RIO hardware. The configuration and acquisition VIs incorporate optimizations and best practices for the RIO platform, and you
can easily modify the examples to jump-start your application development.
Table of Contents
1.
2.
3.
4.
5.
6.
7.
8.
9.
Downloads
Introduction
Features
Palette Overview (LabVIEW 2010 and later)
Example Project Overview
Example Program Architectures
Continuous Acquisition Benchmarks
Related Links
Discussion and Feedback
1. Downloads
VIPM Download:
Get the cRIO Waveform Reference Library (http://sine.ni.com/nips/cds/view/p/lang/en/nid/209114) from the LabVIEW Too
Network (http://www.ni.com/labview-tools-network/). The Tools Network allows for easy installation and automatically notifies y
when new updates are released.
2. Introduction
Many reconfigurable I/O (RIO) applications acquire continuous blocks of data from multiple synchronized NI C Series modules.
This tutorial presents CompactRIO data acquisition VIs that incorporate RIO optimizations and best practices, and offers severa
examples to jump-start your application development.
Figure 1. Continuous Acquisition Example
3. Features
VIs combine common acquisition functions into logical blocks, which support many different acquisition modes. Example
programs demonstrate various flavors of continuous and finite acquisitions.
VIs can present data with the NI LabVIEW waveform datatype to easily integrate with other common LabVIEW software
components. The waveform datatype bundles the acquired data with its sampling period, timestamp, and channel properties
(like channel name).
VIs push calibration and scaling operations onto the field-programmable gate array (FPGA) to free host resources.
VIs perform a full complement of error checking including DMA FIFO overflow (data buffer has filled up causing data to be
dropped), module underflow (FPGA code execution takes too long, causing your module to sample slower than intended), a
start/read/stop timeouts.
Included Read functions use a polling architecture, which gives the user control over CPU usage during data acquisition.
The examples are very flexible and can adapt to many different hardware combinations. For most applications, only the FPG
VI needs to be modified.
4. Palette Overview (LabVIEW 2010 and later)
The cRIO Wfm Library installs to the user.lib directory and appears under the User Libraries palette.
1/5
www.ni.com
Figure 2: cRIO Wfm Reference Library Palette
5. Example Project Overview
cRIO Wfm Examples.lvproj demonstrates common acquisition modes and how to link host code to FPGA code. The project i
located at:
National Instruments\LabVIEW [Version]\user.lib\cRIO Wfm\_exampleProjects
You will likely need to move this example to another FPGA target and then use a "save as" on all VIs to avoid editing the sourc
install. For more information refer to ni.com/info and enter info code fpgaex.
Figure 3. Example Project Overview
1. The Host Examples section demonstrate various flavors of continuous and finite acquisition.
2. The FPGA Templates section has one template for Delta Sigma based modules and one template for SAR based modules.
Under the FPGA target you will also find the DMA Channel, and a PDF document describing how to customize the
FPGA VIs for your hardware configuration.
6. Example Program Architectures
Finite Acquisition: The finite acquisition mode tells the FPGA to acquire a certain number of samples and then terminate the
acquisition. In this acquisition mode, ConfigTiming.vi calls BufferConfig.vi and sets the host application's data buffer size equ
to the number of points in the finite acquisition.
Finite Acquisition with Subset Reads: Again a finite acquisition allocates exactly enough memory to hold all of the requested
2/5
www.ni.com
Finite Acquisition with Subset Reads: Again a finite acquisition allocates exactly enough memory to hold all of the requested
samples per channel. Read(poly).vi has a control named Samps Read per Chan that you can use to specify the block size
returned by each call, so you can read the finite acquisition in multiple subsets - a useful feature in many processing application
Finite Acquisition with Rearming Software Start Trigger: When a finite acquisition terminates, the FPGA automatically rearm
itself for another acquisition. You simply need to call Start.vi to perform another finite acquisition.
Continuous Acquisition: The continuous acquisition mode tells the FPGA to acquire points indefinitely until a stop command
issued or until an error is encountered (FIFO overflow, module underflow, and so on). In this acquisition mode, use BufferCfg.v
explicitly set the host application's data buffer to be many times larger than the read size. The examples use a 10X size by defa
If the host application's data buffer fills, then the FPGA experiences a FIFO overflow causing the acquisition to stop.
Continuous Acquisition with Start/Stop or Pause Functionality: If a finite acquisition is too large for the amount of memory
available on the host controller, then perform a continuous acquisition for a finite period of time via a state machine. When you
Stop.vi, the FPGA stops the acquisition and immediately rearms itself waiting for Start.vi to be called. The stop VI also flushes
host application's data buffer so subsequent acquisitions do not return old data.
7. Continuous Acquisition Benchmarks
For each of the controllers listed, the CompactRIO Continuous Acquisition Example acquired data continuously and streame
to either a local technical data management streaming (TDMS) file, a local binary file, or a remote host through TCP/IP. The
bandwidth values represent the amount of data that can be streamed indefinitely (or until the hard drive is filled).
Stream to Disk [TDMS]: sample rate = 51.2 kS/s
Controller
1D Wfm SGL
2D Array SGL
Interleaved SGL
NI 9074
6 chan (1.23 MB/s)
7 chan (1.43 MB/s)
8 chan (1.64 MB/s)
NI 9068
8 chan (1.64 MB/s)
8 chan (1.64 MB/s)
9 chan (1.84 MB/s)
NI 9014
8 chan (1.64 MB/s)
10 chan (2.05 MB/s)
13 chan (2.66 MB/s)
NI 9076
9 chan (1.84 MB/s)
12 chan (2.45 MB/s)
15 chan (3.07 MB/s)
NI 9022
10 chan (2.05 MB/s)
13 chan (2.66 MB/s)
19 chan (3.89 MB/s)
NI 9024
15 chan (3.07 MB/s)
19 chan (3.89 MB/s)
27 chan (5.53 MB/s)
3/5
www.ni.com
Stream to Disk [Binary]: sample rate = 51.2 kS/s
Controller
Interleaved
SGL
NI 9074
8 chan (1.64
MB/s)
NI 9068
9 chan (1.84
MB/s)
NI 9014
18 chan (3.69
MB/s)
NI 9076
20 chan (4.10
MB/s)
NI 9022
25 chan (5.12
MB/s)
NI 9024
36 chan (7.37
MB/s)
Stream over TCP/IP: sample rate = 51.2 kS/s
Controller
1D Wfm SGL
2D Array SGL
Interleaved SGL
NI 9074
12 chan (2.46 MB/s)
13 chan (2.66 MB/s)
18 chan (3.69 MB/s)
NI 9014
12 chan (2.46 MB/s)
14 chan (2.87 MB/s)
23 chan (4.71 MB/s)
NI 9022
16 chan (3.28 MB/s)
20 chan (4.10 MB/s)
35 chan (7.17 MB/s)
NI 9024
29 chan (5.94 MB/s)
32 chan (6.55 MB/s)
45 chan (9.22 MB/s)
NI 9068
40 chan (8.19 MB/s)
40 chan (8.19 MB/s)
45 chan (9.22 MB/s)
8. Related Links
Developer Zone: cRIO Vibration Data Logger Reference Design (http://zone.ni.com/devzone/cda/epd/p/id/6388) - A
LabVIEW reference design with a focus on embedded vibration monitoring, data logging, communications, and headless
configuration.
Developer Zone: Reference Applications for cRIO Order Analysis using a High Speed Tach (
http://zone.ni.com/devzone/cda/epd/p/id/6301) - A LabVIEW reference design demonstrating how to acquire vibration and a
tachometer at different rates and how to synchronize that data to perform order analysis.
9. Discussion and Feedback
This reference application was created by the NI Systems Engineering group.
We do not regularly monitor Reader Comments posted on this page. Please submit your feedback to the CompactRIO Wavefo
Reference Applications (http://forums.ni.com/ni/board/message?board.id=Components&thread.id=235) discussion forum.
Customer Reviews
4 Reviews | Submit your review (
http://zone.ni.com/apps/utf8/nidz_display_comments.create_comment?p_title=NI+CompactRIO+Waveform+Reference+Librar
)
4/5
www.ni.com
PRODUCT
SUPPORT
COMPANY
Order status and history (http://www.ni.com/status/) Submit a service request (
https://sine.ni.com/srm/app/myServiceRequests)
Order by part number (
http://sine.ni.com/apps/utf8/nios.store?action=purchase_form
Manuals (http://www.ni.com/manuals/)
)
Drivers (http://www.ni.com/downloads/drivers/)
Activate a product (
http://sine.ni.com/myproducts/app/main.xhtml?lang=en
Alliance Partners (http://www.ni.com/alliance/)
)
About National Instruments (
http://www.ni.com/company/)
Events (http://www.ni.com/events/)
Careers (http://www.ni.com/careers/)
Order and payment information (
http://www.ni.com/how-to-buy/)
MISSION
NI equips engineers and scientists with systems
that accelerate productivity, innovation, and
discovery.
(http://twitter.com/niglobal)
(
http://www.facebook.com/NationalInstruments)
(
http://www.linkedin.com/company/3433?trk=tyah)
(http://www.ni.com/rss/)
(
http://www.youtube.com/nationalinstruments)
Contact Us (http://www.ni.com/contact-us/)
(http://privacy.truste.com/privacy-seal/National-Instruments-Corporation/validation?rid=bc6daa8f-7051-4eea-b7b5-fb24dcd96d95)
Legal (http://www.ni.com/legal/) | © National Instruments. All rights reserved. | Site map (
http://www.ni.com/help/map.htm)
5/5
www.ni.com
Download