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

Forcing in Simulation

2022-05-06
2022-05-06
  • old-man-dan - 2022-05-06

    Hi everyone, I'm new to CodeSys and am having problems forcing variables when in simulation mode. I'm using CodeSys 3.5 SP15 Patch 3.

    If I force a value it can just change straight back to its original value, even if the value is not set elsewhere. For example, if I create an OR block with in1, in2 as local variables and an output of out1 (also local) and run it in simulate then I can click on in1 and force it to True. Hitting F7 should do the force. The variable is shown as forced but is still false so the output from the or block does not come on. in1 is not set anywhere else so nothing should be forcing it back.

    The behaviour is different when connected to an actual instrument.

    How can I force variables in simulation to allow me to test my programme?

     
  • dFx

    dFx - 2022-05-06

    What is the result if you use variables from a GVL ?
    Is your PLC (simulation) in RUN ?

     

    Last edit: dFx 2022-05-06

Log in to post a comment.