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

Need help with calling FB in SFC!

sntr37
2022-11-12
2022-11-18
  • sntr37 - 2022-11-12

    Hi, we are currently learning different PLC programming languages in school and we got a task to do which is: We have to design a conveyor system with some sensors, lamps etc. Each functionality of the system should be written in ST (sensors, movement and so on, I did it), but the main program should be written in SFC - and here is my question - how do I call the created FB in SFC? eg.: I have the function block called "movement" which is reponsible for pushing our product down the belt by some ammount of pixels every clock impulse, it has input variables named "CLK" and "START" how do I connect the clock impulses to "CLK" and a start button to "START" using SFC?
    I'm fresh in PLC programming, please excuse my unproffesional vocabulary ;)

     
  • ignat - 2022-11-18

    oh maaan, just google it 'sfc codesys'. There are plenty videos on youtube.

    In few words you just add empty block (a 'rectangle' box element in sfc menu) and put there the name of you FB (autocomplete should help you). Then it asks to create an instance of this block, you have to add it in the SFC block interface definition (like you create FB in ST - it is a template, and instance of it - a "real" object, or copy of your template).

    Then you connect IO with other variables

    Have fun!

     
    πŸ‘
    1

Log in to post a comment.