<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Writing a REAL_TO_STRING adds datas from other register...</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/918d1ec571/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/918d1ec571/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/918d1ec571/</id><updated>2020-02-27T23:29:04.450000Z</updated><subtitle>Recent posts to Writing a REAL_TO_STRING adds datas from other register...</subtitle><entry><title>Writing a REAL_TO_STRING adds datas from other register...</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/918d1ec571/?limit=25#fab2" rel="alternate"/><published>2020-02-27T23:29:04.450000Z</published><updated>2020-02-27T23:29:04.450000Z</updated><author><name>bmattlet</name><uri>https://forge.codesys.com/u/bmattlet/</uri></author><id>https://forge.codesys.com1d1f4df7ec7678ac16881646c9ee0a2c37f35167</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a weird situation and I can't find how to fix this :&lt;/p&gt;
&lt;p&gt;I'm writing a program that writes datas measured into a .csv file&lt;/p&gt;
&lt;p&gt;The file is organized like this format : &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;br/&gt;
time_of_measure ; data1 ; data2 ; ... ; dataN&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Where :&lt;br/&gt;
-  I get the time of measure by the function 'SysRtcGetTime' and time is in the format 'DT#2011-08-18-15:47:48'&lt;br/&gt;
- All my maesures are REAL.&lt;/p&gt;
&lt;p&gt;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.&lt;br/&gt;
So I used DT_TO_STRING and REAL_TO_STRING to change the types to STRING.&lt;/p&gt;
&lt;p&gt;The time of the measure works perfect &lt;strong&gt;BUT&lt;/strong&gt; ! All my datas look like this :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;br/&gt;
28.249518-15:47:48     (my data is 28.2495°C)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;I'm getting crazy because I can't find a way to have my data and ONLY my data.&lt;br/&gt;
I can't just write STRING(7) because the next data might come from another sensor and have 10 decimals...&lt;/p&gt;
&lt;p&gt;Please if you have any idea...&lt;/p&gt;
&lt;p&gt;Thank You.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>