Delaying a task by some time

musman

Member
Join Date
Nov 2014
Location
Munich
Posts
20
Hello, I am written a POU controlled by task that runs every 30 seconds. What I want is that task should be delayed by 15 sec before its first start. i.e. POU will be called at 0.15,0.45,1.15,1.45,2.15,2.45....

How can I do it?
 
Use a 10 second timer to start a 5 second timer. When the 5 second timer is done begin your sequence.
Or maybe use 1/2 of the 30 second timer to begin the sequence. That should be less programming if you are using C#.
 
Last edited:
Depending on you platform, there should be system functions that will allow you to disable and enable a task. In your init code, disable the task, and have a separate bit of code that enables it after 15 seconds.

Depending on your platform, that may not work. The task might be assigned it's time slot at boot with no way to move it. In that case, you'll have to run it on a 15second cycle and use a flag to jump to the end every other cycle.
 
use task configuration and put a task on #t15s, under this task your POU.
put in the pou a flipflop to prevent it running all the time.
if unit has RTC also possible to check on time.
 

Similar Topics

I'm trying to take an input signal (boolean, not analog), delay it for a configurable amount of time, then output it via an AOI using as little...
Replies
2
Views
2,397
Hello there, newbie here. Fresh to PLC's, starting with some ladder logic, about to buy your books 📚 And as all newbies starting with a...
Replies
34
Views
11,711
Does anyone know if there is a way to delay a ML1500 from going into run mode throu programming. Thomas
Replies
8
Views
2,124
We are to develop a first application in Codesys. It will contain motion (Softmotion) with drives on Ethercat (CSP mode). Off course there will be...
Replies
2
Views
906
Hi guys.. I am using Vijeo Citect 7.4.. I am doing a function inside a function.. What I want to do is I want to put a function to sleep but want...
Replies
7
Views
1,435
Back
Top Bottom