I have a function block made in Ladder which I want to use in SFC, but I can't get it work properly. I hope someone knows the solution here.
This is my devices tree:

I have the following function block:

And this is my SFC. A variable is declared with the type of the function block:
It's a very simple SFC. In step0 the SetGreen input is set in the TrafficLight instance.

The MainTask calls the SFC to run it each cycle.

Now if I start the program, the function block doesn't work. The SetGreen input is set but the SR-flipflop doesn't flip the output to high:

Does someone knows why this doesn't work? Perhaps I also need to call the function block instance somewhere each cycle?
Although you are setting the internal variable
SetGreen(which I don't recommend, it's internal for a reason, use an input), I don't see anywhere you calling the Function BlockTrafficLightthat uses taht variable. Unless you call/execute the Function Block, the code inside it won't be executed.