LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

binary saving

Hi!

I want to save data binary (SGL). The data is a (transposed) 2-dim array. Saved as 'data.bin' for example.
The problem is you can't see the data in a vice way, as with "ascii-savings" in
a texteditor like notepad.

When you are going to read this binary file, how works the reading? How do you know
the data is read correctly through the two columns of data?

See my attached file.

Thanks Fredda
0 Kudos
Message 1 of 5
(3,189 Views)
It depends on what you want to do.
If you want to save the data in a format to view it as ASCII using Notepad, then you should save the data as ASCII.
If you want to save it in binary format (hexadecimal), you can view the data using a hexadecimal viewer / editor, such as HexEdit.
Message 2 of 5
(3,169 Views)
Hi Fred. It sounds like you're worried about how LV will know how to read the file. Well, you shouldn't be. If you saved the file in LV, it should also know how to read it.

___________________
Try to take over the world!
Message 3 of 5
(3,164 Views)
Hello fred,

if you save your data in SGL format, then there is no information in the file regarding the format of your data.
You have to program a loading routine that get's your data out of that file. In your case you "Read from SGL file",
but you have to know the number of rows/columns to get the same array back.
Bottom line: if you save your data in a "raw" format it is useful (or neccessary) to include some information about
the data in your file. For instance you could include the row/column number in your file. It's maybe interesting to
read some text on file formats. I would suggest a format similar to IFF (http://www.borg.com/~jglatt/tech/aboutiff.htm)...

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(3,149 Views)
Hi,

I will leave the reading of the binary data file to other programs/applications.
I only save data in LV.

What should i think of when letting other programs reading my binary data?

/Fredda
0 Kudos
Message 5 of 5
(3,129 Views)