LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read byte file (waveform)

Hello,

I am trying to write waveform data to a binary file. This seems to work, but then I tried checking my work with the Read Binary example. This gave me a strange and incorrect waveform. I looked at other posts and tried changing the parameters in both the read and the write VI, but nothing worked. Then I tried the write waveform to binary.vi example, which wrote a binary file with the waveform information of a generated sine signal. When I used the Read example, it again did not give the proper result.

I have attached a screenshot of the frontpanels of both examples. Anyone have an idea what may be wrong? When the screen shot was taken, both VI's were in their completely stock form, I did not mess with them at all.

Thank you,

Alek
0 Kudos
Message 1 of 4
(2,880 Views)
The examples for Read and Write Binary Files are based on reading arrays of Doubles.  You are writing a waveform.  Have you modified the Read Binary File example so that it uses a waveform datatype rather than a double datatype?  There is an input in the top of the Read Binary File vi that determines how to interpret the bytes in the file.
0 Kudos
Message 2 of 4
(2,861 Views)
The screen shots I attached are from the examples before I messed with them - both the Write and Read vi's are set up to work with double datatype. I did try to change the data type in the read example so that it works in my application, but then realized it does not work even with the provided example.

So the problem is the same, in the stock or modified form I can not seem to get the proper waveform out of the file.
Also, how would I set up the read vi to take in waveform data? I looked in the documentation and could not find anything on the data type input, in terms of what values are valid inputs.

Thank you very much, and happy 4th of July 🙂

Later,

Alek

0 Kudos
Message 3 of 4
(2,842 Views)

I can run the examples with no problems. What version of LabVIEW are you using? What OS?

p.s. Your Read Binary File shows that it has been modified. Are you sure you undid everything after you tried to modify it?



Message Edited by Dennis Knutson on 07-04-2008 03:19 PM

Message Edited by Dennis Knutson on 07-04-2008 03:21 PM
0 Kudos
Message 4 of 4
(2,834 Views)