LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Did the unflatten from string vi change from V6 to V8?

Thanks for everyone's input!

 

 Below is the cluster I'm using for my Type. Next to it is the load file code. This was inherited from the LV 6.1 code.

 The read file VI is a hybrid called Read File+ (string).vi, but at the heart of it is Read From Binary File.vi.

 

  

Waveform Load Type.pngWaveform Load.png

0 Kudos
Message 11 of 21
(922 Views)

There is still the possibility that the file is written with Convert EOF set to true so check that.  Simply set it to true for the read if you do not have the old code which wrote the data.

 

A second possibility is that the first four bytes are actually the length of the string, you can try skipping the first four bytes and see if you can unflatten the data.

 

You could post one of the strings and we could test it as well.

Message 12 of 21
(903 Views)

Darin.K

 

I've attached three files:

 

1. GaN-4.iqts -- this is the LV 6.1 file containing a string that represents three bundled elements.

 

           - Acquired Waveform (2D array of singles)

           - Waveform Data (2D array of doubles)

           - Rate Window Spectrum (waveform graph, 2D double)

 

           Below is a diagram showing the bundle.

         

Waveform Load Type.png

 

2. GaN-4.iqts.jpg -- this is a screen shot of what the waveform data looks like when loaded into the LV 6.1 app.

                               Note: Waveform Data is displayed in the Averaged Waveform graph.

 

 GaN-4.iqtsw.JPG

 

 

3. GaN-4.iqts.txt -- this is exported waveform data from the LV 6.1 app.

                              The three elements follow the header infomation and are labled:

                             

                             - Acquired Waveform (2D array of singles)

                             - Averaged Waveform, same as Waveform Data (2D array of doubles)

                             - Rate Window Spectrum (waveform graph, 2D double)

 

 

Your help resolving this would be greatly appreciated!

 

Download All
0 Kudos
Message 13 of 21
(852 Views)

Hopefully words work and I do not have to post a picture.  The Rate Window Spectrum is actually a cluster of three elements called the Waveform Data Type: t0 (double) dt (double) and Y (1-d array of double).  No problems for me reading the data you posted in LV12 using that data type.

0 Kudos
Message 14 of 21
(834 Views)
So you were able to reconstitute the graphs from the string?
0 Kudos
Message 15 of 21
(826 Views)
Yes. The two arrays were easy, when you have stared at as much binary data as I have you recognize things like the double representation of 1 pretty quickly so I figured out the WDT cluster I described for the waveform.
0 Kudos
Message 16 of 21
(822 Views)

@jabdo56 wrote:
So you were able to reconstitute the graphs from the string?

This question is actually almost ironic, although you probably didn't mean it to be. That and the remark of Darin that he hopes he won't need pictures for you to understand.

 

It's all nice and good to post pictures of code and MB sized data files, but without the actual VI code you leave a lot of detective work to whomever is inclined to try to help you.

Rolf Kalbermatter
My Blog
0 Kudos
Message 17 of 21
(801 Views)

@rolfk wrote:

 

It's all nice and good to post pictures of code and MB sized data files, but without the actual VI code you leave a lot of detective work to whomever is inclined to try to help you.


Holy crap, the detective work was the easiest part....

 

So I figured out the old timestamp instead of DBL in the waveform thing easy as pie.  Kids come running in so left arm goes into blocking position.  With one hand I type out a quick post, attach my very simple VI and try to submit:  Error, attached file does not match type or some such nonsense.....

 

No problem, I'll post a snippet, it is very simple code.  With one hand: Select All, Create Snippet.  Now there is only one piece of information the snippet needs to convey, the contents of a cluster.  We know what happenned now:  The snippet image contains a blank cluster....

 

Net result, I hope that words worked for the OP, and luckily for all of us my kids were in the room so I kept the four letter ones in my head...

0 Kudos
Message 18 of 21
(780 Views)

I've attached the code and two example files.

0 Kudos
Message 19 of 21
(754 Views)

Darin.K and rolfk:

 

I've posted code and test files to exhibit the problem. I would greatly appreciate you showing me what you did to make it possible to unflatten the older data file.

 

Thanks,

~jim

0 Kudos
Message 20 of 21
(689 Views)