LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

0D/0A pair written into data file when it shouldn't be

Hello,

 

I have a data file problem. My customers data is written as a 398 byte row in a .csv file. It's OK that the row ends with a CR/LF. But the data is actually modified by the string to array or the write to spreadsheet function. In the example below you can see the data being written and the data as read back by HxD (a hex editor/reader). They are not equal anymore.

 

When an 0D is encountered in the data an 0D/0A pair is written, when an 0A is encountered an 0D/0A is written.

 

Any suggestions would be much appreciated.

 

Thanks in advance.

 

Barry

barry


0 Kudos
Message 1 of 4
(2,514 Views)

It should be converting because the Write to Spreadsheet is using the Write to Text File with Convert EOL set to true.

 

I would suggest using something other than this function for your data.

0 Kudos
Message 2 of 4
(2,506 Views)

I have had to switch to the Write To Binary File with an Open/Create File and Set File Position (end) ahead of it. This does work and is readable in a HxD window. Hopefully it will be just as useful when the data is analyzed in MatLab or some other program.

 

It does however add a header to the data which is not needed but acceptable by the customer. I find it a bit useful as I can ctrl-F through the data using the header info. In my case the header is constant.

 

Thanks.

 

 

barry


0 Kudos
Message 3 of 4
(2,487 Views)

And of course the header can be disabled by wiring a false to the appropriate input.

0 Kudos
Message 4 of 4
(2,485 Views)