When the last instruction in the program is not commented out with "//", the system cannot transition into running mode after downloading, and the SF light remains on. This issue typically occurs due to a programming error that prevents the execution of the final line of code.
Upon encountering this error, the diagnostic buffer in the CPU module provides the following information:
- Event 8 / 15: Event ID 16#2523
- An area length error occurred while writing
- Global DB, double word access, address: 65532
- OB number: 1
- Module Address: 30
- Required OB: Programming Error OB (OB121)
- OB not found, disabled, or unable to start in current working mode
- Internal error, incoming event
- 08:55:02.726 2011-11-23
The root cause of the error is that MW50 was not initialized to 0, leading to a subtraction result of 16#FFFF. The sequence of instructions causing this is as follows:
LMW50
L1
-I
This results in an invalid indirect addressing instruction "TDBD[AR1, P#0.0]". The address generated by this instruction exceeds the defined size of DB1, which is only 200 bytes. This causes a memory access violation and triggers the error.
It's important to note that the last instruction must be temporarily commented out using "//" to allow the program to run and enable proper debugging. This helps identify the problematic section of code and resolve the error effectively.
If you're encountering similar issues in your PLC program, make sure all variables are properly initialized before use, and always test your code step-by-step to catch errors early in the development process.
Melt Pressure Sensor,Differential Pressure Sensor,High Temperature Melt Pressure Sensor,Explosion-Proof Melt Pressure Sensor
Xiaogan Yueneng Electronic Technology Co., Ltd. , https://www.xgsensor.com