From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

NI-Scope Multi Record Fetch Stream to Disk

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Modular Instrumentation

    Software

  • LabVIEW

    Driver

  • Other

Code and Documents

Attachment

Overview

This VI is an expansion of the example niScope EX Multi Record Fetch More Than Available Memory.vi which includes the streaming to disk function and implements a Producer/Consumer architecture.

 

Description

This example takes the NI-SCOPE example niScope EX Multi Record Fetch More Than Available Memory VI and adds streaming to disk with TDMS. The use of a Producer/Consumer architecture ensures that all disk operations will not prevent the constant fetching of data from the digitizer. All of the Scope Acquisition is performed in the Producer loop while the data is written to a binary TDMS file in the consumer loop.

 

Requirements

Software:

  • Labview 2012 (or compatible)
  • NI-Scope driver which is compatible with your hardware and version of LabVIEW

Hardware:

  • NI Scope Device

 

Steps to Implement or Execute Code

1. Select the name of your scope digitizer
2. Run the VI
3. Select the address of TDMS file in the file dialog window
4. After Number of Records Fetched meets Number of Record, click 'Stop'

 

Additional Information or References

VI Block Diagram

121.png

 

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Regards,
Dan King

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Todd S.
NI Employee (retired)
on

Way to improve on an existing example.  This is a great addition, thanks!

Todd S.
LabVIEW Community Manager
National Instruments
judebuggy
Member
Member
on

The program seems to use up system memory. It doesnt seem to run on my system for more than a minute. I can't find any threads to correct the problem. Any ideas?