Forcing variables in online mode

bitwit
2006-06-22
2006-07-10
  • bitwit - 2006-06-22

    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. 2.3.6.1.

    Thanks

    Mike Metzer

     
  • Ralph Holz - 2006-06-26

    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:

    1. read inputs

    2. execute force list

    3. execute the IEC-Program

    4. execute force list

    5. write outputs

    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]

     
  • bitwit - 2006-07-10

    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.)?

    Thanks

     

Log in to post a comment.