06-24-2025 04:52 AM
Dear All,
I am new to Labview.
I have .bin files saved as "YYYY_MM_DD_HH_MM_SS_CRIO (1).bin". By using Python, I managed to extract the data into spreadsheets. On the other hand, I am totally in the dark, since I don't have a clue on column headers or the extracted data.
Seeing the "CRIO" in the file name, I give it a try with LabView.
On this basis, is there a way of importing the .bin files into LabView? Any examples, or tricks that you can suggest?
Thanks in advance for your help.
Best,
MV
06-24-2025 05:21 AM - edited 06-24-2025 05:23 AM
.bin stands for binary file. It means it is binary data stored in a file. And the organization of that binary data is whatever the writer uses. It could be all booleans, integers, floating point values or arrays thereof and a combination of all of these with an arbitrary number of channels per row.
Absolutely nothing about .bin is standardized. Only the application that created that file (and the programmer thereof) can give you any clue as to how the data is encoded (apparently you guesstimated that in Python already) and how that data is organized, how many columns there are and what meaning each column has.
LabVIEW file IO functions can easily read binary data or string data, depending how you set them up. But they don't magicaly can guesstimate the meaning of binary data just as you could not do it in Python. If you know the format of the binary data it is principally just as easy (or complicated) to do as in Python.
06-24-2025 07:23 AM
It's been a very long time since I worked with 9-track "mag tape" on CDC and DEC computers, where experimental data was written to tape in "some unknown format". Generally, the person who wanted to get the data from the tapes "knew" (more-or-less) the type of data that was on the tape, and something about how it was structured, but as Rolf explained, there were "no rules", and one had to look at the data and make "guesses" (often guided by listings of Fortran or other code used to create the tape, or a similar tape).
The first thing to do is to look at one or more files with a flexible "viewer", such as a "text editor" that lets you specify the way it interprets the bytes. Are there sections that you can "read" (because they look like text amidst a sea of random 8-bit characters)? Do you see "patterns" in the 8-bit patterns? Do you know if the data in the file are supposed to be integer or floating point numbers? Are there arrays of data, which can often be recognized by having a 4-byte "header" (representing the 1-D Array size followed by "patterned" data in "packets" of various sizes (depending on whether it's an array of Boolean (1 bit), integer (1, 2, or 4-byte "chunks" of data), or floats (8 or 16 byte "chunks", often hard to see patterns in)?
Do you have any documentation that would help you to better "guess" what is on the tape?
Bob Schor
06-24-2025 09:26 AM
@mustafavardaroglu wrote:
I have .bin files saved as "YYYY_MM_DD_HH_MM_SS_CRIO (1).bin". By using Python, I managed to extract the data into spreadsheets. On the other hand, I am totally in the dark, since I don't have a clue on column headers or the extracted data.
If you can "extract the data" using python, you must know something about the data structure. Python is not a file importer, but a general purpose programming language. If you can do it in Python, you can do it in LabVIEW.
Once you show us your python program (who wrote it?) and also attach your .bin file, we can take a stab at it.