<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to %d representation with decimal part</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/984e4ac107/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/984e4ac107/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/984e4ac107/</id><updated>2020-02-27T19:14:49.459000Z</updated><subtitle>Recent posts to %d representation with decimal part</subtitle><entry><title>%d representation with decimal part</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/984e4ac107/?limit=25#72d1" rel="alternate"/><published>2020-02-27T19:14:49.459000Z</published><updated>2020-02-27T19:14:49.459000Z</updated><author><name>fleaplc</name><uri>https://forge.codesys.com/u/fleaplc/</uri></author><id>https://forge.codesys.comac864d9779e20e553dd53651dcd2d7d3fca6fb7a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;JAPIB hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
To do that you can, in the settings of a rectangle (by example) write :&lt;br/&gt;
Category Text -&amp;gt; Content: %2.1f //display format for a REAL, with 2 digits before point and 1 digit after&lt;br/&gt;
Category variable -&amp;gt; Textdisplay : INT_TO_REAL(MyVar)/10 //conversion of the INT into REAL, then division by 10&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;great it works! I 100% miss I can use conversion function into HMI, good to know.&lt;br/&gt;
Thanks&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>%d representation with decimal part</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/984e4ac107/?limit=25#4174" rel="alternate"/><published>2020-02-27T19:14:45.911000Z</published><updated>2020-02-27T19:14:45.911000Z</updated><author><name>JAPIB</name><uri>https://forge.codesys.com/u/japib/</uri></author><id>https://forge.codesys.com2e59e2cc51d5cdc5171b0cf683a3ebd6c924e1e6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;If I understand you idea, you want to : &lt;br/&gt;
dispay 10.0 if MyVar=100&lt;br/&gt;
display 10.2 if Myvar=102&lt;br/&gt;
and so on ...&lt;/p&gt;
&lt;p&gt;To do that you can, in the  settings of a rectangle (by example) write :&lt;br/&gt;
Category Text -&amp;gt; Content: %2.1f  //display format for a REAL, with 2 digits before point and 1 digit after&lt;br/&gt;
Category variable -&amp;gt; Textdisplay : INT_TO_REAL(MyVar)/10 //conversion of the INT into REAL, then division by 10&lt;/p&gt;
&lt;p&gt;Another solution could be :&lt;br/&gt;
Category Text -&amp;gt; Contente: %2.1f  //display format for a REAL, with 2 digits before point and 1 digit after&lt;br/&gt;
Category variable -&amp;gt; Textdisplay : INT_TO_REAL(MyVar) //conversion of the INT into REAL&lt;br/&gt;
Conversion factor : 0.1 //Division by 10&lt;/p&gt;
&lt;p&gt;It works ... but you can't change the value of MyVar directly by this rectangle. You can't have a text imput with a such equation. &lt;br/&gt;
If you want to change the value of MyVar, you have to add another rectangle close the display (I put it in the background under the first, letting it go a little beyond, so I can click on it).&lt;br/&gt;
In this second rectangle you can display MyVar with %d and configure a text input.&lt;/p&gt;
&lt;p&gt;It's just an idea. Maybe there is a smarter solution ?&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>%d representation with decimal part</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/984e4ac107/?limit=25#310c" rel="alternate"/><published>2020-02-27T19:14:44.691000Z</published><updated>2020-02-27T19:14:44.691000Z</updated><author><name>fleaplc</name><uri>https://forge.codesys.com/u/fleaplc/</uri></author><id>https://forge.codesys.com51135a720a9fe99d9b21009573e1df577fc9d536</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I need to visualize into Codesys 2.3 HMI an INT value like this:&lt;br/&gt;
myVAR:INT;&lt;br/&gt;
100 = 10.0 sec&lt;/p&gt;
&lt;p&gt;is there some way to get 10.0 visualization using INT? I found this&lt;/p&gt;
&lt;p&gt;,&lt;/p&gt;
&lt;p&gt;but if it's ok on reading, when I write it miss 0.1 : ex I write 10 , then I should expect 100 into INT var but I get 99!&lt;/p&gt;
&lt;p&gt;Any help is appreciated&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Codesys_2019" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4365"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>