<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Interval from timer elapsed time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8ef775b44d/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8ef775b44d/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/8ef775b44d/</id><updated>2022-10-17T14:36:54.272000Z</updated><subtitle>Recent posts to Interval from timer elapsed time</subtitle><entry><title>Interval from timer elapsed time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8ef775b44d/?limit=50#573a" rel="alternate"/><published>2022-10-17T14:36:54.272000Z</published><updated>2022-10-17T14:36:54.272000Z</updated><author><name>tvm</name><uri>https://forge.codesys.com/u/tvm/</uri></author><id>https://forge.codesys.comaa1e7fcf9ca8c3fcc0e00dfb6a1099d4bc8c6521</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Try this:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;IF (timer.ET &amp;gt;= T#4S) AND (timer.ET &amp;lt;= T#7S) THEN&lt;/span&gt;
&lt;span class="err"&gt;    X:= TRUE;&lt;/span&gt;
&lt;span class="err"&gt;END_IF&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Interval from timer elapsed time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8ef775b44d/?limit=25#89cc" rel="alternate"/><published>2022-10-17T13:37:28.693000Z</published><updated>2022-10-17T13:37:28.693000Z</updated><author><name>aarondw10</name><uri>https://forge.codesys.com/u/aarondw10/</uri></author><id>https://forge.codesys.com2e174ae2cbc7951497a312627c1c56636d6d0ae3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;for a project I want to make a certain boolean X true, but only if the elapsed time of a TOF is between 2 specific values. (TOF goes up to 20 seconds).&lt;br/&gt;
For example: &lt;/p&gt;
&lt;p&gt;IF T#4S &amp;lt;= timer.ET &amp;lt;= T#7S THEN&lt;br/&gt;
    X := TRUE;    &lt;br/&gt;
END_IF&lt;/p&gt;
&lt;p&gt;Now I keep getting the error that he can't do that. He can only compare the value of timer.ET to 1 specific time but not if the ET is between an interval of 2 times. Is their a different way to do it that doesn't make the code much larger?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>