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
Typically in ladder logic you would want to have one place where a global is activated/deactivated to avoid any logic complications. But since in SFC you can only have 1 step active at a time (excluding the IEC actions that are SET and continuously running) would it be OK programming practice to reuse these globals in different steps as long as you know they won't conflict with the same variable in the steps above?
Hopefully I made this question clear.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Originally created by: mr_sargent
Typically in ladder logic you would want to have one place where a global is activated/deactivated to avoid any logic complications. But since in SFC you can only have 1 step active at a time (excluding the IEC actions that are SET and continuously running) would it be OK programming practice to reuse these globals in different steps as long as you know they won't conflict with the same variable in the steps above?
Hopefully I made this question clear.
why reuse globals, why not use locals?
it is bad practice as the references will go crazy.