From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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

Parsing a Large File in LabVIEW

Code and Documents

Attachment

Description

Overview

Trying to parse large files all at once will often result in the dreaded LabVIEW Memory is Full error.  This example demonstrates one way that a file can be broken down into smaller subsets to avoid using up all of LabVIEW's available memory.  For more information about other ways you can reduce the amount of memory used, refer to the Developer Zone Article Managing Large Data Sets in LabVIEW.

 

Description

The attached example shows how one can break down a large file into smaller subsets for parsing.  This example specifically deals with Binary files of I16 data, but the concept can be applied to any large files.  In this example, the user has a file of IQ data written in the form I0, Q0, I1, Q1, I2, Q2, I3... etc.  Running the code will result in seperate files of data for I and Q.

ParseIQ.PNG

Steps to Implement

1. Specify the input and output paths of your files via the front panel

2. Click the run arrow in the upper left-hand corner

 

Requirements

LabVIEW 8.5

John Passiak

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

Comments
Todd S.
NI Employee (retired)
on

Thanks for posting!  Could you rename your attachment to include the LabVIEW version?  "_lvXX.vi" would be good enough.  Thanks John!

Todd S.
LabVIEW Community Manager
National Instruments
John_P1
Trusted Enthusiast
Trusted Enthusiast
on

Done and done.  The code is in LV 8.5 to allow for a conditional for loop.

John Passiak