task configuration

keobe
2014-02-14
2014-02-20
  • keobe - 2014-02-14

    Hi
    I ve a project with multiple POUs, I set all the tasks to be of cyclic , priority 0 and 200ms.
    However ,some of my tasks take more than 300 ms to complete because I put it to SFC and some delays (for IO to take effect) .
    When I run the project, it seems some tasks are not executed.
    How do I ensure that all tasks has equal chance to fire and complete.
    The tasks completion time varies from 100 ms to 500ms.
    Thanks for your help

     
  • shooter - 2014-02-20

    delays are bad programming, 500 ms is way too long for execution time, sort out where the problem is.
    to make sure everything is done make only one task and put all pou in it.

    SFC is not consuming more time then others, even shorter as only the active steps are executed.

    use a PLC_PRG on freewheeling, and some tasks that need a good timing in another task.
    but please most of them better in a main PLC_PRG with having subroutines to POU, this way makes the flow of the program predictable.
    and yes you may give your program and we will have alook at it.

     

Log in to post a comment.