LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ask how to open some files

I would like to ask all the experts, I want to use LabVIEW to open these types of files ".atr .dat .hea .xws", It's ECG waveform record files and then connect them to the Waveform graph for viewing.

0 Kudos
Message 1 of 25
(710 Views)

A file is just a long string of bytes and in order to recover the information, you need to know the data structures. Do you have a document to describe all that?

Are they formatted text or binary? (e.g. if you open them in notepad, is it all text or not).

0 Kudos
Message 2 of 25
(684 Views)

Thank you for your reply. These four pictures are the results after I opened them with Notepad. Please help me take a look.
How do I open it using LabVIEW?
Thank you.

Snipaste_2024-08-18_02-11-56.jpg

Snipaste_2024-08-18_02-12-42.jpg

Snipaste_2024-08-18_02-13-03.jpg

Snipaste_2024-08-18_02-13-23.jpg

0 Kudos
Message 3 of 25
(666 Views)

the first two look binary, but the last two can just be read as plain text into a string indicator.

"Opening" any of them is trivial. Interpreting the contents of the first two requires knowledge about the file structure. What kind of data do you expect?

 

(Attaching pictures instead of the actual files is not very useful.)

0 Kudos
Message 4 of 25
(662 Views)

Thank you for your reply. This file is the patient's ECG waveform file. I want to display the waveform.
Thank you.

0 Kudos
Message 5 of 25
(629 Views)

You just need to do your research or even contact the company that makes the instrument.

 

Binary data requires extensive knowledge about the data structures (header size, datatype, byte order, and how the waveform is represented (direct, incremental, etc.).

 

Looks like you have sample files from here. It seems there is a MATLAB library that can read these files, maybe you can reverse engineer that code. Good luck!

0 Kudos
Message 6 of 25
(623 Views)

A "file" is just a string of bytes that encode data according to some format.  You can open any file as a "binary file" and read that collection of bytes.  The trick comes in understanding how the data being stored in the file (as a series of bytes) has been "encoded".  In the days of the Teletype, "messages" were encoded in an 8-bit format called ASCII, where "A" was 0x81 and "0" (zero) was 0x60.  Now, most data are saved as numbers, possibly 4-byte integers, possibly 8-byte floating point, possibly with extra bytes saying "This is a 2-D array with this many rows and columns".  Without knowing the format of the data, interpreting the string of bytes is very challenging.  Note that looking at a binary file with a "Hex" editor that can represent the string of bytes in various formats makes it easy to find data saved as text (if written in a language that uses a Western alphabet -- you will be able to read it as something other than gibberish.

 

Why don't you attach a file you want to read, and also as much information as you have about what you think is the format of the file.  We can take a peek at it ...

 

Bob Schor

0 Kudos
Message 7 of 25
(611 Views)

A quick inspection of the 100.dat file gives reasonable results if interpreted as 24bit little endian signed integer. No guarantees....

(we reverse 3 adjacent bytes for little endian, pad on the right to 4 bytes, cast to I32, and do an arithmetic shift to undo the padding).

 

YMMV!

 

altenbach_0-1724002760292.png

 

Message 8 of 25
(605 Views)

@Bob Schor, Thanks for your reply, I will add more knowledge in this area. The file I'm using cannot be uploaded here. Thank you.

0 Kudos
Message 9 of 25
(556 Views)

@altenbach, Thank you for your reply. You are awesome. I am just researching how to open this related file. Thank you very much.

0 Kudos
Message 10 of 25
(555 Views)