Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Day event

alverman
2017-04-16
2017-04-18
  • alverman - 2017-04-16

    Hi at all,
    if I wanted to do one operation every day at the same time as I could make in LD?

    Many thanks, Alberto

     
  • eschwellinger

    eschwellinger - 2017-04-17

    Hi,
    there is already an example here: l viewtopic.php?f=23&t=6247#p12396 l
    a little more details, one option would be
    you could use timer2 from Oscat building library.
    Install these two OSCAT libs Basic and Building in CODESYS (->shopping cart and then install by clicking in the embedded browser in CODESYS - download - sure you need to login to the store)
    Then use attached Project example (not LD but CFC should be reasonable or at least you could easily translate this to LD)

    BR
    Edwin

    IMG: Oscat_timer2.jpg

    IMG: OscatLibs2.jpg

    TimerExample2.project [149.51 KiB]

     
  • alverman - 2017-04-17

    Thanks for the info, but I do not know how to insert the timer 2 graphic in my ladder.
    how can I do ?

     
  • alverman - 2017-04-17

    I managed to implement the code in my project by copying and pasting what I needed.
    Now I do not know how to connect the Q output of timer 2 to a contact of my ladder.
    Can you tell me how can I do?

    Thank you, Alberto

     
  • eschwellinger

    eschwellinger - 2017-04-17

    Hi,

    BR
    Edwin

    IMG: Ladder.jpg

     
  • alverman - 2017-04-17

    many many thanks !!

     
  • alverman - 2017-04-17

    it is normal that when you start the application on the active plc, timer2 the Q output even if the time is not the trigger?

    alberto

     
  • eschwellinger

    eschwellinger - 2017-04-18

    Hi alberto,
    guess yes, think this is 'as designed' - once a day you get this day event.. on first even if the time is already over
    -> once a day - Q -> True.
    Sure on the following days the time and Q does fit.
    BR
    Edwin

     

Log in to post a comment.