Modbus – IAI America ROBO Cylinder Series User Manual
Page 43

4. Communication
35
Modbus
ᴾ
(4) Data of alarm occurrence time (Address = 0504
H
) (ALA0)
Bitᴾ
Symbolᴾ
Name
Functionᴾ
31
-
Alarm occurrence time 2147202832
30
-
Alarm occurrence time 1073601416
29
-
Alarm occurrence time 536800708
28
-
Alarm occurrence time 268400354
27
-
Alarm occurrence time 134200177
26
-
Alarm occurrence time 67108864
25
-
Alarm occurrence time 33554432
24
-
Alarm occurrence time 16777216
23
-
Alarm occurrence time 8388608
22
-
Alarm occurrence time 4194304
21
-
Alarm occurrence time 2097152
20
-
Alarm occurrence time 1048576
19
-
Alarm occurrence time 524288
18
-
Alarm occurrence time 262144
17
-
Alarm occurrence time 131072
16
-
Alarm occurrence time 65536
15
-
Alarm occurrence time 32768
14
-
Alarm occurrence time 16384
13
-
Alarm occurrence time 8192
12
-
Alarm occurrence time 4096
11
-
Alarm occurrence time 2048
10
-
Alarm occurrence time 1024
9
-
Alarm occurrence time 512
8
-
Alarm occurrence time 256
7
-
Alarm occurrence time 128
6
-
Alarm occurrence time 64
5
-
Alarm occurrence time 32
4
-
Alarm occurrence time 16
3
-
Alarm occurrence time 8
2
-
Alarm occurrence time 4
1
-
Alarm occurrence time 2
0
-
Alarm occurrence time 1
It outputs the time of the alarm 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 alarm issuance time is calculated in 1)
The data of alarm issuance 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 alarm issuance 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 alarm issuance 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 alarm
issuance is on 26April)
ᴾ
YA=ᴾ 12+2000= 2012
As figured out with the calculation above, the time
of alarm issuance is 14:43:23 26Apr2012.