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

rising and falling edge in ST, like < >

BIZON
2017-08-30
2017-08-31
  • BIZON - 2017-08-30

    Good day, my friend!
    Can you help me in one question.
    In ST language if you write S= or R= is function like Set and Reset Relay in LD language.

    May be for rising and falling edge in ST exist specific symbol, for example : If <Contact THEN ... "<" - like Rising edge.
    I ask you, because not comfortable create another variable, remember mean at the end of cycle, and compare in next cycle, like this: If lastContact<Contact THEN... like Rising edge.

    If you know about this some interesting information, please, answer me.

     
  • teichhei - 2017-08-30

    I don't think this is possible because one is kind of an operator and the other is a function block that needs to remember the old value in order to detect a change.

    Sent from my SM-G935F using Tapatalk

     
  • BIZON - 2017-08-30

    Ok, but how it is realizу in ladder diagram? program remember all variable old value ?

     
  • r.evbatyrov - 2017-08-31

    Hi BIZON,

    Zitat:
    Ok, but how it is realizу in ladder diagram? program remember all variable old value ?

    Yes, in LD the variable of type R_TRIG or F_TRIG (from Standard.library) is declared implicitly (automatically and invisible for user).
    ST has no such "service", you have to declare them implicitly.

    Regards,
    Roman

     

Log in to post a comment.