To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI exemplifies how to write and read from a .lvm file.
Description
This VI allows the user to write and read from a .lvm file. It is possible to use a custom file name and the code verifies if the generated path is valid or not. This could be useful to easily write and read a file that could stop measurement data with additional information that describes it.
You could find more information about the .lvm file format in the following document:
Specification for the LabVIEW Measurement File (.lvm)
Requirements
LabVIEW Base Development System.
Steps to Implement or Execute Code
1. Open the attached VI " Write - Read lvm Files LV 2012 - NI verified.vi".
2. Run the VI.
3. Select a valid file name.
3.1 In case the file name is incorrect to select a valid one.
4. Click the “Save button” to save the File.
5. You can also process the read it data by pressing the “Process Data” button.
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**
Description-Separate-2Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
This code is 10 times (!) more complicated that it needs to be and contains many mistakes.
Here is a quick comparison of parts of your code with suggested alternatives.
(see also this discussion) My suggestions are just rough drafts. You might need to tweak a little bit for correct functionality.
(1) To zero all odd elements, you could do one of the following alternatives instead of your code monster (top):
(how many times do you possibly need to read from a different local variable of the same array! They all contain the same data! Don't be afraid to branch a wire)
(2) To get the minimum of each row of a 2D array and write it to a file, you could do it your way (above) or the easy way (below):