MrX - 2018-04-02

I'm doing a simple exercise for learning purpose about SFC and ST on CodeSys, in which there is a dip switch object in the visualisation.
The dip switch change the boolean value of a variable called sig1.

The application is running in a step that execute this code when it's active:
sig1 := TRUE;
(I'm aware that it's better to put this code in the entry action of the step, but it is only a basic test that I'm doing)

and the exit transaction is:
"NOT sig1"

If I change sig1 from TRUE to FALSE by the dip switch, it doesn't assert the exit transaction because the code "sig1 := TRUE;" will change another time the sig1 variable.

I think that this is due to the fact that the dip switch will always be slower than the assigment in the step action, but It could be that a changement via the visualization is not made immediately but only before the next iteration of the step action.

Could someone explain to me this behaviour?
In particular, if a variable's value changement made by a visualisation object is done immediately or not.

Thank you.