9 Application Instructions API 150-199 API 167 Operands: S : Device for storing the new time to be written into RTC Explanations: 1. S will occupy 7 consecutive devices. 2. See the specifications of each model for their range of use. 3. Flags: M1016, M1017, M1076. See remarks of API 166 TRD for more details. 4. To make adjustment on the RTC built in SA/SX/SC/EH/EH2/SV/EH3/SV2 series MPU, use this instruction to write the correct time into the RTC. 5. When this instruction is executed, the new set time will be written in the RTC built in PLC immediately. Therefore, please be noted that the new set time has to match the current time then when the instruction is executed. 6.
If S exceeds its range, the program will regard it as an operation error and the instruction will not be executed. 7. If you wish to write in new time in the 4-digit year display mode, you can only write in a 2-digit year (0 ~ 99, M1067 and M1068 will be On and D1067 will record the error code 0E1A (hex). indicating year 2000 ~ 2099). For example, 00=year 2000, 50=year 2050 and 99=year 2099. However, 2000 ~ 2099 can be written in SX V3.0 and above When X0= On, write the correct current time into the RTC. Program Example 1: DVP-PLC Application Manual 9-74 Mnemonic Operands Function TWR P Time Write Type OP Bit Devices Word Devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F TWR, TWRP:
3 steps S * * * PULSE 16-bit 32-bit EH3 SV2 ES EX SS EH3 ES EX SS SA SX SC EH SV EH3 SV2 ES EX SS SA SX SC EH SV SA SX SC EH SV SV2 X TWRP General D Item Content New set time D20 Year (A.D.) 00~99 D21 Day (Mon ~ Sun) 1~7 D22 Month 1~12 D23 Date 1~31 D24 Hour 0~23 D25 Minute 0~59 D26 Second 0~59 Special D Item D1319 Year (A.D.) Real Time Clock D1318 Day (Mon ~ Sun) D1317 Month D1316 Date D1315 Hour D1314 Minute D1313 Second