The easiest way is to use OB100 that determine the restart behavior of a PID Loop.
We reached to the points that we needed. But, other safety precautions should be implemented to shutdown all actuators to operate right after a power outage. In such a case, an operator intervention (ACK) is required to ensure safety before system start up.
https://support.industry.siemens.com/...
Our Premium Courses:
https://hdhosseini.com/courses/