What is the format of Datalog files?

This is a discussion on What is the format of Datalog files? within the labview forums in Programming Languages category; Oh frack, I thought this was closed. If you use the Open/Create/Replace Datalog function, you will always get the same header. The rest of the data can be anything and is defined in the program that does the writing. In the example, the data is a cluster that consists of a string and a 1D array of SGL. It could just as easily be just a 1D SGL array, a 1D DBL array, a cluster with several strings, or an infinite amount of other options. IT IS HOWEVER THE PROGRAMMER DECIDES WHAT DATA SHOULD BE STORED AND IN WHAT FORMAT. The ...

Go Back   Application Development Forum > Programming Languages > labview

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #11  
Old 07-09-2008, 10:40 AM
Dennis Knutson
Guest
 
Default Re: What is the format of Datalog files?

Oh frack, I thought this was closed.
If you use the Open/Create/Replace Datalog function, you will always get the same header. The rest of the data can be anything and is defined in the program that does the writing. In the example, the data is a cluster that consists of a string and a 1D array of SGL. It could just as easily be just a 1D SGL array, a 1D DBL array, a cluster with several strings, or an infinite amount of other options. IT IS HOWEVER THE PROGRAMMER DECIDES WHAT DATA SHOULD BE STORED AND IN WHAT FORMAT. The record type you wire to the Open/Create/Replace Datalog file can be anything and this is where the format of the file is defined. You can find out how NI stores a SGL/DBL/I32,I16,array, cluster, but there is no generic definition of a datalog FILE. There never was and never will be. Please stop asking and looking for one. The way to find the definition of a binary file format is to look at the program that created it. Each program that creates a binary file can, and probably is, different in the way it defines the data that is being stored. It is the programmer's choice!
Also note that if the original programmer had decided to use the Write Binary and not the Write Datalog, the header would be completely different and the header format would be whatever the PROGRAMMER decided it should be.
I also keep saying that doing a read is simple if you have access to the write program. Look again at the read example. It simply uses the same record type from the write and everything after that is automatic. By using that defined data type, the Read Datalog function knows how to interpret the stored binary data.
Can we move on now? You are spending too much time on this and approaching it form the wrong end. If you had simply provided the code that was used to create the files and an example data file, the read VI could have been created in less time than I used to compose this response.
Reply With Quote
  #12  
Old 07-09-2008, 11:40 AM
wpd
Guest
 
Default Re: What is the format of Datalog files?

Hi Dennis, Thanks again for taking the time to reply.  I think that it is possible that you misunderstood (or I forgot to describe) my original intent for asking about the format of the datalog file.I want to read a datalog file with code that I write outside of LabView.I can (and will have to) write my code so that it is aware of the format of the data generated by the LabView application.  In the case of the Write Datalog File Example, my code is aware that the LabView application wrote bundles of data consisting of a date/timestamp string followed by an array of SGLs.You claim "If you use the Open/Create/Replace Datalog function, you will always get the same header."  Where can I find the documentation that backs that statement up?  I know that the header will change if I wired in a different record type, (even to the extent of changing the label attached to the "empty array" constant in the example -- that the header will change slightly).  That's ok.  I can live with that.You also said, "You can find out how NI stores a SGL/DBL/I32,I16,array, cluster ..." that is probably exactly what I'm looking for.  Can you tell me where that is documented?I'm kinda stuck here.  I don't believe that I've been able to articulate my question very well.  I keep asking one question, and you keep answering a slightly different question.  I am aware that the layout of a datalog file will change as a function of the type of data that are written to it.  There are some specifications somewhere that govern how that layout changes.  All I'm asking is, "where can I find those specifications?"  I am not asking "what is the format of the datalog file generated by this or that particular application", I am asking "what is the recipe that describes the format as a function of the types of data written?"As an example, the "Read Datalog Example" is aware of that recipe.  It knows that, to read a datalog with a record type of "a bundle consisting of an empty string followed by an empty array labeled 'empty array'", it must seek 582 bytes into the file to start reading it.Please don't answer with "THE PROGRAMMER DECIDES THE FORMAT".  If you feel that that is the answer, then, once again, I have failed to explain the nature of my question and, once again, that answer won't satisfy me.Having said that, I truly apprecate the time and effort you expended to try to help me.Thanks again.--wpd
Reply With Quote
  #13  
Old 07-09-2008, 12:40 PM
Dennis Knutson
Guest
 
Default Re: What is the format of Datalog files?

For just information on particular data types and not information on 'datalogs' look at the Data>Storage topic in the on-line help. On the header information created by the specific Open/Create/Replace Datalog, I don't know if or where this exists. I know the datalogs created from the front panel have changed from version to version and I don't think the use of the 'Datalog' functions are nearly as widespread as the ordinary Open/Create/Replace function that can create a binary file with or without a header and if a header is created, is entirely up to the programmer. In fact, I would recomend that the ordinary file read/write functions be used because even if you get a definition of the 'datalog' header, it is liable to change with a new release of LabVIEW.
And I guess I did not understand that you were not going to use LabVIEW to read these files. I think that is where the biggest misunderstanding was.Message Edited by Dennis Knutson on 07-09-2008 10:13 AM
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:21 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.