LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Opening my datalog file errors out with error 42 generic error

I'm using the datalog API to store video images flattened to string (the record type is string).  This works great most of the time, and gives me easy access the whichever frame I currently want.  My files are between 15 and 125 MB.  Occassionally when I try to open a file, the Open/Create/Replace Datalog primitive returns error 42, which is a generic LabVIEW error.  The file appears to be the right size and looks as correct as I can tell in a hex editor.  I'm guessing it's some sort of parsing error, but I don't know the datalog API binary format.  I'd really like to recover these files that are throwing the errors.  Any ideas?

Robert Mortensen
CLA, CLED, LabVIEW Champion, Principal Systems Engineer, Testeract
0 Kudos
Message 1 of 9
(4,868 Views)

Greetings FlamingYawn!

 

I apologize for the trouble you're having opening some of your saved datalog files.  Unfortunately, as you have already mentioned, Error 42 is a general error and as such, provides us with little information that we can use in troubleshooting the issue.  From all the research I have done, it seems that the two most common causes of this type of problem are from a logic error in the writing section of the code or from the files being corrupted by some other means during the write (i.e., from bad sectors on a hard disk).  Unfortunately, the file type is a proprietary binary format and the structure is not publicly known.  We currently do not have any tools for use in reading these files outside of LabVIEW.  This is not necessarily to prevent the files from being read by other software but simply because it is a file type that was designed specifically for LabVIEW. The best information I can provide you with is related to the file header.  This can be found in the following KnowledgeBase article:

 

LabVIEW Data Logger: Binary Header File Format

http://digital.ni.com/public.nsf/allkb/747B83B6C8E4A6218625669100563B61 

 

If it is at all possible, please try to see if the same set of data produces the same error each time following the write/read sequence.  If this is in fact the case, I can work with you further to file a Corrective Action Request so that the developers can address the issue. 

 

I hope this helps some.

 

Best Regards,

 

Michael G

Michael G.
Applications Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Self-realization: I was thinking of the immortal words of Socrates, who said, "... I drank what?"
0 Kudos
Message 2 of 9
(4,835 Views)

Hey Michael,

 

Thanks for replying.  Unfortunately the link you provided refers to an old DAQ high speed data logging file format, not Datalog.  I'm unable to find the binary header format for Datalog anywhere.  Could you track this down? 

 

In playing around with my Datalog files, I found that some of the "corrupted" files have their first 128 bytes repeated twice.  When I replace the second, repeated set of 128 bytes with those from one of the files that works, I can read the file without getting an error.  It doesn't appear to read the whole file, however, so that portion of the binary header probably contains the number of records contained in the file.  I'll do some more testing, but could really use the binary format specification.

 

Thanks,

 

Robert

Robert Mortensen
CLA, CLED, LabVIEW Champion, Principal Systems Engineer, Testeract
0 Kudos
Message 3 of 9
(4,829 Views)

Hi again FlamingYawn!

 

You're absolutely correct.  I apologize for the erroneous link.  Please take a look at this one and let me know if this is more what you're needing: 

 

LabVIEW Datalog File Format

http://labview.ni.com/docs/internals/DatalogFileFormat/

 

Unfortunately, this is about the only new information I've been able to uncover at this point.

 

Regards,

 

Michael G

Michael G.
Applications Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Self-realization: I was thinking of the immortal words of Socrates, who said, "... I drank what?"
0 Kudos
Message 4 of 9
(4,804 Views)

I'm unable to access that link.  Can you attach the file?

 

Robert

Robert Mortensen
CLA, CLED, LabVIEW Champion, Principal Systems Engineer, Testeract
0 Kudos
Message 5 of 9
(4,802 Views)

Hi FlamingYawn,

 

My apologies once again.  I will look into getting this information put into an accessible location.  

 

Regards,

 

Michael G

Michael G.
Applications Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Self-realization: I was thinking of the immortal words of Socrates, who said, "... I drank what?"
0 Kudos
Message 6 of 9
(4,784 Views)

Hi FlamingYawn,

 

I'm still trying to see if there's a way for you to view this information online but in the meantime, could you let me know what version of LabVIEW you're using and what OS you'e on?

 

Regards, 

 

Michael G

Michael G.
Applications Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Self-realization: I was thinking of the immortal words of Socrates, who said, "... I drank what?"
0 Kudos
Message 7 of 9
(4,772 Views)

LabVIEW 2010 SP1

Windows 7 Pro

Robert Mortensen
CLA, CLED, LabVIEW Champion, Principal Systems Engineer, Testeract
0 Kudos
Message 8 of 9
(4,770 Views)

Hi FlamingYawn,

 

There isn't much documentation out there about Datalog files, but from what I have found it seems that the file type is dependent on what is being written into the datalog file, as described in this post:

 

http://objectmix.com/labview/707914-what-format-datalog-files.html#post2469388

 

Also this link may help you. 

 

https://www.ni.com/docs/en-US/bundle/labview/page/datalog-files.html

0 Kudos
Message 9 of 9
(4,760 Views)