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