Advanced DAQ System Development Using NI-DAQmx Originally presented Thursday, August 18th Agenda • Streaming Data Into Your PC – Components of Streaming – Challenge Areas / Solutions • Tailoring Data to Your Application – – – – Read Strategies Streaming to Disk Enhancements Scaling Virtual Channel Calibration • Deployment Tools – Programmatic Saves (demo) – Simulated Devices Agenda • Streaming Data Into Your PC – Components of Streaming – Challenge Areas / Solutions • Tailoring Data to Your Application – – – – Read Strategies Streaming to Disk Enhancements Scaling Virtual Channel Calibration • Deployment Tools – Programmatic Saves (demo) – Simulated Devices Components of Streaming DMA Controller ` Components of Streaming DMA Controller PCI Bus Buffer 32 Lo l ca s Bu ` FIFO FIFO Challenge #1 (CPU Utilization) NI-DAQmx 7.3 and Prior NI-DAQmx 7.4 and After Challenge #2 (Buffer Overflow) DMA Controller PCI Bus 32 Buffer Lo l ca s Bu ` FIFO Solutions to Buffer Overflow • Configure Task to Ignore Overflows • Reduce Number of Concurrent Applications • Increase Buffer Size, Tweak Number of Samples Per Read, Reduce Sample Rate • Move to Off Line Analysis • Use Unscaled or Raw Reads Challenge #3 (FIFO Overflow) DMA Controller PCI Bus 32 Buffer Lo l ca s Bu ` FIFO Scenarios Where FIFO Overflow Occurs • Large Systems Where Numerous Devices are Trying to Access the PCI Bus at the Same Time – Unfair Arbitration Due to Topology of the Bus – Overhead of PCI Bus Arbitration / Poor Utilization of the Bus Once Granted H D2 B D1 D1 D2 B D3 D4 Scenarios Where FIFO Overflow Occurs • Devices Acquiring Continuously at Very High Rates Across Multiple Channels • Example: PCI Bus Theoretical Maximum = 132 MB/s PXI-6115 – 12 Bits, 4 Channels, 10 MS/s 2 Bytes/Sample x 4 Channels x 10 MS/s = 80 MB/s • Solutions: – Distribute Devices Amongst Independent Bus Segments – Look Towards Higher Bandwidth Buses such as PCIe – Utilize Onboard Memory to Capture Smaller Data Set of Interest Challenge #4 (Utilizing Onboard Memory) NI-DAQmx 7.3 and Prior DMA Controller PCI Bus 32 Buffer Trigger Lo l ca s Bu ` FIFO Challenge #4 (Utilizing Onboard Memory) NI-DAQmx 7.4 and After DMA Controller PCI Bus 32 Buffer Lo l ca s Bu ` Trigger FIFO Challenge #4 (Utilizing Onboard Memory) NI-DAQmx 7.3 and Prior DMA Controller PCI Bus 32 Buffer Lo l ca s Bu ` FIFO Challenge #4 (Utilizing Onboard Memory) NI-DAQmx 7.4 and After DMA Controller PCI Bus 32 Buffer Lo l ca s Bu ` FIFO Utilizing Onboard Memory Summary • For Devices With Large Onboard Memory – Reference triggered acquisitions are no longer limited by PCI bandwidth – Finite Acquisitions • Effective Buffer = Host Buffer + Onboard Memory 33 MS 1 MS = Effective Buffer 32 MS + Buffer FIFO • No longer require large buffers • Fewer page locking issues Challenge #5 (Latency of Waveform Updates) DMA Controller PCI Bus 32 Buffer us lB ca Lo ` FIFO Which Properties to Use and When? –Only Need to Change Frequency of the Waveform –Update Can Occur Anywhere in the Waveform Period –Need to Update Waveform Shape or Frequency –Update Needs to Occur at the Beginning of the Period –Maximum Latency of One Waveform Period Desired –Control Applications Where New Data is Constantly Being Generated –Need Finer Grained Control of How Much Data is Written to the FIFO Agenda • Streaming Data Into Your PC – Components of Streaming – Challenge Areas / Solutions • Tailoring Data to Your Application – – – – Read Strategies Streaming to Disk Enhancements Scaling Virtual Channel Calibration • Deployment Tools – Programmatic Saves (demo) – Simulated Devices Scaled, Unscaled, and Raw Data Waveform Data Scaled Data Timing And Attributes Scaling Channel 1 Channel 2 Channel 2 Channel 1 Reordering Buffer Unscaled Data Raw Data Scaled, Unscaled, and Raw Data Waveform Data Unscaled Data Scaled Data Performance / Throughput Ease of Use Raw Data Streaming to Disk Enhancements 0000100101101011 Unused Resolution DMA Controller PCI Bus Buffer 32 Lo l ca s Bu ` NI PCI-6110 FIFO Scaling Virtual Channel Cal Sensor Units • Typical sensors scales Usage uses used – – –– • Typical scale scalesused used Table Thermocouple Linear Full Convert System unitsCalibration – Linear rd • order Ex. Gage V topolynomial mV 3Strain (for SW calibration) – Polynomial Scale atypical sensor Accelerometer – Table types – map Calibration: Typical Measurement System Virtual Channel Calibration Cable connections are overlooked sources of measurement error 0.4% 0.04% 0.02% Product measurement specifications Why Use Virtual Channel Calibration? • Calibrate your entire measurement path – Supplement internal calibration by accounting for errors introduced by sensors, signal conditioning, and cabling • Reporting capabilities – Print channel calibration with report generation – Built-in check for expired calibration • Custom calibration intervals Using Virtual Channel Calibration • Channel Calibration Wizard from the DAQ Assistant Using Virtual Channel Calibration • Programmatic Virtual Channel Calibration with the DAQmx Professional Tools Agenda • Streaming Data Into Your PC – Components of Streaming – Challenge Areas / Solutions • Tailoring Data to Your Application – – – – Read Strategies Streaming to Disk Enhancements Scaling Virtual Channel Calibration • Deployment Tools – Programmatic Saves (demo) – Simulated Devices Programmatic Save Global Channel Task? Scale? Programmatic Save • Examples available on ni.com as a part of the DAQmx Professional Tools – Visual C++, .Net, LabVIEW 7.0/7.1 • Save Scales, Global Channels, and Tasks • Programmatically deploy systems without requiring use of the MAX Import Wizard • Programmatically saved objects appear in MAX and are available for use in DAQ Assistant Programmatic Save Programmatic Save • Allow Interactive Deletion? – Allow or disallow users from deleting programmatically saved objects using DAQ Assistant Programmatic Save • Allow Interactive Editing? – Allow or disallow users from using DAQ Assistant with programmatically saved tasks – When enabled, only properties supported by the DAQ Assistant can be modified Disabled Behavior: Enabled Behavior: Demo – Cell Phone Tester Application • Deploy Configuration • Unit Tests – Power consumption – Microphone strength Simulated Devices • Benefits – Run NI-DAQmx programs and Assistant without the hardware – Evaluate NI software with simulated devices and data – Explore the features of NI hardware before purchasing DAQmx Professional Tools #1: Virtual Channel Calibration #2: Data Compaction #3: Programmatic Saves of Scales, Channels, Tasks #4: NI-DAQmx Simulated Devices #5: Software Events • Tutorials and examples available for all ADEs – Go to ni.com/info and enter “daqmxpro” Questions? Visit the Consultation Zone • Discuss products and configure your application • Get estimated costs or a quote to take with you • Request a FREE consultation – an NI engineer visits your office to: – Discuss your application and specialized topics – Demonstrate customized applications, examples, and products • Schedule an on-site seminar at your location