LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquired data is wrong amplitude


Jud~ wrote:

*I'm still a newbie when it comes to labview; must strive to be as great as you guys..*  Smiley Very Happy


One thing you should learn is to keep the code as simple as possible. For example reading an entire binary file, all with the same datatype, is basically an atomic operation and can be done much simpler. If you wire a path instead of a refnum, the "read binary file" will automatically open the file in the right mode and close it afterwards (if nothing is wired to the refnum out). Also anything that you want to leave at the function default (e.g. big endian) does not need to be wired. You only need to specify inputs that you want different from the defaults. Also, by default, automatic error handling is enabled, so you get the error dialog whenever an error occurs and an error output is not wired.

 

Selecting a size of -1 will read all data in the file. Here is a side-by-side comparison. Even the file dialog is not really needed except for the desire to specify a file pattern.

 

Why use 8 functions if 2 (or even 1) can do the same? 😄

 

 

Message Edited by altenbach on 09-11-2008 12:24 PM
Message 11 of 11
(295 Views)