4/9/2025 4:03 PM | |
Joined: 4/18/2024 Last visit: 7/2/2025 Posts: 5 Rating:
|
In Summary : TIA Portal attempts to execute an instruction even when its condition is not True. In details : TIA Portal tries to execute a disabled instruction, causing the CPU to go into a fault state. This happens when the program attempts to access an array that does not start at index [0]. When you first turn on the PLC, all values default to 0, and TIA attempts to execute the instruction (in my case, a comparison), which results in a CPU fault, even if the instruction is not called. It seems that the program tries to display the result of the comparison using the current index it contains. We can observe that the blue-dotted execution line stops at the problematic comparison and then turns into a solid grey line. I cannot reproduce the problem in SCL. (I believe this is because SCL’s live monitoring does not enter IF/ELSE conditions if they are False.) I cannot reproduce the problem when encapsulating the program within another FC. (In my opinion, this is because the program treats it as a more complex function and does not enter it.) I cannot reproduce the error with instructions that do not display the result of the operation. In other words, I can reproduce the issue with blocks like IN_RANGE, OUT_RANGE, <>, ==, etc., but not with the MOVE instruction—whether for reading or writing. Is there a way to prevent TIA Portal from executing instructions that are not explicitly called? Ideally, I would like to continue working in Ladder Logic without deeply nested functions. Can I configure TIA to execute an instruction only when its conditions are True? Or there is maybe an instruction to stop TIA from looking further in the code ? Thank you for your time and your responses ! Attachment1.pdf (244 Downloads) |
Last edited by: Adriengranville1 at: 04/09/2025 16:08:14 |
|
Follow us on