Chapter 2 Syntax
2-33
rtcset on, rtcset off
Instruction to start / stop the update of clock data
- Format
Format
Description
rtcset on
<variable>
The clock data is substituted for six bytes that make
<variable>
a head. Moreover, the clock data is
regularly updated.
rtcset off
<variable>
The clock data is substituted for six bytes that make
<variable>
a head. Moreover, the update of the
clock data is stopped.
- Explanation
This instruction is a function in the WJ200 Series.
The clock data of six bytes sent from WOP is stored in six bytes that make
<variable>
a head. Clock data is 1 byte for each in
"year", "month", "date", "day of the week", "hour" and "minute".
In the rtcset on instruction, the clock data is regularly updated after the clock data is substituted.
In the rtcset off instruction, the update of the clock data by rtcset on instruction is stopped after the clock data is substituted.
The data stored in “rtcset on / off U (00)” are as follows.
Example) Monday, April 19, 2010 11:15
U (00) = 1004h = 4100
(The last 2 digits at the year: 00h to 99h / Month: 01h to 12h)
U (01) = 1901h = 6401
(Date: 01h to 31h / Day of the week: Sun.(00h) to Sat.(06h))
U (02) = 1115h = 4373
(Hour: 00h to 23h / Minute: 00h to 59h)
Moreover, it is as follows when a variable is set to UL (00).
UL (00) = 10041901h = 268704001
㧔
The last 2 digits at the year / Month / Date / Day of the week
㧕
UL (01) = 11150000h = 286588928
㧔
hour / Minute / 0000h
㧕
Note :
It is necessary to connect WOP with the inverter to acquire the clock data. When WOP is not connected, all
clock data is set to 0.
- Sample program :
Program to make the inverter operate the motor for forward rotation for 1 hour
(Code area [Code Window])
Label
Mnemonic
parameter1
parameter2
parameter3
parameter4
parameter5
㩷 㩷
㩷
entry
㩷
㩷
㩷
㩷
㩷
㩷
㩷
rtcset off U(02)
㩷
㩷
: Clock data is stored in U (02) to U (04).
㩷
U(04)= U(04)
+
U(00)
㩷
㩷
: Add to the present time for 1 hour.
㩷
ifs U(04)
>=
U(01)
㩷
㩷
: When it will be data more than in 24:00,
it pulls for 24 hours.
㩷
then
㩷
㩷
㩷
㩷
㩷
㩷
㩷
U(04)= U(04)
-
U(01)
㩷
㩷
㩷
end if
㩷
㩷
㩷
㩷
㩷
㩷
rtcset on U(05)
㩷
㩷
㩷
: Clock data is stored in U (05) to U (07).
㩷
FW= 1
㩷
㩷
㩷
: Start forward rotation of the motor.
LOOP if
U(07) <>
U(04) then
LOOP
㩷
㩷
rtcset off U(05)
㩷
㩷
㩷
: Stop the update of the clock data.
㩷
FW= 0
㩷
㩷
㩷
㩷
: Decelerate and stop the motor.
㩷
end
㩷
㩷
㩷
㩷
㩷
㩷
(Data area [Data Window])
U(00) = &H0100
㧦
1 hour
U(01) = &H2400
㧦
24:00
Summary of Contents for NT2021XA
Page 4: ... Safety Instructions ...
Page 8: ... Contents ...
Page 10: ...Chapter 1 Outline of EzSQ ...
Page 14: ...1 4 Chapter 1 Outline of EzSQ ...
Page 16: ...Chapter 2 Syntax ...
Page 68: ...2 52 Chapter 2 Syntax ...
Page 70: ...Chapter 3 Interface with the Inverter ...
Page 80: ...3 10 Chapter 3 Interface with the Inverter ...