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 ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 ;)
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!