S7-200 PLC sets real-time clock command: TODW (Set Real-time Clock)
When the enable input EN is active, the instruction loads the contents of the 8-byte buffer (start address is T) containing the time and date into the clock. The set value range is the same as the TODR command. Corresponding ladder diagram
The addressing range of T: VB, IB, QB, MB, SMB, SB, LB, *VD, *AC, *LD.
Instruction format: TODW T
Enable error condition for stream output ENO disconnect: 0006 (indirect addressing); 0007 (TOD data error); 000C (no clock present); SM4.3 (run time).
The S7-200 PLC does not perform checks and verifies that the date is accurate. Invalid dates (such as February 30) can be accepted, so you must ensure the accuracy of the input data.
Do not use the TODR/TODW instruction in both the main program and the interrupt program. Otherwise a fatal error will result.