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

Flip Flop T. Probably sourcecode issue in codesys

2022-01-09
2022-01-11
  • fabriziobarbato - 2022-01-09

    In image two equivalent scheme of Flip Flop Toggle

    In the upper image:
    Sending pulse on "in1" i can't obtain set of "u1" if i prepare "u1=1" sending pulse return it to 0

    In the lower image:
    Sending pulse on "in1" i can't obtain reset of "u1" if i prepare "u1=0" sending pulse return it to 1

    I hope i'm wronging.

     

    Last edit: fabriziobarbato 2022-01-09
  • gatto

    gatto - 2022-01-11

    Hi Fabrizio,
    looking just a bit of your code, I think the set of u1 is done from w1 but on the branch below reset is done, so the result is zero.
    if you place a contact false on the branch below, you see the set of u1.
    I leave you an example of flip flop in ladder, hope this can help you.
    Ciao.

     

    Last edit: gatto 2022-01-11
  • gatto

    gatto - 2022-01-11

    An other ladder example of FF using xor.
    Programming in ST create a FF is very easy 😊
    Ti saluto ancora, ciao

     

Log in to post a comment.