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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
What is the result if you use variables from a GVL ?
Is your PLC (simulation) in RUN ?
Last edit: dFx 2022-05-06