Panasonic FP-E Programming Manual page 683

Fp series
Table of Contents

Advertisement

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.
Starting time: December 23, 1994 8: 2' 15"
BCD H code
9
Years
Ending time: December 23, 1994 10: 30' 25"
9
BCD H code
Years
The data to be subtracted is taken from the starting time data, as shown below.
(8: 02' 15")
BCD H code
0
The results will be as follows.
Result: December 23, 1994 2: 28' 10"
BCD H code
9
Years
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: info@clrwtr.com
S1+2
4
1
2
2
Months
S2+2
4
1
2
2
Months
0
0
8
0
Hours
Minutes
The section indicating
the "Day" is set to "0".
F158 (CSUB) execution
DT32
4
1
2
2
Months
S1+1
3
0
8
Days
Hours
S2+1
3
1
0
Days
Hours
2
1
5
Seconds
DT31
3
0
2
Days
Hours
High−level Instructions
S1
0
2
1
5
Minutes
Seconds
S2
3
0
2
5
Minutes
Seconds
DT30
2
8
1
0
Minutes
Seconds
3 − 419

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fp0Fp2Fp2shFp0rFrsFp10sh ... Show all

Table of Contents