09-22-2009 10:12 AM
Hello!!
I am trying to store a waveform in a binary file. I am using a "write to binary file" labview example as a guide. My waveform is a simulated waveform from the labview express menu "simulated waveform". Well, if I put a graph indicator, I can to see the waveform. But when I plot a binary file, the waveform look very bad. Please, see the attachment. I am using the Nyquist theorem, which say that the sampling rate must to be 4 times the frecuency.
Please, if anybody knows about, post it.
Thanks
Solved! Go to Solution.
09-22-2009 10:26 AM
09-22-2009 10:36 AM
09-22-2009 02:21 PM
You're exporting in little-endian binary format (which is fine, it's MATLAB's native format in Windows) but reading as big-endian (the 'b' modifier in the fopen command string). Delete the 'b' or change it to 'l' (lower case letter L).
Also, when I tried recreating your VI I found that there appears to be a header of 8 bytes even if prepend array size is set to false. If you can't get rid of it, read in a dummy variable of 8 bytes (or 4 doubles) and read the next sequence of data.