Download presentation
Presentation is loading. Please wait.
Published byEmil Simpson Modified over 8 years ago
1
High-Speed Control and Disk Streaming Monday Aug 24, 2:30 - 4:00 p.m. Thursday Aug 27, 12:45 - 2:15 p.m. and 2:30 - 4:00 p.m. Red River (4B) Aljosa (Al) Vrancic and Joe Savage DAQ Software Engineers
2
Agenda High-speed control –LabVIEW techniques –LabWindows/CVI techniques –Thread prioritization techniques High-speed disk streaming –HSDL VIs –Demo
3
Control Application Overview Objective – high-speed control application –Using NI-DAQ and general-purpose plug-in DAQ hardware Problems –Control loop rate is determined by CPU speed –Loops would not run very fast –Need dedicated hardware or real-time operating system (OS) Solutions –Leverage off PC technology –Use a lightning-fast computer! (333 MHz +)
4
Inside a LabVIEW Control Application Input –Acquire one scan of data –Scan – one sample of data per channel of interest Control computation –Compute one or more output signals based on the input data (and past input data) Output –Generate the output signals
5
Analog Input Timed, non-buffered acquisition AI single scan VI reads data directly from board
6
AI Single Scan VI
7
“Opcode” = Read Oldest Data Reads one scan from device’s FIFO On return: “Data Remaining” returns 0 if FIFO is empty, returns 1 if any samples are remaining
8
AI Single Scan VI (con’t) “Opcode” = Read Newest Data Reads device’s FIFO until it is empty Only last scan is returned (the rest is thrown away)
9
AI Single Scan VI (again) Combination of previous modes Call VI with “opcode” set to Read Oldest Data If “Data Remaining” is not zero, call VI with “opcode” set to Read Newest Data
10
Analog Output Non-buffered, single point analog output DAC architecture is buffered, so DAC can be written to and updated in separate operations
11
Analog Output (con’t) Output and Update – immediately update DAC with new value Output only – write value to DAC but do not update Update source determined by AO Clock Config
12
Combining Input and Output Synchronize input scan clock and DAC update clock E-Series only – Use counter to generate delayed pulse to update DAC following every scan clock pulse LabVIEW Demo
13
200us 1ms Demo: Control Loop (with timed DAC updates) Timing Diagram
14
Demo: Control Loop (immediate DAC updates) Timing Diagram 180us160us 180us 1 ms
15
Inside a LabWindows/CVI Control Application Same basic concepts as LabVIEW application AI: DAQ_Start or SCAN_Start to begin acquisition, DAQ_Monitor or DAQ_DB_Transfer to retrieve data AO: AO_Write to generate data LabWindows/CVI Demo
16
Thread Prioritization Boost priority of control loop thread LabVIEW: Under VI Setup…->Execution Options->Priority LabWindows/CVI: Use Win32 SDK functions GetCurrentThread and SetThreadPriority Does not speed up execution, but can make loop execution speeds more consistent
17
Questions?
18
High-Speed Data Logging Introduction
19
Agenda High speed data logging –Q: How? A: High Speed Data Logging VIs Requirements Limitations How does it work? Demo –Helpful hints –Benchmarks Technology Demo
20
High-speed Data Logging Definition –More data than available computer memory –Data rates > 4 MB/s –Analog, digital Setup 4 x 5MSPS = 20MSPS 40MB/s Software: NI-DAQ, LabVIEW, LabWindows/CVI, or C SCSI
21
High-Speed Data Logging (con’t)
22
HSDL VIs – Requirements Simple (easy to use) –few new VIs –similar to the existing API Powerful –LabVIEW, LabWindows/CVI, and C –data compression Less disk space Higher logging speeds Expandable
23
Limitations Binary data only Little vs. big endian issue –Affects cross-platform LabVIEW users
24
How Does It Work? DAQ Configure and File Open Start DAQ Read Data Display Data Clear DAQ and File Close Configure HSDL File Write Legend: New Same as before Optional
25
Demo
26
Demo (con’t)
27
Demo (con't.) Issues –Disk fragmentation (5 MB/s vs. 14 MB/s) –Memory locking –Hard disk requirements Cache (of secondary importance) Spinning speed (AV drives at 10,000 rpm) Number of write heads Configure DAQ #1 Start DAQ #1 (thrashing) Configure DAQ #2 Start DAQ #2 (thrashing) (DAQ#1 overflow)
28
Demo (con’t)
29
Benchmarks
30
HSDL VIs Requirements Components Availability
31
Conclusion HSDL VIs –Offers low-cost data logging solutions PC (from $2,500) SCSI drive(s) (from $600) DAQ card(s) (from $2,200) Software ($2,000) Complete Solution (10+ MB/s ): from $7,500 –Data logger with a familiar “look” and “feel”
32
Technology Demo
33
Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.