E L C P r o g r a m m i n g M a n u a l
F o r
m o r e
i n f o r m a t i o n v i s i t :
w w w. e a t o n . c o m
M N 0 5 0 0 3 0 0 3 E
3 - 4 1 4
API Mnemonic
Operands
Function
167
TWR P
D
Calendar Data Write In
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K
H KnX
KnY
KnM KnS T
C
D
E
F
D
*
*
*
TWR, TWRP: 5 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32
16
P
32
16
P
32
16
P
32
16
P
32 16
P
Operands:
D
: Starting address for new RTC data (occupies 7 continuous words)
Description:
1.
This instruction writes the values in
D
into the RTC registers.
2.
If any of the RTC data in
D
is out of the allowable range, it will result in an “operation error”.
The instruction will not execute and M1067=ON, M1068=ON, and error code 0E1A (HEX) will
be in D1067.
3.
To make adjustments to the RTC in the ELC-PC/PA/PH/PV or the ELCM-PH/PA series, use
this instruction to write correct data into the RTC registers (D1313-D1319).
4.
Flags: M1016, M1017, M1076. Refer to the TRD instruction for information on these flags.
Program Example 1:
When X0= ON, write the new time/date into the RTC
.
X0
TWRP
D20
General D
device
Meaning
Content
Special D
device
Meaning
D20 Year
(A.D.) 00~99
→
D1319 Year
(A.D.)
D21
Day
(Mon.~Sun.)
1~7
→
D1318 Day
(Mon.~Sun.)
D22 Month
1~12
→
D1317 Month
D23 Date
1~31
→
D1316 Date
D24 Hour
0~23
→
D1315 Hour
D25 Minute
0~59
→
D1314 Minute
New s
e
tting time
D26 Second
0~59
→
D1313 Second
Cale
nda
r Clo
ck
Program Example 2:
Adjust the clock/calendar information to 2004/12/15, Tuesday, 15:27:30.
The contents of D0~D6 is the RTC data.
When X0= ON, move the new RTC data to D0-D6 and execute the TWR instruction to write the new
RTC data to D1313-D1319.
When X1=ON, the calendar clock will perform the ±30 seconds correction. “Correction” means that if
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...