FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
07-10-2024 11:44 AM
Hi , see enclosed i have a condition check .
It works with the real data , but if i force the data it does not react.
This works
This does not work :
Any ideas ?
Best regards
Christoph
Solved! Go to Solution.
07-10-2024 03:08 PM
@hundch ,
This seems to be working on my side.
Here I have the forced value set to 0.0 and the breakpoint is not hit.
After forcing a value greater than 0.4, the breakpoint is hit and the logic is executed.
How are you verifying the logic is not executed?
What version of the PLC runtime application and PLC Engineering are you using?
07-10-2024 03:31 PM
Thanks for checking.
There is a operating time counter and it only counts if the real value is over 0,4 ( in this case of course).
I attached a boolaen , to see it more clearly.
07-10-2024 03:50 PM
Is it possible you are writing this value earlier in the cycle? For example...
From the CODESYS documentation,
It is possible that a forced variable temporarily gets a different value in the cycle while the code is being processed because the IEC code performs an assignment. Then the variable receives the forced value again only at the end of the cycle.
07-10-2024 04:15 PM
I tried it how you have done it and it works flawlessly.
in my case the data are from a pressure sensor. And i want to manipulate the data for simulation tasks.
Does this mean this is not possible at all or is there a workaround ?
07-10-2024 04:20 PM
If you are simulating the values, you need to disable the code where the value is written. This is difficult for hardware as it requires excluding the IO from the project.
My suggestion would be to add seperate logic and variables for simulation.