DVP - ES2/EX2/SS2/SA2/SX2/SE Operation Manual - Programming

API

Mnemonic

Operands

Function

Controllers

167

TWR

P

 

 

Time write

 

 

 

ES2/EX2 SS2 SA2 SX2

 

 

 

 

 

SE

 

 

 

 

 

 

 

 

 

 

 

 

 

Type

Bit Devices

 

Word devices

 

 

 

 

Program Steps

 

OP

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

SA2

 

 

 

 

 

 

 

ES2/EX2 SS2 SE SX2 ES2/EX2 SS2

SE

SX2 ES2/EX2 SS2 SE

SX2

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 0E1A (HEX) is recorded in D1067

3.For explanations of associated flags and the characteristics of RTCS, please refer to Points to note of TRD instruction.

Program Example 1:

When X0 = ON, write the new time into RTC.

X0

TWRP

D20

 

Normal D

Item

Range

 

 

 

 

 

 

 

D20

Year (A.D.)

00~99

 

 

 

 

 

 

D21

Day

1~7

 

(Mon.~Sun.)

 

 

 

 

 

D22

Month

1~12

Set value

 

 

 

 

D23

Day

1~31

 

 

 

 

 

 

D24

Hour

0~23

 

 

 

 

 

 

D25

Minute

0~59

 

 

 

 

 

 

D26

Second

0~59

 

 

 

 

 

Program Example 2:

Special D

D1319

D1318

D1317

D1316

D1315

D1314

D1313

Item

Year (A.D.)

Day (Mon.~Sun.)

Month

Day

Hour

Minute

Second

RTC

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

3 - 384

Page 500
Image 500
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Normal D Range, Program Example Special D