PLC programming is based on the hardware system. Different hardware systems have different processing behaviors. If the programming is not rigorous, it will cause deviations in the results. Therefore, programming must be standardized. The advantage of standardization is that these deviations can be avoided. At the same time, the standardization of programming is also standardized. a part of.
I encountered a problem a long time ago. The user called the PID block in OB1. After debugging, the effect was good. Later, after replacing the new CPU, it was found that the PID block did not work normally. Instead, the new CPU had a problem. The case of standard programming. The PID function block needs to be called in a certain cyclic interrupt, and the interrupt period of the cyclic interrupt is assigned in the parameter CYCLE, so that the correct time of integration and differentiation can be calculated. The priority of OB1 is low, it is easy to be interrupted, and the scan time is uncertain. The PID parameters are the result of the test, not the correct process parameters, and because the new CPU is nearly 10 times faster than the old CPU, the PID block cannot work correctly.
There are also some functions related to communication, such as transplanting the program of S7-300 to S7-1500, it runs well in S7-300, and suddenly found that the value of the variable cannot be rewritten on the HMI after transplantation