09-05-2017 10:34 PM
Hi,
I'm using 'Write to Text File Function' to log data.
Currently I'm receiving data from serial port (186bytes in 1 packet, about 20Hz.) , directly logging it to binary text file.
When I replay my log data, data error (checksum error) is constantly occurring.
But there is no data error in receiving data. I've checked it when I receive it.
So I saw hexa data, some bytes are written differently from received data.
Is it possible to occur data error while using 'Write to Text File Function'?
How can I solve it?
thanks,
09-06-2017 12:55 AM - edited 09-06-2017 12:56 AM
Hi Ujangsan,
I'm using 'Write to Text File Function' to log data. … directly logging it to binary text file.
What kind of data do you want to save?
Why do you use a TEXT file function to save BINARY data, when there is a "Write to Binary File" function?
So I saw hexa data, some bytes are written differently from received data.
Yes, that is because YOU have the file function configured this way.
Please read the help for WriteToTextFile to understand why and how this is happening!
09-06-2017 04:20 AM
If you are logging binary data, then you need to use Write To Binary File. What is likely happening is the "Convert End Of Line" is changing your data from 0x0A to 0x0D0A. You can turn that off by right-clicking on the Write To Text File.