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?