Lesson 4 LabVIEW RT
Chad Evans Applications Engineer
Resources for Learning LabVIEW RealTime
Real-Time User Manual
Start>Programs>National Instruments>LabVIEW 7.0>LabVIEW RT documents>Search the LabVIEW Real-Time Bookshelf>LabVIEW Real-Time User Manual
LabVIEW Real-Time Measurement and Control Course ($995) NI Developer Zone > Development Library > Measurement and Automation Software > LabVIEW > Real-Time Module
Using LabVIEW Real-Time and a RIO Device Windows RT PXI Controller
Workflow 1. Plan application
a) b) c) d) e)
Computer RT VIs Windows VI Com TC
PXI-7831R FPGA VI
I/O and timing RIO Device communication and timing Deterministic software operations on RT (Control, data acquisition, etc.) Non-deterministic operations on RT (Network, File I/O, etc.) GUI elements, other code to execute in Windows
2. 3. 4. 5.
Build and test FPGA VI (emulate, interact) Build and test Time Critical RT VI Build and test non-deterministic VIs (or use RT Communication Wizard) Build and test Windows VI (or use RT Communication Wizard)
LabVIEW Real-Time Time Critical Priority
Windows Computer RT PXI Controller PXI-7831R RT VIs
Windows VI
Com
TC
FPGA VI
Disable USB in BIOS Use only deterministic operations in the loop
Deterministic: FPGA communication, Real-Time FIFO Non-Deterministic: Memory allocation, file I/O, network communication, large global variables, using resources shared with other VIs
Set VI Priority to Time Critical (File>VI Properties>Execution) Remove all controls/indicators from deterministic loops one Time Critical VI, with one loop Must sleep for lower priority VIs to run Polling without sleep mode will starve lower priority VIs
Multithreaded FPGA Host Interface
Windows Computer Windows VI RT PXI Controller PXI-7831R RT VIs Com TC FPGA VI
Normal Priority
While waiting on RIO interrupts in Time Critical Priority, lower priority VIs can still communicate with the FPGA VI.
RT Communication Wizard
Windows Computer Windows VI RT PXI Controller PXI-7831R RT VIs Com TC FPGA VI
Uses Time Critical VI to create the Communication VI and Windows VIs Uses Real-Time FIFO and choice of network communication method New in LabVIEW Real-Time 7.0
RT Communication Wizard (cont.)
Tools>RT Communication Wizard Put controls or indicators in Time Critical VI for what you want communicated (these will be removed)
Exercise 4.1
To use the RT Communication Wizard to create a Time Critical VI for controlling the FPGA VI, a Normal Priority Communication Loop, and a VI to run on Windows.
Miscellaneous Real-Time Stuff
FTP Server Web Server Remote Front Panels E-mail File I/O
Lesson 4 Summary
Use LabVIEW Real-Time for deterministic processing Use the RT Communication Wizard for help in creating communication VIs