This library below now consist of two IEC Developer FBs: for EU and USA.
Many thanks to 'Sergei Troizky' for the pair common ideas which helped me to optimize the algorithm.
They are suitable for any actual FX-series from FX1S to FX3U(G).
To correct working at initial settings of RTC is necessary always to write in PLC the exact time, which is independent of date (always as for winter).
Click to view attachment