<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Timer Accuracy vs. Blink Accuracy</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/a28630c335/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/a28630c335/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/a28630c335/</id><updated>2020-02-27T20:16:34.533000Z</updated><subtitle>Recent posts to Timer Accuracy vs. Blink Accuracy</subtitle><entry><title>Timer Accuracy vs. Blink Accuracy</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/a28630c335/?limit=25#fc37" rel="alternate"/><published>2020-02-27T20:16:34.533000Z</published><updated>2020-02-27T20:16:34.533000Z</updated><author><name>jzhvymetal</name><uri>https://forge.codesys.com/u/jzhvymetal/</uri></author><id>https://forge.codesys.com131e455cf42142db51ba71fa633322e95a9a42d6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This can be easily realized with the following implement FB.  Since this was posted in V2.3 I will only post a screenshot from V3.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: RTO.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1252"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Timer Accuracy vs. Blink Accuracy</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/a28630c335/?limit=25#86d6" rel="alternate"/><published>2020-02-27T20:16:33.211000Z</published><updated>2020-02-27T20:16:33.211000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com626d3906707141b058cdc65019e789a9743cfb45</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;yes for example ontime.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Timer Accuracy vs. Blink Accuracy</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/a28630c335/?limit=25#ed56" rel="alternate"/><published>2020-02-27T20:16:29.443000Z</published><updated>2020-02-27T20:16:29.443000Z</updated><author><name>cleeton</name><uri>https://forge.codesys.com/u/cleeton/</uri></author><id>https://forge.codesys.com792e5b1d672df57c626bad7dda6759b1bc4783d4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Did you have a specific oscat function I should look into, I flipped through the documentation for the Basic Library and didn't see what I'm looking for.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Timer Accuracy vs. Blink Accuracy</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/a28630c335/?limit=25#f567" rel="alternate"/><published>2020-02-27T20:16:28.013000Z</published><updated>2020-02-27T20:16:28.013000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com8a5ae297ab2fe258d0d406a61fb48c828de36497</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;yes it is for long in oscat lib. so you can use that one.&lt;br/&gt;
There are several possibilities here, you can use a timer that is always active (sort of global timer)&lt;br/&gt;
In most cases timers are always active, only in SFC they are stopped, and you can not see the situation correct.&lt;br/&gt;
As the AB is also mentioning secondcounters etc. &lt;br/&gt;
If you want a stoppable timer look into oscat. However be aware these blocks depend on scantime.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Timer Accuracy vs. Blink Accuracy</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/a28630c335/?limit=25#95b1" rel="alternate"/><published>2020-02-27T20:16:24.249000Z</published><updated>2020-02-27T20:16:24.249000Z</updated><author><name>cleeton</name><uri>https://forge.codesys.com/u/cleeton/</uri></author><id>https://forge.codesys.com910cc754a19cf3632740a5ad8bc6e9271318fd5e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Did you eventually build a good RTO Function Block?  I'm new to codesys and the Allen-Bradley RTO instruction is one I can see I'll miss.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Timer Accuracy vs. Blink Accuracy</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/a28630c335/?limit=25#efa2" rel="alternate"/><published>2020-02-27T20:16:22.910000Z</published><updated>2020-02-27T20:16:22.910000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com1cffea7a3923ea8f83dd12dbd19b486a08cc8a09</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Yes nice traffic light (missing the visualisation but it works great.)&lt;/p&gt;
&lt;p&gt;Make the times as a variable.&lt;br/&gt;
So greentime1 will be 10 sec.&lt;br/&gt;
yellowtime2 will be 2 sec.&lt;br/&gt;
on the timer2 use time1+time2&lt;br/&gt;
and so on&lt;br/&gt;
now you will be sure the unit stays in sync and you can change the times without stopping the program.&lt;br/&gt;
you can add a turn signal now without problems, just add a timer for it.&lt;/p&gt;
&lt;p&gt;out of sync is a problem you have to explain the students as this is not basic.&lt;br/&gt;
make this same traffic in SFC, all transitions set to true and timed blocks.&lt;br/&gt;
The modern programmer works a lot in graphic.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Timer Accuracy vs. Blink Accuracy</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/a28630c335/?limit=25#976c" rel="alternate"/><published>2020-02-27T20:16:21.573000Z</published><updated>2020-02-27T20:16:21.573000Z</updated><author><name>karlparr</name><uri>https://forge.codesys.com/u/karlparr/</uri></author><id>https://forge.codesys.com3a29a7b0927b73d60e9966f21dc19b85dbe2647f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Attached is more-or-less what I would have as a "basic" traffic light lab (with a visualization).&lt;/p&gt;
&lt;p&gt;I would also use a sequencer for this, but usually not in the introductory class.&lt;/p&gt;
&lt;p&gt;From the basic lab, I would have the students add a turn signal with various requirements on it.&lt;/p&gt;
&lt;p&gt;The traffic light is able to stay in synch probably since there is only a single master reset.&lt;/p&gt;
&lt;p&gt;It was only where I tried making an RTO with a timer-counter or used multiple timer-timer cascades that they started getting out of synch.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=439" rel="nofollow"&gt;TRAFFICLIGHT.zip &lt;span&gt;&lt;span&gt;[2.7 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Timer Accuracy vs. Blink Accuracy</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/a28630c335/?limit=25#0605" rel="alternate"/><published>2020-02-27T20:16:17.809000Z</published><updated>2020-02-27T20:16:17.809000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com6d2a35f6b5ebd2ae86f5dcf4678c6453f7c1ab61</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;sorry could not see them.&lt;/p&gt;
&lt;p&gt;I still have problems with your view of the counter/timer.&lt;br/&gt;
As you can see the times will not be in sync.&lt;br/&gt;
So i can imagine a student with his traffic light will say that he has two fases of green at same time.&lt;br/&gt;
and you do not control this fact.&lt;br/&gt;
a simple traffic light works with a sequence like a SFC, however in LD it is also possible to make it.&lt;br/&gt;
Then use a step/ or a counter.&lt;br/&gt;
then if counter is 2 do subroutine 2&lt;br/&gt;
etc.&lt;br/&gt;
In the subroutine you can change the PT of a timer.&lt;/p&gt;
&lt;p&gt;We have an experiment running with a downtimer in the yellow light of the signal. It counts back from 3 to 1 to able the cars to shift gear.&lt;br/&gt;
looks like it is the yellow in germany, but gives more info.&lt;br/&gt;
the bikers have a analog signal with round dial of leds going down. the speed is dependent of the greentime of the cars. Initially it is the max greentime from whole cycle, but when max is not used the biketime is actual divided by max.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Timer Accuracy vs. Blink Accuracy</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/a28630c335/?limit=25#7d77" rel="alternate"/><published>2020-02-27T20:16:16.475000Z</published><updated>2020-02-27T20:16:16.475000Z</updated><author><name>karlparr</name><uri>https://forge.codesys.com/u/karlparr/</uri></author><id>https://forge.codesys.comcb7c0da13aa8bb87ecc0c75b6791646fa1d05466</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Although it is very difficult to see in that scan, those are NC contacts tied to TON2.Q in the TON program, so it does work.  &lt;/p&gt;
&lt;p&gt;The purpose of the binary counter program is for the outputs to count in binary from 0000 to 1111, which it does.  This program is to cover the basics of timers and to show that it is possible to have multiple timed applications working at the same time. I use this lab as an introduction to a traffic light, which can be viewed as multiple flashed outputs working at the same time.&lt;/p&gt;
&lt;p&gt;In an introductory class, I typically do not cover shift registers or word operations.  If that is necessary in CoDeSys, then I'll have to revise the class accordingly.&lt;/p&gt;
&lt;p&gt;Thanks for the input.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Timer Accuracy vs. Blink Accuracy</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/a28630c335/?limit=25#458c" rel="alternate"/><published>2020-02-27T20:16:12.735000Z</published><updated>2020-02-27T20:16:12.735000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com702de9cd37a1be6d7a0b9f6bfd5f622fe1a9b705</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;your ton program will never start as the input gets never high.&lt;/p&gt;
&lt;p&gt;learn to use triggers.&lt;/p&gt;
&lt;p&gt;and yes we discussed above about times.&lt;/p&gt;
&lt;p&gt;your 4 bit counter is just a display, it does not count, it is just a blinker.&lt;br/&gt;
find a shift counter in a book, and make it correct.&lt;br/&gt;
use a blink and evry time you see a rising edge add one to a word var&lt;br/&gt;
take the bits apart&lt;br/&gt;
like wordvar AND bit0(is value one)&lt;br/&gt;
wordvar AND bit1(value two)&lt;br/&gt;
wordvar AND bit2 (value four)&lt;br/&gt;
etc&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>