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

Create a FB for a continuous loop

Malcolm
2014-03-13
2014-03-25
  • Malcolm

    Malcolm - 2014-03-13

    Hi,

    I have to create a FB in ST as a continuous loop but I have no idea how to realize this?

    Regards,
    Malcolm

     
  • mbruck

    mbruck - 2014-03-13

    What you mean by "Continuous loop" ?

     
  • Malcolm

    Malcolm - 2014-03-13

    Hi mbruck,

    I mean a finite loop just like a for-loop.

    Regards,
    Malcolm

     
  • Malcolm

    Malcolm - 2014-03-13

    Here's my solution. I think it could be less difficult but it works

    IMG: loop_plc.JPG

    IMG: loop_fb.JPG

     
  • shooter

    shooter - 2014-03-25

    Enable should not be an input as you are using it as an output in the program: Enable:= false
    as long as PLC_PRG runs your loop will be processed.

    please never never stay in a loop, as the watchdog will be alarmed.

     

Log in to post a comment.