From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

file format i8

Solved!
Go to solution

I am not a Labview user so my apologies if this isn't in the correct location.

 

I am trying to read some data which ,I believe, have been generated by a NI (assume labview) application which runs a set of four Picoscopes in parallel each at a 4M samples/second sample rate.

The only information that I have on the files is that which I have deduced by examining the binary form.

The file type is 'i8' and it appears to be a 32byte header followed by a stream of bytes representing the sampled waveform. I can reconstruct the shape of the waveform from the byte stream ( 8 bit integers).

 However, I cannot decipher the initial 32 byes to get any (sensible) scaling data. I have examined them as 8 bit bytes, 16 and 32 bit words,characters, single and double precision floating point numbers. I have also tried byte-wide offsets (1 byte, 2 bytes... etc.) into the data to see if there are any block entries or delimiters: all with no sucess.

Does anyone who has experience with similar files have any suggestions. Internet searches for 'i8' files have only identified them as  microsoft DVI derivatives; clearly these aren't the correct association for my data.

 

0 Kudos
Message 1 of 6
(4,893 Views)

Do you have any source code for the creater of the file?  Without that, there is not much anybody can do.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(4,885 Views)

Hi Moly,

 

the default behaviour of LabVIEW's WriteBinaryFile function is to include the array length as I32 value in front of the array values.

I guess the first 4 bytes in your file contain the array length (=number of bytes/I8 values in your file or chunk of file)…

 

When you want to "know" instead of "guess" you have to have a look at the source of the program creating your files!

 

Edit:

However, I cannot decipher the initial 32 byes to get any (sensible) scaling data.

Well, you talk about 32 bytes (instead of bits), so my guess is not correct. You might check if you have a 28 byte header followed by 4 bytes of array length and your array of I8 values.

The header is defined by the routine creating the file: so have a look at the source of that routine!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(4,875 Views)

If the original data was a LabVIEW waveform that header would include a 128 bit timestamp, a 64 bit double precision time interval value and apparently some other data, maybe including an int32 number of i8 samples.

 

The timestamp would be in fact separated into two 64 bit integer values, one of them contains the number of seconds since midnight January 1, 1904 GMT and the other is the fractional seconds although I think only the most significant 32 bits of that part are really used.

 

The interval would be a 64 bit double indicating the time interval between two samples in seconds.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 6
(4,841 Views)
Solution
Accepted by topic author JohnMoly

I don't have access to the source code otherwise I could probably figure out what the header was from that. The data I'm examining was recorded a while ago by someone else who knows nothing about the raw formats: he just used the pictures in the GUI for his analysis..I don't even have the original Labview creation files only the runtime environment.

What I do have is the instrument that created the file and, although it's not going to be straightforward, my strategy would be to set up the instrument in a known configuration then record a short burst of synthesised data. Then I would change the configuration ( gain, samplerate etc.) one item at a time and then record the same short burst. I will then look at the binary in the header and see if I can see what has changed. I have already surmised that that none of the numbers (in 8,16,32 or 64 bit formats) in the existing headers contain a byte count of the data as none match up to the file length ( minus the 32 bytes for the header). 

I was hoping that someone had run across this filetype before to save the long process of  setting up the measurement rig and tweaking test recordings.

In any case thanks for your ( collective) help. If anyone has a better strategy to decipher the file I would be grateful if you would share it. 

0 Kudos
Message 5 of 6
(4,807 Views)

That is a good strategy.  I wish you luck with it.

 

Once you learn something about it, be sure to come back into this message thread and post what you learned.  It could help someone else in the future.

0 Kudos
Message 6 of 6
(4,756 Views)