FC 86 - Elapsed Timer

The elapsed timer function code measures elapsed time. This is especially useful for batch control applications, and may be used for maintenance purposes such as operating time measurements. Time units are configurable to seconds, minutes, hours or days with S3. The timer performs either up or down timing functions, and can be held to a particular value or reset to a specified initial value by external logic.

 

Outputs:

Blk

Type

Description

N

R

Current value of timer (always positive)

N+1

B

Time alarm indicator:

0 = alarm time not reached

1 = alarm time reached

 

 

Specifications:

Spec

Tune

Default

Type

Range

Description

S1

N

1

I

Note 1

Block address of reset flag:

0 = run

1 = reset

S2

N

0

I

Note 1

Block address of hold flag:

0 = hold

1 = release

S3

N

0

I

0 - 3

Units of time:

0 = seconds

1 = minutes

2 = hours

3 = days

S4

Y

0.000

R

0.0 - 9.2E18

Value of time alarm

S5

Y

0.000

R

0.0 - 9.2E18

Value of timer on reset

S6

N

0

I

000, 001, 100 or 101

Up/down indicator:

XX0 = up

XX1 = down

 

Tune/adapt reset timer:

0XX = reset timer upon tune or adapt operation

1XX = do not reset timer upon tune or adapt operation

 

NOTE: Tens digit is not important

 

NOTES:

1. Maximum values are: 9,998 for the BRC-100, IMMFP11/12 and 31,998 for the HAC

 

 

 

86.1 Explanation

 

The elapsed timer function code provides a timer with up and down timing functions, automatic reset and hold functions based on external logic functions, and alarm indication if the count reaches a preset alarm value. The reset function overrides all other inputs.

 

86.1.1 Specifications

 

S1 - RESET

Block address of the reset input. When <S1> equals one, the timer resets to the value specified by S5.

0 = run

1 = reset

 

S2 - HOLD

Block address of the hold input. When <S2> equals zero, output N remains at the current value, despite the value of the

up/down indicator (S6).

0 = hold

1 = release

 

S3 - TIME

Sets the units of time.

0 = seconds

1 = minutes

2 = hours

3 = days

 

S4 - TALRM

Value of the time alarm. If this value is reached, output N+1 equals one. Specification S3 sets the time alarm time units.

 

S5 - TIMRES

Sets the value of the timer on a reset. If <S1> goes to one, the timer goes to the value selected with S5. This value is in the units of time selected with S3.

 

S6 - IND

Up/down indicator. The ones digit of this specification defines the direction of timing. The hundreds digit resets the timer on a tune or adapt operation.

                                  

 

 

 

86.1.2  Outputs

 

N

Current value of the timer. The timer output is based on an internal ten millisecond resolution timer. However, the actual output updates once every segment cycle. Output N is calculated in reset or normal operation.

 

Reset:

If <S1> = 1, then N = S5 despite <S2>  where: N = Current value of timer.

 

Normal Operation:

Hold count:

If <S1> = 0 and <S2> = 0, then N = previous N

 

Increase count:

If <S1> = 0, <S2> = 1, and S6 = XX0, then N = previous N + elapsed time since last run

 

Decrease count:

If <S1> = 0, <S2> = 1, and S6 = XX1, then N = previous N - elapsed time since last run

 

Tune/Adapt:

If S6 = 0XX and S5 is tuned, then N = S5, regardless of <S2>

If S6 = 1XX and S5 is tuned, then N = previous N + elapsed time since last run

where:

N = Current value of timer.

or

N = S5 when <S1> = 1.

 

N+1

Alarm indicator. This output indicates when the timer value reaches or exceeds the alarm value specified in S4.

 

Alarm

If S6 = XX0 and Y > S4, then  N+1 = 1

If S6 = XX0 and Y < S4, then  N+1 = 0

If S6 = XX1, and Y < S4, then N+1 = 1

If S6 = XX1, and Y > S4, then N+1 = 0

 

where:

Y = Current value of timer.

 

86.2 Applications

Figure 86-1 shows an example of the elapsed timer being used to calculate the average power consumption over a demand period of 15 minutes. The elapsed timer counts up from zero minutes to 15 minutes, and resets itself to zero minutes when the timer reaches 15. Power is integrated and divided by elapsed time to determine average power consumption per unit of

time.