<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to PLC input time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/09a1282525/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/09a1282525/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/09a1282525/</id><updated>2020-02-27T13:53:28.170000Z</updated><subtitle>Recent posts to PLC input time</subtitle><entry><title>PLC input time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/09a1282525/?limit=25#9fe2" rel="alternate"/><published>2020-02-27T13:53:28.170000Z</published><updated>2020-02-27T13:53:28.170000Z</updated><author><name>alwoso</name><uri>https://forge.codesys.com/u/alwoso/</uri></author><id>https://forge.codesys.com6b0c685a21e44034d885561c820a741f28267768</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Dontjen!&lt;/p&gt;
&lt;p&gt;It's always good to find your own solution that fits for the machine. And if you are new to PLC programming, don't hesitate - each problem has a chance in it   &lt;/p&gt;
&lt;p&gt;The OSCAT-library can be found here:&lt;br/&gt;
&lt;a class="" href="http://www.oscat.de/dlmanager.html" rel="nofollow"&gt;http://www.oscat.de/dlmanager.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are several libraries available, just check the "Basic". There is a pdf manual for all functions, so you should find the necessary information. Maybe the FF_x blocks are helpful, or the LATCH_es.&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;
&lt;p&gt;Alfred&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PLC input time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/09a1282525/?limit=25#525a" rel="alternate"/><published>2020-02-27T13:53:27.980000Z</published><updated>2020-02-27T13:53:27.980000Z</updated><author><name>Dontjen</name><uri>https://forge.codesys.com/u/dontjen/</uri></author><id>https://forge.codesys.com43e49595b5401a690eae5baaf5fcb3614caecdee</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;alwoso hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Hi Dontjen!&lt;br/&gt;
Basically, a problem should be solved where it begins - hardware, software, material.....&lt;br/&gt;
Without knowing your application or hardware components, it's difficult to give the right answer. Ask yourself some questions to find out, which solution might be possible:&lt;br/&gt;
- How long is the part you want to detect in front of your sensor? Is it moving or standing still? Is the surface proper for this type of sensor?&lt;br/&gt;
- If it's only a short time, or if the part is moving: Is the input frequency of your sensor and the input-module high enough to catch the signal?&lt;br/&gt;
- If the plugs and connectors are the problem: Can they be fixed (e.g. to the machine body) or screwed together?&lt;br/&gt;
If you want to use some kind of timer in the software, you have to take into account, that this always means a delay in catching the signal. Your machine cycle might be extended!&lt;br/&gt;
The simple solution would be a "TON"-Timer, where the input signal triggers the timer and only if the signal is stable for the preset time, the timer-output will go high. But each flicker in the input signal will start the timer again - so your machine must stop and wait until you have a stable signal!&lt;br/&gt;
There are other solutions like filters - you look onto the signal for a number of cycles and if there are more than x HIGH-signals, you take this as a high on the input... and so on. That depends mainly on your programming experience and CPU-functionalities. You can find some functions in the OSCAT-library.&lt;br/&gt;
Good luck!&lt;br/&gt;
Alfred&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for the answer, delaying the input signal is not a real problem, the sensor is just there too see if there are parts present (multiple tiny parts in a container).&lt;br/&gt;
I'll check the hardware again next time (although i could not reproduce the error by wiggling wires etc etc, maybe the plc is so fast that it doesn't show...).&lt;br/&gt;
The oscat library is unknown too me, I'm new to plc programming.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PLC input time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/09a1282525/?limit=25#f52a" rel="alternate"/><published>2020-02-27T13:53:27.411000Z</published><updated>2020-02-27T13:53:27.411000Z</updated><author><name>alwoso</name><uri>https://forge.codesys.com/u/alwoso/</uri></author><id>https://forge.codesys.comda769e21e3e6c613513e8062ad83005161ccb762</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Dontjen!&lt;/p&gt;
&lt;p&gt;Basically, a problem should be solved where it begins - hardware, software, material.....&lt;/p&gt;
&lt;p&gt;Without knowing your application or hardware components, it's difficult to give the right answer. Ask yourself some questions to find out, which solution might be possible:&lt;br/&gt;
- How long is the part you want to detect in front of your sensor? Is it moving or standing still? Is the surface proper for this type of sensor?&lt;br/&gt;
- If it's only a short time, or if the part is moving: Is the input frequency of your sensor and the input-module high enough to catch the signal?&lt;br/&gt;
- If the plugs and connectors are the problem: Can they be fixed (e.g. to the machine body) or screwed together?&lt;/p&gt;
&lt;p&gt;If you want to use some kind of timer in the software, you have to take into account, that this always means a delay in catching the signal. Your machine cycle might be extended!&lt;br/&gt;
The simple solution would be a "TON"-Timer, where the input signal triggers the timer and only if the signal is stable for the preset time, the timer-output will go high. But each flicker in the input signal will start the timer again - so your machine must stop and wait until you have a stable signal!&lt;br/&gt;
There are other solutions like filters - you look onto the signal for a number of cycles and if there are more than x HIGH-signals, you take this as a high on the input... and so on. That depends mainly on your programming experience and CPU-functionalities. You can find some functions in the OSCAT-library.&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;
&lt;p&gt;Alfred&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PLC input time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/09a1282525/?limit=25#07d4" rel="alternate"/><published>2020-02-27T13:53:27.222000Z</published><updated>2020-02-27T13:53:27.222000Z</updated><author><name>Dontjen</name><uri>https://forge.codesys.com/u/dontjen/</uri></author><id>https://forge.codesys.comc4a014ff53efb17510e913deb507f052cb9eb71a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;My PLC has digital inputs connected to capacitive sensors. In my program I'm checking to see if it's detecting or not, &lt;br/&gt;
when it detects an object =&amp;gt; everything is ok, continue etc. &lt;br/&gt;
When there is no detection it shows an error message on the HMI to the user and stops the machine.&lt;/p&gt;
&lt;p&gt;Everything works like this but sometimes it shows the error when there is a object present. &lt;br/&gt;
I already changed the sensor to see if that was the problem. &lt;br/&gt;
I suspect it is from the vibration of the machine, the sensor is connected to the PLC over multiple connectors so if the &lt;br/&gt;
connector doen't fit good(age)/bad contact/old connector/.. or so =&amp;gt; error&lt;/p&gt;
&lt;p&gt;Is there a proper way to prevent this? Small timer on the input?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>