bmattlet - 2011-08-18

Hi,

I have a weird situation and I can't find how to fix this :

I'm writing a program that writes datas measured into a .csv file

The file is organized like this format :

Zitat:
time_of_measure ; data1 ; data2 ; ... ; dataN

Where :
- I get the time of measure by the function 'SysRtcGetTime' and time is in the format 'DT#2011-08-18-15:47:48'
- All my maesures are REAL.

First I tried to write the time and values of the measures without changing their types and I got a file with weird symbols such "@'$" , "@Z", etc.
So I used DT_TO_STRING and REAL_TO_STRING to change the types to STRING.

The time of the measure works perfect BUT ! All my datas look like this :

Zitat:
28.249518-15:47:48 (my data is 28.2495Β°C)

So there is a problem with some kind of register interferring with the function REAL_TO_STRING because we can see that my program adds the end of the time value to my data.

I'm getting crazy because I can't find a way to have my data and ONLY my data.
I can't just write STRING(7) because the next data might come from another sensor and have 10 decimals...

Please if you have any idea...

Thank You.