Modbus – IAI America ROBO Cylinder Series User Manual
Page 49

4. Communication
41
Modbus
(10) Data of present time (Address = 841A
H
(SCON-CA), 8420
H
(PCON-CA/CFA) (TIMN)
Bit
Symbol
Name
Function
31
-
Present time 2147202832
30
-
Present time 1073601416
29
-
Present time 536800708
28
-
Present tiime 268400354
27
-
Present time 134200177
26
-
Present time 67108864
25
-
Present time 33554432
24
-
Present time 16777216
23
-
Present time 8388608
22
-
Present time 4194304
21
-
Present time 2097152
20
-
Present time 1048576
19
-
Present time 524288
18
-
Present time 262144
17
-
Present time 131072
16
-
Present time 65536
15
-
Present time 32768
14
-
Present time 16384
13
-
Present time 8192
12
-
Present time 4096
11
-
Present time 2048
10
-
Present time 1024
9
-
Present time 512
8
-
Present time 256
7
-
Present time 128
6
-
Present time 64
5
-
Present time 32
4
-
Present time 16
3
-
Present time 8
2
-
Present time 4
1
-
Present time 2
0
-
Present time 1
It outputs the time of the present time issuance.
[1] For the models that are equipped with the calendar
function (RTC), when RTC is set effective, it shows
the time of alarm issuance.
[2] When RTC is set ineffective or for the models that is
not equipped with RTC, it shows the time [msec]
passed since the power to the controller is turned on.
Ɣ How present time is calculated in 1)
The data of present time shows the seconds passed from
the origin time (00hr:00min:00sec 1January2000).
Passed second from the origin time is expressed with S,
passed minute with M, passed hour with H, passed day
with D and passed year with Y, and the calculation is
conducted with a formula as shown below:
ᴾ
S=ᴾ Data of read alarm issuance time
ᴾ
M=ᴾ S/60(decimal fraction to be rounded down)
ᴾ
H=ᴾ M/60(decimal fraction to be rounded down)
ᴾ
D=ᴾ H/24(decimal fraction to be rounded down)
ᴾ
Y=ᴾ D/365.25(decimal fraction to be rounded down)
ᴾ
L(Leap year)=ᴾ Y/4(decimal fraction to be rounded up)
Assuming the second of time is SA, minute is MA, hour is
HA, passed day in this year is DA and year is YA, the
time can be calculated with a formula as shown below:
ᴾ
SA=ᴾ Remainder of S/60
ᴾ
MA=ᴾ Remainder of M/60
ᴾ
HA=ᴾ Remainder of H/24
ᴾ
DA=ᴾ D-(Y×365+L)
Year and day can be figured out by subtracting
the number of days in each month from DA.
ᴾ
YA=ᴾ Y+2000ᴾ (A.D.)
Example) Assuming present time data is 172C1B8B
H
;
(1) Convert into decimal numberᾉ
S= 172C1B8B
H
388766603
(2) Calculate M, H, D, Y and L.
ᴾ
M=ᴾ 388766603/60= 6479443
ᴾ
H=ᴾ 6479443/60= 107990
ᴾ
D=ᴾ 107990/24= 4499
ᴾ
Y=ᴾ 4499/365.25= 12
ᴾ
L=ᴾ 12/4= 3
(3)
Figure out SA, MA, HA and DA.
ᴾ
SA=ᴾ Remainder of 388766603/60= 23
ᴾ
MA=ᴾ Remainder of 6479443/60= 43
ᴾ
HA=ᴾ Remainder of 107990/24= 14
ᴾ
DA=ᴾ 4499-(12×365+3)
=ᴾ (116 days has passed in this year and the time of
alarm issuance is on the day 117.)
Year and day = 117 – {31 (Jan) – 29 (Feb) – 31 (Mar)}
= 26 (since the number becomes a negative if
days in April is subtracted, the time of present is
on 26April)
ᴾ
YA=ᴾ 12+2000= 2012
As figured out with the calculation above, the
present time is 14:43:23 26Apr2012.