<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Setting a timer through Visualisation</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c5e36a1816/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c5e36a1816/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/c5e36a1816/</id><updated>2020-02-27T17:22:36.479000Z</updated><subtitle>Recent posts to Setting a timer through Visualisation</subtitle><entry><title>Setting a timer through Visualisation</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c5e36a1816/?limit=25#8ee9" rel="alternate"/><published>2020-02-27T17:22:36.479000Z</published><updated>2020-02-27T17:22:36.479000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comdc5ab8aa66c54bc60f9e7446146bdf6a02b77da9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Primitive Source&lt;/p&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;That is perfect! exactly what I wanted to know.&lt;/p&gt;
&lt;p&gt;Thanks for your help  &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Setting a timer through Visualisation</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c5e36a1816/?limit=25#c619" rel="alternate"/><published>2020-02-27T17:22:35.474000Z</published><updated>2020-02-27T17:22:35.474000Z</updated><author><name>Comingback4u</name><uri>https://forge.codesys.com/u/comingback4u/</uri></author><id>https://forge.codesys.com3e9f7991a629ead40e76c0bdddee33f86abea2cb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Yes it is possible. One way to do it would be to declare your TimeVariable as type real.&lt;br/&gt;
For your visualization you can use a rectangle with the following settings&lt;br/&gt;
     text = %0.3f seconds.&lt;br/&gt;
     text variable = POU.TimeVariable. //POU is the name of your POU where TimeVariable is initialized.&lt;br/&gt;
     OnMouse* (InputConfiguration) = Write a variable and setup the min/max and the input type.&lt;/p&gt;
&lt;p&gt;Then your call to the TON FB would look like:&lt;br/&gt;
     Time1(IN:=Trig1, PT:=REAL_TO_TIME(TimeVariable * 1000)); //time is in ms&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Setting a timer through Visualisation</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c5e36a1816/?limit=25#d777" rel="alternate"/><published>2020-02-27T17:22:32.633000Z</published><updated>2020-02-27T17:22:32.633000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com271c6c96e9706474fd9d40c62140a076b2e9b6ea</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Primitive Source&lt;/p&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is it possible to set a time via an input box in the visualisation? So for example&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;VAR&lt;/span&gt;
&lt;span class="nt"&gt;Time1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;TON&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;Trig1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;TimeVariable&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;???;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;span class="nt"&gt;Time1&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;IN&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;Trig1&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;PT&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;TimeVariable&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Where TimeVariable is the variable to set the time delay on the Time1: TON;. Can I edit TimeVariable via a Text Field Input configuration, WRITE TO VARIABLE? &lt;/p&gt;
&lt;p&gt;If so, what sort of variable would I need to set TimeVariable to? When editing the variable via the text box, would the format of the input have to be something like "T#2s"? &lt;/p&gt;
&lt;p&gt;Any help appreciated  &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>