
High
−
level Instructions
3
−
419
Usage example: Computing the elapsed time
The elapsed time can be computed using the
F158 (CSUB)
instruction.
Using the calendar timer, store the starting time and ending time in the data memory, and compute the
elapsed time between the two values. An example in which operation was stopped at 08:02:15 and resumed
at 10:30:25 will be used to show how the time that operation was stopped is computed.
The computation can be thought of as subtracting 08:02:15 from 10:30:25.
BCD H code
9
4
1
2
2
3
0
8
S1+2
S1+1
0
2
1
5
S1
Years
Months
Days
Hours
Minutes
Seconds
Starting time: December 23, 1994 8: 2’ 15”
BCD H code
9
4
1
2
2
3
1
0
S2+2
S2+1
3
0
2
5
S2
Years
Months
Days
Hours
Minutes
Seconds
Ending time: December 23, 1994 10: 30’ 25”
The data to be subtracted is taken from the starting time data, as shown below.
BCD H code
0
0
0
8
0
2
1
5
Hours
Minutes
Seconds
(8: 02’ 15”)
BCD H code
9
4
1
2
2
3
0
2
DT32
DT31
2
8
1
0
DT30
Years
Months
Days
Hours
Minutes
Seconds
Result: December 23, 1994 2: 28’ 10”
F158 (CSUB)
execution
The section indicating
the “Day” is set to “0”.
The results will be as follows.
The section indicating the hour, minutes and seconds is read as ”2 hours, 28 minutes, 10 seconds”, and this is
the elapsed time.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]
Summary of Contents for FP-E
Page 1: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 2: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 24: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 1333: ...5 245 Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...