Professional Documents
Culture Documents
ni.com/it
Agenda
•Introduction to Real-Time
•Real-Time Development Tools
•CompactRIO: FPGA-based architecture
•Programming with LabVIEW Real-Time
•Control and analysis
•Communicating to Real-Time targets
•Programming with LabVIEW FPGA
ni.com/it
National Instruments Everywhere
More than 25,000 companies, including
90% of Fortune 500 manufacturing companies use virtual instrumentation
ni.com/it
LabVIEW Graphical Programming
ni.com/it
LabVIEW Graphical System Design Platform
Dataflow C Code Textual Math Simulation Statechart
ni.com/it
NI CompactRIO FPGA-based Hardware
ni.com/it
What is Real-Time?
• Real-time does not always mean real fast
• Real-time means absolute reliability
• Real-time systems have timing constraints that must be
met to avoid failure
• Determinism is the ability to complete a task within a fixed
amount of time
ni.com/it
Spectrum of Real-Time Applications
ni.com/it
Operating System Characteristics
General Purpose OS Loop Rate Software Jitter
• High-priority tasks can be
preempted by lower-priority tasks
• Extraneous background programs
- Screen savers, disk utilities, virus
software, and so on 10–100 Hz Unbounded
• Peripheral Interrupts
- Mouse, keyboard, and so on
Real-Time OS
• Scheduler ensures high-priority
tasks execute first
• Direct control over all tasks Up to 50kHz Bounded
• Stand-alone (no mouse, keyboard,
and so on)
ni.com/it
Real-Time Development Tools
Compiler
Linker
Development LabVIEW Real-Time
Software
Debugger
ni.com/it
Application Software
Created by the
embedded Driver API
designer for
each project
Device Drivers
COTS HW
• USB, Ethernet and other low-level software stacks
vendors supply
SBC and BSP
• Processor-based SBC
Single-Board • No FPGA
Traditional COTS HW
Computers
ni.com/it
• Graphical or Text programming
• Program HMI, real-time processor and FPGA with one tool flow
Application Software • Signal processing, control, communications libraries in LabVIEW
• Complete C and VHDL support
Validated,
Driver API • APIs for DMA transfer
• APIs for Serial, CAN, TCP and file I/O
Middleware
Drivers Board Support
Package (BSP)
Ready to Run Out of the Box:
• VxWorks RTOS with prebuilt BSP
• Built-in boot loader, flash and download utilities/drivers
• USB, Ethernet and other low-level software stacks
• Freescale Processor
CompactRIO or NI
Single-Board • Xilinx FPGA
Single-Board
ComputersRIO • NI custom high performance bus interface ASIC
• Connectivity for custom design or C Series I/O
ni.com/it
LabVIEW Real-Time Module
ni.com/it
LabVIEW Real-Time Hardware Targets
LabVIEW Real-Time
ni.com/it
NI CompactRIO FPGA-based Hardware
Extreme Ruggedness
• -40 to 70 C temperature range
• 50g shock, 5g vibration
Low Power Consumption
Real-Time FPGA • 9 to 35 VDC power, 7-10 W typical
Processor
• 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
• Real-time processor for reliable measurement, analysis, connectivity, and control
ni.com/it
NI Single-Board RIO Embedded Control & Acquisition
Real-Time Processor
Networking/Peripherals 400 MHz processor for floating-point control,
10/100 Ethernet port analysis, and logging
RS232 Serial port
Reconfigurable FPGA
Customized timing and processing of I/O
Expansion I/O
Connect up to three C Series modules for
additional I/O (strain, TC, comm., motion, etc…)
ni.com/it
C Series I/O Modules
• Analog Input
Up to 250 kS/s
simultaneous sampling
4, 8, 16, and 32-ch options • Digital I/O
Built-in signal condition for sensors – Up to 30 MHz timing
• Strain gages, accelerometers, – 8 and 32-channel options
thermocouples, RTDs – 5V/TTL, 12/24/48 V logic levels
Up to 300V, ± 60 V, ±20 mA – Available ch-to-ch isolation
12, 16 and 24-bit resolution
Available ch-to-ch isolation
• Other
– 2-port CAN modules (high and low
• Analog Output speed)
Up to100 kS/s simultaneous – Brushed DC servo motor drive
updating module
4-ch per module • Connector options
10 V, ±20 mA – Screw terminal, spring terminal, BNC,
Isolation D-Sub
ni.com/it
CompactRIO/Single-Board RIO Applications
Machine Control Machine Monitoring In-Vehicle Data Acquisition
• Packaging/Processing • Machine Condition Monitoring • In-Vehicle Data Acquisition
High-speed motion – Bearing order analysis, – Automobiles, motorcycles,
control, batch control, lubrication monitoring, cooling, recreational vehicles, research
discrete control combustion… aircraft, trains
• Heavy Machinery Control • Mobile/portable DSA, NVH • Engine and ECU test cells
Real-time signal – Noise, vibration, harshness, – HIL testing of engines and
processing and control dynamic signal analysis, engine controllers, sensor
of power electronics, acoustics simulation using FPGA
hydraulic systems
• Distributed Acquisition • Rapid Control Prototyping
• Semiconductor/Biomed
Custom motion and – Central controller with – Automotive/aerospace control
vision inspection, distributed I/O nodes over prototyping
material handling Ethernet/wireless
ni.com/it
Exercise Station – CompactRIO Demo Box
ni.com/it
LabVIEW 8.6: A New Era for CompactRIO
ni.com/it
New LabVIEW 8.6 Programming Model for
CompactRIO
NI CompactRIO
LabVIEW Real-Time FPGA
I/O Modules
I/O Modules
Table
ni.com/it
Exercise 1
Temperature Threshold Measurement
I/O
I/O
I/O Scan
I/O
LabVIEW
Real-Time
I/O
ni.com/it
CompactRIO Specialty Digital
Functionality
ni.com/it
Exercise 2- Specialty Digital Function
ni.com/it
The LabVIEW Timed Loop
• Each timed loop is a real-time task
• Variety of sources for loop timing
• Assign unique priorities to a maximum
of 128 tasks
• Obtain timing feedback from loop
• Dynamically change loop timing
• Assign to particular CPU core on
multicore systems
ni.com/it
Implementing Control in LabVIEW
(CompactRIO)
ni.com/it
LabVIEW Real-Time Control & Analysis
• Built-in Tools for Control
PID, Fuzzy Logic, Advanced
Import C algorithms, Simulink Models
ni.com/it
LabVIEW Function Blocks
ni.com/it 28
Exercise3- Alias and new Function
Blocks
Accumulate and Collect Timing Edge Detection
Accumulate Count Down
ni.com/it
External Communication Methods
• Default Communication
Best for developing and debugging
• Remote Panels
Best for remote control through Web browser
• Shared Variables
Best for fast and distributed communication
Simple, intuitive API for fast development
Scalable for high-channel, rapid development
apps
ni.com/it
Remote Panels
• Uses LabVIEW built-in Web server
• Monitor and control application with a Web browser
ni.com/it
LabVIEW 8.6 Real-Time
Web Services Support
• Windows and Real-Time
• Custom Web clients
• No run-time engine needed
Web Server
• Standard HTTP protocol
• Firewall friendly
ni.com/it
LabVIEW Execution Trace Toolkit
• Add-on for the LabVIEW Real-Time Module
• Provides exact execution tracing of VIs and threads
running on real-time target for advanced debugging
Step 1: Use the Trace Step 2: Use the Execution Trace Tool to view
VI’s to analyze behavior thread execution and debug application
ni.com/it
Scheduling Example: Two Real-Time
Tasks
• Task A runs every 10 ms and needs 3 ms of CPU time
A A
0 1 2 3 4 5 6 7 8 9 10 11 12 13
• Timed Loop A (priority 100) and Timed Loop B (priority 101) together:
B A B A B A B A B A B A B B B B B A B A B A B
0 1 2 3 4 5 6 7 8 9 10 11 12 13
ni.com/it
Implement Multirate Scheduling
ni.com/it
FPGA Technology
Programmable
Interconnects
Logic
Blocks
I/O Blocks
ni.com/it
Importance of FPGA in Systems
ni.com/it
How Does LabVIEW FPGA Work?
2. Generate VHDL
ni.com/it
When to Use LabVIEW FPGA
ni.com/it
FPGA Co-Processing
• Hardware-in-the-loop LVDT Simulation
• Sensor simulation
Cam and crank
LVDTs
• Encoding/decoding sensors
Tachometers
Quadrature Encoder
Custom digital protocols
• Signal Processing and Analysis
Spectral analysis (FFT and windowing)
Filtering, Averaging, etc.
Integrate 3rd party IP
ni.com/it
Programming CompactRIO with
LabVIEW FPGA
NI CompactRIO
LabVIEW Real-Time FPGA
I/O Modules
I/O Modules
table
ni.com/it
Combining Scan Mode with FPGA Mode
ni.com/it
Exercise 4. Using LV FPGA
Programming with LabVIEW FPGA
I/O
I/O
I/O
LabVIEW LabVIEW
Real-Time FPGA
I/O
ni.com/it
LabVIEW Real-Time Targets
I/O Variety
Scalability
Performance
Ruggedness
ni.com/it
CompactRIO Embedded System
•Extreme Durability
•Reconfigurable FPGA Circuitry
•Isolated Industrial I/O
•Real-Time OS
•Small Size, Low Power Consumption
ni.com/it
NI Single-Board RIO Embedded Device
ni.com/it
NI Embedded Evaluation Kit
• Contents • Price
– 879 € for 90-day eval kit
NI Single-Board RIO with DIO, AI, AO –1049 € for 180-day eval kit
Signal accessory daughter card
LabVIEW evaluation software
• LabVIEW, LabVIEW Real-Time, and
LabVIEW FPGA (expiring license)
Getting started guide with
exercises and tutorials
Power supply
Ethernet cable
ni.com/embeddedeval
ni.com/it
RT Series PXI Embedded Controllers
• High speed I/O
• Instrument grade accuracy
• Synchronization backplane
• Headless operation
• Hard drive or CompactFlash
• Watchdog timers
ni.com/it
Desktop PC as Real-Time Target
• Convert desktop, industrial PCs, and Single-Board
Computers (SBC) into Real-Time targets
• Integrate large variety of PCI I/O hardware
• Leverage high performance of latest PCs
ni.com/it
Additional Information
• Visit
ni.com/labview/i
ni.com/pac/i
ni.com/realtime
ni.com/fpga
ni.com /compactrio or ni.com/sbrio - and find:
» Product information
» User applications
» Training opportunities
» In-depth tutorials
• Technical Support
www.ni.com/ask
www.ni.com/zone
ni.com/it
Le Caratteristiche di LabVIEW 2009
• Development Environment Enhancements
• Language and Performance Improvements
• LabVIEW MathScript RT Module
• Data Management and Visualization
• Software Engineering Tools
• LabVIEW Community
What’s New in LabVIEW Real-Time
Architect Advanced Systems with Real-Time Technologies
• Real-Time Hypervisor
• MathScript RT Module
• Object-Oriented Programming
Manutenzione Supporto
Hardware Tecnico
Manutenzione
Software
ni.com/it
Corsi organizzati presso le sedi NI, presso il cliente e ON-LINE via web
Prodotti disponili per la formazione: Manuali, CD Kit
LabVIEW, LabWindows/CVI, TestStand, DIAdem
Base
Formazione
Corsi Tematici sulle misure
Corsi orientati ai moduli software: Real-Time, FPGA
CORSI TEMATICI:
Intermedia Corsi
La orientati
misura con all’uso di hardware:
il supporto del PC Acquisizione Dati, Bus
CAN, Strumenti
Misure Modulari
Elettriche con il -PC
PXI, Vision & Motion, CompactRIO
Misure Termotecniche
Corsi avanzati con ilprogrammi
sui prodotti, PC “ad hoc” per il cliente
Corso Base: Acustica & Vibrazione
Avanzata Certificazione – Associate,
Corso Avanzato: Acustica & Developer,
Vibrazione Architect per
LabVIEW, LabWindows/CVI, TestStand
Installazione
Progettazione Sviluppo
Impiego
ni.com/it
Grazie per l’attenzione
Xxxx xxxxx
National Instruments Italy
x.x@ni.com
ni.com/it