LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Additional characters added when writing a 2D array to an open file

I have attached a file that creates a 2D array and writes that data to a file. There is an extra character that is added to each entry within the file. what is the purpose of this character....is it for delimiting? Can I somehow remove it from my file or control what character is enter with the current VIs or is there another solution?

tks
0 Kudos
Message 1 of 3
(2,705 Views)
A 2D array has its columns separated by a special character.

You have to wire the Output Data to an
"Array to Apread sheet string" function,
then wire the output data of the function to the data input of "Write File"

use %s for format string.
0 Kudos
Message 2 of 3
(2,690 Views)
Hi,

Coded as it is, you are writing a binary file wtih ASCII characters in it. I supposed the extra character (02 hex) is there for delimiting the structure of the dataype you are writing. If the array you were writing was an 2D array of floats for example, you wouldn't even be able to read the file in a "human manner"--> see the LabVIEW shipped examples on binary files for more info.

If what you want to do is writing a file wich can be displayed/edited in a text editor, use the write to spreadsheet files/string functions on which you can also find examples shipped with LabVIEW

Regards,
Cyril Bouton
Active LabVIEW Developper
Message 3 of 3
(2,689 Views)