FC 85 - Up / Down Counter

The up/down counter function code is a digital counter with separate inputs for incrementing and decrementing the counter.  The count updates on a logic 0 to logic 1 (positive) transition on either input. External logic can be used to hold or reset the count. The counter can be set to an initial value upon start-up or following reset.

 

This function has high and low alarm features. Each drives a separate output when the input exceeds the alarm value.

 

Outputs:

Blk

Type

Description

N

R

Contents of counter

N+1

B

High alarm status:

0 = no alarm

1 = count has reached high limit

N+2

B

Low alarm status:

0 = no alarm

1 = count has reached low limit

 

 

Specifications:

Spec

Tune

Default

Type

Range

Description

S1

N

0

I

Note1

Block address of up trigger

S2

N

0

I

Note1

Block address of down trigger

S3

N

0

I

Note1

Block address of reset flag:

0 = run

1 = reset

S4

N

1

I

Note1

Block address of hold flag:

0 = hold

1 = release

S5

Y

0.000

R

Full

Value of count on reset

S6

Y

9.2E18

R

Full

High alarm value

S7

Y

-9.2E18

R

Full

Low alarm value

 

NOTES:

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

 

 

 

85.1 Explanation

 

The contents of the counter output N is dependent on the reset input, hold input, and the up and down triggers. The reset input overrides all other inputs. Three types of operations are possible: normal, reset and alarm.

 

 

85.1.1 Specifications

S1 - UPTRIG

Block address of up trigger. A zero to one transition of <S1> increments the counter by one.

 

S2 - DNTRIG

Block address of down trigger. A zero to one transition of <S2> decrements the counter by one.

 

S3 - RESET

Block address of reset input.

0 = run

1 = reset

 

S4 - HOLD

Block address of the hold input.

0 = hold

1 = release

 

When <S4> equals zero, the counter remains fixed at the current value despite <S1> and <S2>. When <S4> equals one, the counter releases to respond to <S1> or <S2>.

 

S5 - COUNT

Value of count on reset. When <S3> equals one, the count goes to the number specified by S5.

 

S6 - HIALRM

High alarm value. If the value of N equals or exceeds <S6>, output N+1 equals one, signifying a high alarm state. If the reset input <S3> is 1 indicating reset, output N+1 equals zero indicating high alarm cleared.

 

S7 - LOALRM

Low alarm value. If the value of N equals or falls below <S7>, output N+2 equals one, signifying a low alarm state. If the reset input <S3> is 1 indicating reset, output N+2 equals zero indicating low alarm cleared.

 

 

85.2  Reset

 

If <S3> = 1, then Y = S5 and N+1 = 0

If <S3> = 0, then High and Low alarm status (N+1/N+2) are set as described in Alarm.

 

where:

 

<S3>

=

Value of reset input:

0 = run

1 = reset

 

S5

=

Value of count on reset.

 

Y

=

Current value of count.

 

 

 

85.3  Normal

 

If previous <S1> = 0 and current <S1> = 1, then Y = previous Y+1

 

If previous <S1> = current <S1>, then Y = previous Y

 

If previous <S2> = 0 and current <S2> = 1, then Y = previous Y - 1

 

If previous <S2> = current <S2>, then Y = previous Y

 

If <S4> = 0, then Y = previous Y, despite <S1> and <S2>.

 

where:

 

<S1>

=

Value of input:

 

<S2>

=

Value of down input.

 

<S4>

=

Value of hold input:

0 = hold

1 = release

 

<S4>

=

Current value of count.

 

 

85.4 Alarm

 

If Y > S6 and <S3> = 0, then:

N+1 = 1

else N+1 = 0

 

If Y < S7 and <S3> = 0, then

N+2 = 1

else N+2 = 0

 

where:

Y

=

Current value of count.

 

N+1

=

High alarm indicator:

0 = normal

1 = high alarm

 

N+2

=

Low alarm indicator:

0 = normal

1 = low alarm

 

 

 

85.5 Applications

 

Up/down counters count events and enable alarms or trigger events when alarm values are reached.

 

Figure 85-1 shows an example of the counter used to alert the operator of service requirements. The motor must be removed from service and rebuilt after performing 100 starts. This configuration increments the counter each time the motor starts. The high alarm limit is 100 (starts). When N equals the high alarm limit <S6>, output N+1 equals one. Output N+1 goes to a digital output over the loop function block causing an exception report to be sent to the communication highway.

 

This triggers a service required display on the console.