Tommaso Cucinotta - Low-latency and power-efficient audio applications on Linux
Lesson 1 introduction to real time
1. Lesson 1
Introduction to Real Time
TOPICS
A. What is Real-Time?
B. RT Host
C. RT Target
ni.com/training
2. A. What is Real Time?
Real Time Response: The ability to reliably
and, without fail, respond to an event or
perform an operation, within a guaranteed
time period.
ni.com/training
3. Real-Time Terms
Loop Cycle Time
• Execution time of one cycle of a loop
Jitter
• Variation from the desired loop cycle time
Determinism
• Measure of jitter magnitude
Latency
• Time required to respond to an event, or the time between
input and output
ni.com/training
4. Real-Time Terms (continued)
Embedded
• A computer system that is a component within a larger
system. Embedded systems usually operate headlessly.
ni.com/training
5. Maximum Jitter Jitter Range
Desired Loop Time Maximum
Jitter
1
Loop Iteration
2
3
4
5
Loop Time (seconds)
ni.com/training
6. Operating Systems
• Processor time is shared between programs
• Operating systems can preempt high priority VIs
− Many programs run in the background—screen savers, disk
utilities, virus software, and so on
− It must service interrupts—keyboard, mouse, Ethernet, and so on
• Cannot guarantee determinism—that is, it is a
non-deterministic system
ni.com/training
7. Real-Time Operating Systems
• Ensure that high-priority tasks execute first
• Do not require user input from peripherals
LabVIEW Real-Time Module executes VIs on the following:
• Hardware targets running the Ardence Phar Lap
Embedded Tool Suite (ETS)
• Computers running Wind River VxWorks
This course focuses on the ETS platform
ni.com/training
8. Selecting an Operating System
General
Real-
Purpose Closed loop
Data acquisition Time OS
OS control
Time-critical
Offline analysis
decisions
Data presentation Extended run time
Stand alone
operation
Increased
reliability
ni.com/training
10. LabVIEW Real-Time System Using ETS
Host Computer RT Target
Develop Execute
Download
ni.com/training
11. Discussion Exercise 1-1: Project
Specification Document
Read and discuss the Project Specification document and
determine if real time is necessary for this application.
GOAL
ni.com/training
13. C. Real-Time Targets
Desktop PCs
Determinism for PCI systems
NI RT PXI Embedded Controllers
High speed, high channel density, I/O variety
NI RT Compact FieldPoint
Small footprint, harsh environments
LabVIEW
Real-Time NI Compact Vision System
Compact and distributed machine vision
NI CompactRIO
Reconfigurable Embedded System
ni.com/training
14. Real-Time Hardware Configuration
Desktop PCs
Determinism for PCI systems
NI RT PXI Embedded Controllers
High speed, high channel density, I/O variety
NI RT Compact FieldPoint
Host-Target
Small footprint, harsh environments
NI RT Compact Vision System
Compact and distributed machine vision
NI CompactRIO
Reconfigurable Embedded System
ni.com/training
15. RT Target – Host-Target Configuration
NI RT Series PXI Controller—Ideal for
high-speed, high channel count
acquisition
NI cRIO Series—Embedded system with
real-time controller, reconfigurable FPGA
chassis, and industrial I/O modules
NI RT Series Compact FieldPoint
Controller—Ideal for distributed real-time
I/O applications
NI 1450 Series Compact Vision System—
Acquires, processes, and displays
images for IEEE1394 cameras
Desktop PCs as RT Targets—Ideal for low
cost implementation
ni.com/training
17. RT Target—cFP Controller
Watchdog timer
Removable CompactFlash memory
(cFP-2x20 only)
Onboard static memory
Dedicated processor
User-defined DIP switches and LEDs
Serial port
Backup power supply connection
Ethernet port
ni.com/training
18. Target Platform Comparison
PXI cRIO cFP PC
Loop Speed Best Better Good Best
I/O Count High High High Low
Rugged Better Best Best —
Scalability Best Better Good Better
Third-party RT HW Yes Yes No Yes
Distributed Better Best Best Good
ni.com/training
19. Summary – Matching Quiz
1. Jitter A. How reliably a system responds to events
or performs operations within a given time
2. Determinism limit
B. Time taken to execute one cycle of a loop
3. Embedded
C. Variation of loop cycle time from the
4. Real time desired loop cycle time
D. Computer system that is typically a
5. Loop cycle component within a larger system
time E. The ability to reliably, and without
fail, respond to an event or perform an
operation within a guaranteed time period
ni.com/training
Notas del editor
IntroductionThis lesson introduces real-time concepts such as real time, determinism, and jitter. This lesson also discusses the components of a real-time system, including the host and the target. Use the Getting Started with the LabVIEW Real-Time Module manual to get started with the LabVIEW Real-Time Module quickly. To view the manual, select Help»Search the LabVIEW Help in LabVIEW to open the LabVIEW Help. Select the Contents tab, expand the Real-Time Module book in the table of contents, and open the Related Documentation topic. Click the Getting Started with the LabVIEW Real-Time Module link to open the document in your Web browser.
A. What is Real Time?The LabVIEW Real-Time Module combines LabVIEW graphical programming with the power of a real-time operating system, enabling you to build deterministic real-time applications. A misconception about real time is that it means quick. More accurately, real time means in-time. In other words, a real-time system ensures that responses occur in time, or on time. With general purpose operating systems, you cannot ensure that a response occurs within any given time period, and calculations might finish much later or earlier than you expect them to.For a system to be considered real time, all parts of it must be real time. For example, an application that runs in a real-time operating system may not behave with real-time characteristics. The application may rely on something that does not behave in real time, which causes the application to not behave in real time.Terms that frequently describe real-time systems are deterministic, loop cycle time, jitter, and embedded. Learning more about these terms helps you understand real time.
NoteThe puzzle symbol shown above indicates that you must complete this exercise for the course project. Look for this symbol on all course project exercises. Exercises are located at the end of each lesson.