Does anyone know if there is documentation which outlines the "rules" governing the forcing of variables in online mode? I have noticed that forcing some variables within a POU are not always passed along throughout the POU/project. The Codesys manual does not list any rules or exceptions to forcing of variables but it is apparent to me that there are. Has anyone else noticed this? I am using Codesys ver. 188.8.131.52.
Forcing rules are quite simple. If you force some variables a force-list is created and this list is executed twice in every PLC - cicle. First time after reading inputs and the second time after the IEC-Program are executet just bevore outputs are written.
The PLC Cycle is:
execute force list
execute the IEC-Program
See also attached diagram.
So you can cange the variables in your PLC Program as often as you assign a value to them
CoDeSys Training (1).pdf [51.72 KiB]
Thank you for the reply. Can that type of operation really be considered a global force? When debugging a program, if I want a variable forced to a given state, I want it to remain in that state and not be affected during the code execution. Is this how a force executes in other platforms (rslogix, step 7, etc.)?
Log in to post a comment.