DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming Operand: S : Set value for RTC (occupies 7 consecutive devices) Explanations: 1. TWR instruction updates the RTC with the value set in S . 2. If the time data in S exceeds the valid calendar range, it will result in an “operation error”. PLC will writes in the smallest valid value automatically, M1067 = ON, M1068 = ON, and error code 3. For explanations of associated flags and the characteristics of RTCS, please refer to Points to 0E1A (HEX) is recorded in D1067 note of TRD instruction. Program Example 1: When X0 = ON, write the new time into RTC. X0 TWRP D20 Program Example 2: 1.
Set the current time in RTC as 2004/12/15, Tuesday, 15:27:30. 2. The content of D0~D6 is the set value for adjusting RTC. 3. When X0 = ON, update the time of RTC with the set value. 4. When X1 = ON, perform ±30 seconds correction. Correction takes place when M1017 goes from OFF to ON (Second data in 0 ~ 29: reset to 0. Second data in 30 ~ 59: minute data pluses 1, second data resets). 3-420 API Mnemonic Operands Function Controllers 167 TWR P Time write ES2/EX2 SS2 SA2 SX2 SE Typ e OP Bit Devices Word devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F TWR, TWRP:
5 steps S * * * PULSE 16-bit 32-bit SA2 SA2 SE ES2/EX2 SS2 SA2 SE SX2 ES2/EX2 SS2 SX2 ES2/EX2 SS2 SX2 SE Normal D Item Range Set value D20 Year (A.D.) 00~99 D21 Day (Mon.~Sun.) 1~7 D22 Month 1~12 D23 Day 1~31 D24 Hour 0~23 D25 Minute 0~59 D26 Second 0~59 Special D Item D1319 Year (A.D.) RTC D1318 Day (Mon.~Sun.) D1317 Month D1316 Day D1315 Hour D1314 Minute D1313 Second