Sei sulla pagina 1di 23

Introduction to New LabVIEW Real-Time

Control Features for CompactRIO

Massimiliano Banfi
Systems Engineer Manager
National Instruments Italy
NI CompactRIO Embedded Architecture
Real-Time Processor Reconfigurable FPGA

Extreme Ruggedness
• -40 to 70 ?C temperature range
• 50 g shock, 5 g vibration

I/O Modules Low Power Consumption


• 9 to 35 VDC power, 7 to 10 W typical

•I/O Modules with built-in signal conditioning for connection to sensors/actuators


•Reconfigurable FPGA for high-speed and custom I/O timing, triggering, and control
•Real-time processor for deterministic, stand-alone operation, logging, and analysis
LabVIEW 8.6: A New Era for CompactRIO

•Program CompactRIO in minutes with new


CompactRIO Scan Mode
•Work with new monitoring and maintenance
tools
Distributed System Manager
• Monitors systems on the network
• Manages published data
• Adds test panels to CompactRIO

4
New LabVIEW 8.6 Programming Model for
CompactRIO
NI CompactRIO
LabVIEW Real-Time FPGA

LabVIEW Real-Time NI Scan Engine


I/O Variables
RIO Scan
I/O Memory Interface

I/O Modules

I/O Modules
Table

FPGA Host Interface LabVIEW FPGA


VI
What Is the RIO Scan Interface?
•Prebuilt bit file for the FPGA
• No FPGA programming/compile needed
• LabVIEW FPGA not required
•Direct single-point I/O access to LabVIEW Real-Time
Module
• Automatic module detection
• Supports most modules
What Is in the RIO Scan Interface?
Real-Time FPGA
I/O Modules
I/O Data
DMA 1
Cartridge
NI Scan Engine DMA 2 DMA Engine Module 1
Controller 1

Cartridge
Module 2
Controller 2
Cartridge Manager and
Timing

Cartridge
Module 3
Controller 3

Timing and Control



Cartridge
Module n
Controller n

Specialty Digital 1

Specialty Digital 2
I/O Data Transfer to NI Scan Engine

8
Synchronizing to the NI Scan Engine

• Timed loop • While loop


• Synchronize to NI Scan Engine • Synchronize to Scan Engine.vi
timing source

9
I/O Variable Access

Physical I/O

NI Scan Engine Physical I/O


Memory Map
Physical I/O

Physical I/O

10
I/O Forcing
• Override input/output values at edit and run time
• No code changes required
• Force I/O with system manager or I/O forcing VIs

Ignored until unforced or rebooted


Forced value

Physical I/O

11
I/O Alias
• References an I/O variable
• Adds additional custom scaling
• Maintains code portability

I/O variable I/O Memory Map


Fixed reference
AI0
AI1
I/O alias AI2
AI3

12
NI Scan Engine Network Publishing
• Out-of-box I/O without programming
• I/O variable and alias publishing
• Published by NI Scan Engine
• Configurable update rate

• Not yet supported on touch panel


• Binds to shared variables for additional
features

13
NI Scan Engine
• Configured from CompactRIO controller properties

• Runs above time-critical priority by default


14
Faults
• NI Scan Engine error reporting tool
• View and clear in system manager
• Access programmatically with Fault Vis
• Important to monitor faults if you lower the NI Scan
Engine priority

Get fault list Set fault Clear fault Clear all faults

15
New LabVIEW 1131 Function Blocks
Accumulate and Collect Timing Edge Detection
Accumulate Count Down Edge Detect

Collect Boolean Array Count Up One Shot Rising

One Shot Falling


Collect Numeric Array Count Up Down

Totalize Pulse Timer Control

Bistable/Flip-Flop Elapsed Timer PID

RS Bistable Retentive Timer On

SR Bistable Timer On Delay

Timer Off Delay

16
LabVIEW Function Blocks

• Familiar industrial functions based on


IEC 61131-3 standard
• Designed for real-time control
• Network-published shared variable
parameter values
• Install with LabVIEW Real-Time
Module
• Also runs on Windows OS
• LabVIEW Project integration

17
CPU Usage Benchmark
Use LV FPGA for
100 these applications
90

80

70
1000 Hz
CPU % Usage

60
28.4% CPU
50
80 PID Channels
500 Hz
40

30

20

10
100 Hz

0
1 2 4 8 16 32 64 80
Number of Channels: AI + PID + AO
Combining CompactRIO Scan Mode
with LabVIEW FPGA Mode
• Add FPGA to project
• Drag modules to FPGA
• Requires compiler
• CompactRIO Scan
Mode modules
• LabVIEW FPGA Mode
modules
• No synchronization yet

National Instruments Confidential 19


RIO Scan Interface with LabVIEW FPGA
Real-Time FPGA
I/O Modules
I/O Data
DMA 1
Cartridge
NI Scan Engine DMA 2 DMA Engine Module 1
Controller 1

Cartridge
Module 2
Controller 2
Cartridge Manager and
Timing

Cartridge
Module 3
Controller 3

Specialty Digital 1


Specialty Digital 2
FPGA Host
Interface
LabVIEW FPGA VI
Module n
Module n
Using LabVIEW FPGA with RIO Scan
Interface Notes
1. RIO Scan Interface uses 2 DMA channels (1 left)
2. FPGA code and CompactRIO Scan Mode code
are not synchronized
3. Less space left on the FPGA
4. Compile times are longer
DEMO
• Using LabVIEW FPGA and
CompactRIO Scan Mode
Questions?

Potrebbero piacerti anche