torekp Posted July 3, 2009 Report Share Posted July 3, 2009 Name: Self-Decimating Storage VIs Submitter: LAVA 1.0 Content Submitted: 03 Jul 2009 Category: Database & File IO LabVIEW Version: 8.0 Version: 1.0.1 License Type: Creative Commons Attribution 3.0 Potentially make this available on the VI Package Network?: Undecided Copyright © 2007, Huron Valley Steel Corporation All rights reserved. Author: Paul Torek --see readme file for contact information Instructions: Unzip and place the folders Calculations, DB_accessory, tests, InputOutput, and Templates into one location in your file hierarchy, for example, all in user.lib. If you already have folders with some of these names, simply copy the contents into your folders. Examine the example VIs in the "tests" folder. Description: How would you like to cram infinite data into finite file space, with rapid reads and writes? Sorry, I can't deliver that - but this may be the next best thing. These files allow the programmer to maintain a fixed-sized representative sample of data, regardless of how many data sets are accumulated. The storage may be in the form of a shift register (a.k.a. VI Global) - VIG_self_decimating.vi performs this job - or in the form of a binary file on disk - VIG_decimation_indices.vi and write_decim8_REentrant.vi do that job, with help from other VIs included as subVIs in test_decim8file_V101.vi. Note that the binary file VIs are polymorphic for storing 2D DBL arrays, 1D i32 arrays, and a few other types. It is straightforward to modify them to do other formats, or to modify the VI Global likewise. Each time the storage fills up, the decimation factor doubles, and the storage begins to fill with the data at the new lower frequency, overwriting previously stored data that had been logged at a higher frequency. Labview 8.0 Version History: 1.0.0: Initial release of the code. 1.0.1: New subVIs allow ease of reading decimated files, one record at a time. Click here to download this file Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.