![Page 1: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/1.jpg)
Embedded Data Logging with CompactRIO and
LabVIEW
![Page 2: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/2.jpg)
2
Today’s Engineering Challenges
• Doing more with less
• Managing global operations
• Getting increasingly complex products to market faster
• Adapting to evolving application requirements
• Maximising operational efficiency
• Minimising power consumption
• Protecting system and resource investments
![Page 3: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/3.jpg)
3
The NI Approach to Meeting Today’s Challenges
Low-Cost, Modular
Measurement and
Control Hardware
Productive Software
Development Tools
Highly Integrated,
Expandable Platforms
![Page 4: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/4.jpg)
4
More than 30,000 companies
…including 90% of Fortune 500 manufacturing companies
![Page 5: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/5.jpg)
5
National Instruments
Corporate headquarters: Austin, Texas
Year established: 1976
Revenue: $873 million in 2010
Global operations: offices in 40 countries
Investment in R&D: 16% of annual revenue
Customer base: 30,000 companies annually
Network: More than 600 Alliance Partners
Diversity: no industry makes up more than
15% of revenue
Net R
even
ue in
Millio
ns
![Page 6: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/6.jpg)
6
Agenda • Data Logging: A Hardware/Software solution
Introduction to LabVIEW
Introduction to CompactRIO
Exercise 1 (optional) & Exercise 2
• Software Architectures for Data Logging
Programming tools in LabVIEW
The State Machine Architecture
Exercise 3&4
• Extending a data logging solution to the cloud
![Page 7: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/7.jpg)
7
What is a data Logger?
Data logging is the measuring and recording of
physical or electrical parameters over a period of
time.
Tethered
• Easy Bus – eg. USB, Ethernet
• Reconfigurable
• Price
Stand Alone
• Distributed
• Long term – reliability
• Portable
![Page 8: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/8.jpg)
8
Highly Distributed Data Acquisition Environmental Monitoring in the Costa Rican Rain Forest
![Page 9: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/9.jpg)
9
Structural Health Monitoring
![Page 10: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/10.jpg)
10
CompactRIO Motorcycle Portable, Stand-Alone Data Acquisition
![Page 11: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/11.jpg)
11
Software
+
The Solution involves Hardware and Software
Hardware
![Page 12: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/12.jpg)
The Software
![Page 13: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/13.jpg)
13
Graphical System Design
Dataflow C Code Textual Math Simulation Statechart
Personal Computers PXI Systems CompactRIO Custom Design SB RIO
![Page 14: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/14.jpg)
14
Hardware and Software Integration
Dataflow C Code Textual Math Simulation Statechart
Personal Computers PXI Systems CompactRIO Custom Design SB RIO
Real-Time FPGA Microprocessors
LabVIEW Desktop
![Page 15: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/15.jpg)
15
Graphical System Design
Dataflow C Code Textual Math Simulation Statechart
Personal Computers PXI Systems CompactRIO Custom Design SB RIO
![Page 16: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/16.jpg)
16
G Programming
Language
Hardware Support Analysis and
Technical Code Libraries
Reporting and Data Visualisation Tools
Technology Abstraction
Models of Computation
![Page 17: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/17.jpg)
17
Instructor Demo: The LabVIEW Environment “VI” = program or function
“Front Panel” = user interface “Block Diagram” = code
![Page 18: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/18.jpg)
The Hardware
![Page 19: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/19.jpg)
19
What is RIO?
RIO = Reconfigurable I/O and it consists of 3
components:
Processor Backplane
I/O
I/O
I/O
![Page 20: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/20.jpg)
20
The CompactRIO System
I/O Backplane Processor
![Page 21: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/21.jpg)
21
The CompactRIO System
• Real-Time Processor: For reliable measurement, analysis, connectivity & control
• Reconfigurable FPGA: For high-speed and custom I/O timing, triggering, and control
• I/O-Modules: With built-in signal conditioning for connection to sensors/actuators
Extreme Ruggedness
• -40 to 70 °C temperature range
• 50g shock, 5g vibration
Low Power Consumption
• 9 to 35 VDC power, 7-10 W typical
1
2
3
2
3
1
![Page 22: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/22.jpg)
22
LabVIEW Development with CompactRIO
CompactRIO Real-Time, FPGA Target
1. Develop on Host
2. Download to Target
3. Deploy to run stand-alone or communicate over Ethernet with host
4. Optional – develop a web interface to access data
![Page 23: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/23.jpg)
23
Scan Mode for CompactRIO • Automatic module detection
• Out-of-the-box access to synchronised I/O
• Distributed System Manager for on-line debugging
• Specialty Digital support
• I/O synchronised to Timed Loop (500 nS jitter)
• LabVIEW FPGA expandable
Temperature
Light Intensity
![Page 24: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/24.jpg)
24
NI CompactRIO
LabVIEW Real-Time Controler
LabVIEW Real-Time
Backplane
I/O
Mo
du
les RIO Scan
Interface
NI Scan Engine
I/O memory table
I/O Variables
I/O
Mo
du
les
LabVIEW FPGA VI
FPGA Host Interface
Programming Models for cRIO
![Page 25: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/25.jpg)
25
Exercise 1&2:
![Page 26: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/26.jpg)
The State Machine Design Pattern
![Page 27: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/27.jpg)
27
Controlling Program Execution
• Looping (For and While)
• Case structure
• Sequence structure
• State machines
• Event structure
• State diagram editor
• Timed loop
Is Limit Met?
Yes
No
Start
Reset Output
Turn On Output
![Page 28: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/28.jpg)
28
Execution Control Structures
While Loop For Loop
Run until stop condition met Run N times
• Allow same piece of code to run multiple times • Exit conditions different for each
![Page 29: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/29.jpg)
29
LabVIEW Case Structure
Primary decision making block
![Page 30: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/30.jpg)
30
Iterative Data Transfer 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
![Page 31: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/31.jpg)
31
Background – Static Sequence
![Page 32: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/32.jpg)
32
Background
Dynamic Sequence: Distinct states can operate in a
programmatically determined sequence
![Page 33: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/33.jpg)
33
Transition Code
How It Works
FIRST STATE
FIRST STATE
NEXT STATE
Step Execution
Shift registers used to carry state
Case structure has a case for every state Transition code determines next state based on results of step execution
![Page 34: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/34.jpg)
34
Why use a state machine in data
logging applications?
Stable
Maintainable
Expandable
Flexible
![Page 35: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/35.jpg)
35
Exercise 3&4:
![Page 36: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/36.jpg)
37
Web Services in LabVIEW Integrated Web Server
Web Client (Browser) Web Client (Browser)
![Page 37: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/37.jpg)
38
Web Services in LabVIEW
• Web Service runs on
Windows and Real-Time
systems
• Enables custom Web clients
applications
• No LabVIEW Run-Time
Engine required on web client
Web Server Web Client HTTP Protocol
![Page 38: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/38.jpg)
39
VI deploys data via
Web Service
Web Services in LabVIEW
HTTP Protocol Web Client
Adobe
Flex
Adobe
Flash
Silverlight JAV
A
Web Server
![Page 39: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/39.jpg)
40
LabVIEW Web UI Builder
VI deploys data via
Web Service
Use the Web UI Builder for a
LabVIEW client application
without LabVIEW Run Time
HTTP Protocol Web Client Web Server
![Page 40: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/40.jpg)
41
World Wide Communication &
Maintenance
Web Client
Web Client
HTTP Protocol HTTP Protocol
Web Server
![Page 41: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/41.jpg)
42
CompactRIO-Host Connectivity Chart
TCP/IP UDP Network
Streams
Shared
Variables
Web Service /
Web Client
![Page 42: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/42.jpg)
43
Demo: Web Services & Web UI Builder
![Page 43: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/43.jpg)
44
Your Next Steps
• Visit ni.com/labview Try LabVIEW Online for FREE
Read technical white papers
View webcasts on-demand
Find other seminars in your area
• Schedule a visit with your local field engineer to discuss your application
![Page 44: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/44.jpg)
45
Worldwide LabVIEW User Community
• Over 100,000 members on award-
winning NI Discussion Forums
• NI & LabVIEW user-contributed blogs
• More than 100 LabVIEW User Groups
• Third-party community web sites in
over 15 languages
• Hundreds of third-party add-on tools
on the LabVIEW Tools Network
![Page 45: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/45.jpg)
46
Software Maintenance and Support
Membership in a National Instruments software maintenance and support program allows you to:
•Receive software updates and maintenance releases automatically •Enjoy direct access to technical support from NI applications engineers •Access special online software training modules that highlight features, application uses, and development best practices
Visit ni.com/services to learn more
![Page 46: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/46.jpg)
47
Training and Certification
Together, the National Instruments training and certification programs deliver the fastest, most certain route to increased proficiency and productivity using NI software and hardware.
NI Training: Build Your Knowledge NI training helps you build the skills to more efficiently develop robust, maintainable applications. We provide several training options including classroom, self-paced, online, or on-site training at your facility.
NI Certification: Validate Your Expertise NI certification confirms your technical growth and skill. This professional certification is ideal
for differentiating yourself from the competition and making your own informed
hiring and outsourcing decisions.
Visit ni.com/training to learn more
![Page 47: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/47.jpg)
48
Learn More about NI LabVIEW and data logging Systems
• Try LabVIEW Online for FREE
• Check out further information and products at www.ni.com/datalogger
• View DAQ product specs and demos: www.ni.com/daq
• Schedule a visit with your local field engineer to discuss your application
![Page 48: Embedded Data Logging with CompactRIO and LabVIEW](https://reader030.vdocuments.net/reader030/viewer/2022020706/61fc8b008d33c02b785e6540/html5/thumbnails/48.jpg)
49
Questions?
ni.com/crio
ni.com/labview