LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why isn´t the whole datalog file read?

Hello!
 
I have a problem reading my saved datalog files. The datalog is a "master cluster" that contains a number of clusters that contains different types of data that can vary in size (strings, arrays, numerics, waveforms, ...) . I don't save more than one "master cluster" in each file, i.e. no datalog-arrays.
 
I have no problem saving files and I can see how the saved files vary in size, depending on how much data I have collected.
 
The problem is when trying to restoring the files. For some reason, only the fixed length variables (like numerics and booleans) is read. The waveforms and arrays are all void.
 
Ideas of why, anyone?
 
Greetings
 
Mårten Karlberg
Sweden
 
0 Kudos
Message 1 of 8
(3,475 Views)
...continued...
 
I figured out that I didn't read until eof. I do now but don't get the logic of the datalog type. My "master cluster" is restored as an "array of master clusters" with different data in different records. The first record contains only data in the fix length types and the following records also contain data in arrays. I don't get it!? Am I doing something wrong or have I misunderstood the purpose of datalog files? Should I save my data in another format?
 
Regards
 
Mårten Karlberg
Sweden 
0 Kudos
Message 2 of 8
(3,466 Views)

Hi Mårten,

Can you show examples of what it looks like and what it should look like?

JLV

Message 3 of 8
(3,462 Views)

This is my save and open vi's. As far as I understand, the save vi functions correctly. But the open vi reads a cluster array instead of a one intended cluster.

Thanks!

Mårten Karlberg

Download All
0 Kudos
Message 4 of 8
(3,455 Views)

Hello!

There are subVIs missing so the VIs uploaded are not executable and if the problem remains please upload these as well so we can run them.

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 5 of 8
(3,411 Views)
I have reconstructed the file I/O in this project. I guess the problem was that I had variable length arrays inside my data cluster. When I removed them things worked as planned. Am I right if I say that you can't have arrays inside the data cluster? That would be nice to get confirmed...
 
0 Kudos
Message 6 of 8
(3,409 Views)

Hello!

 

You can have arrays inside the clusters when creating datalog files. Just look at the shipping example in LabVIEW called ‘Write Datalog File Example.VI’ where they have an array in the cluster that defines the datalog file.

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 7 of 8
(3,406 Views)

You're right! It must be something else that I have changed that done the trick, because now my old file I/O-rutines works perfect. Thank you for your help!

Mårten Karlberg, Sweden

0 Kudos
Message 8 of 8
(3,402 Views)