HIGH SPEED COUNT

This function is used to count the pulses arriving at the inputs I1 and I2 of a controller powered by a DC supply at rates in excess of one pulse every 10 ms. There are two main operating modes available:

Tachometer mode

COUNT MODE:

This mode is selected by checking the Count option in the Parameters window.

The controller’s inputs I1 and I2 are used for the different count types. It is not necessary to establish any connections between units I1 and I2 and the HIGH SPEED COUNT application-specific function as these links are implicit.

Whether the OFF to ON edges or the ON to OFF edges are taken into account depends on the operating modes chosen for the counter in the Parameters window.

 

This application-specific function has 5 outputs (OUTPUT, ERROR, PRESET VALUE, COUNT/SPEED, TIMEOUT).

When the count number/zero is reached, the first OUTPUT switches to ON. Switching back to OFF depends on the options selected (see the count mode and output in the Parameters window).

The table below describes the effects of inputs I1 and I2 on COUNT depending on the count mode selected in the Parameters window.

The main features of each mode are as follows:

Count

modes

Diagrams

  Count on rising edge

UP

¬ Input I1

­ ACTIVATION input

® COUNT output

DOWN

¬ Input I1

­ ACTIVATION input

® COUNT output

IND

¬ Input I1: count in the cycle direction

­ Input I2: count in the direction contrary to the cycle

® COUNT output, option counting up to the preset value

¯ COUNT output, option counting down from the preset value

CUMUL

¬ Input I1: count in the cycle direction

­ Input I2: count in the cycle direction

® COUNT output, option counting up to the preset value

¯ COUNT output, option counting down from the preset value

DIR

¬ Input I1: count in the cycle direction

­ Input I2: reversing the count direction

® COUNT output, option counting up to the preset value

¯ COUNT output, option counting down from the preset value

PHASE

¬ Input I1: count on edge (signals 90° out of phase)

­ Input I2: reversing the count direction if I2 is ahead of I1

® COUNT output, option counting up to the preset value

¯ COUNT output, option counting down from the preset value

The ERROR output switches to ON in the following cases:

The error remains in position as long as the reset to zero input has not been activated. When the error is triggered the counter result is wrong, which means that the OUTPUT status is not significant.

The counter has three additional INTEGER type outputs:

The Parameters tab in the Parameters window offers the following options for selection:

Count mode (checkbox)

The Parameters tab contains the box (which is checked by default) for the option which restarts counting after a controller power failure.

Count-up to preset value mode

Fixed cycle

 

Repetitive cycle

Counting down from the preset value mode

Fixed cycle

Repetitive cycle

Recommendations for using the COUNT function:

Input signal

TACHOMETER MODE

This mode is selected by checking the Tachometer option in the Parameters window.

The controller’s input I1 is used for tachometer mode. It is not necessary to establish any connection between the I1 unit and the HIGH SPEED COUNT application-specific function as this link is implicit.

How to take into account the edges going from OFF to ON is described in the section Measurement principle in tachometer mode.

This application-specific function has 5 outputs (OUTPUT, ERROR, PRESET VALUE, COUNT/SPEED, TIMEOUT).

The error remains in position as long as the RESET input has not been activated. When the error is triggered the counter result is wrong, which means that the OUTPUT status is not significant.


Measurement principle in tachometer mode

T0: Measurement start time in tachometer mode.

TR-T0: Measurement refresh time in tachometer mode. Minimum period after which measurement can be considered as completed.

TL-T0: Measurement limit time in tachometer mode. Maximum period after which a measurement should have been taken. (If this time is reached without an impulse being measured on I1, this means that the speed is zero).

The tachometer operates in two stages:

TRIGGERING THE MEASUREMENT SCREENING PHASE

The function analyses the arrival of a new rising edge, as soon as it appears at input I1, during a measurement limit period (between T0 and TL).

If this is not the case no measurement is taken.

Otherwise, the function regards the measurement phase as having started.

TRIGGERING THE MEASUREMENT PHASE

Based on the previous rising edge the function carries out an analysis during a measurement limit period (between T0 and TL).

If no more than one rising edge appears at input I1 during this period, the calculated speed is zero and the function returns to the measurement screening phase as soon as the relevant period has elapsed.

If during the refresh period (between T0 and TR) more than one rising edge appears at I1, but none appears during the subsequent period between TR and TL, the calculated speed is zero and the function returns to the measurement screening phase as soon as the second period has elapsed.

If the number of rising edges appearing at I1 is not zero during the refresh period (between T0 and TR), as soon as the first rising edge (F1) appears in the subsequent period between TR and TL the speed is calculated in the manner described below and the function returns to the measurement screening phase when the next rising edge (F2) appears at I1.

Calculating the speed

This calculation is carried out in two stages, starting with the calculation of the number of pulses per second, then the speed. All the values are coded integer values between 0 and +32767. This means that the number of pulses counted in tachometer mode during the measurement period must not exceed 32767.

 

 

N : number of impulses recorded during the measurement phase.

NPPS : Number of Pulses Per Second.

PPr : Pulses Per revolution: value of "Targets per revolution" parameter.

rP : ripple Per: result in revolutions per second.

Coeff : Multiplication coefficient (value of "Scale factor" parameter).

Speed as number of revolutions per second = (NPPS * Coeff)/PPr

As the value calculated for the speed must be less than or equal to 32767, the number of pulses per second can be, at the most, equal to the maximum NPPS = (32767 * PPr)/Coeff with "Max. NPPS" less than or equal to 32767.

 

 

 

The Parameters tab in the Parameters window offers the following options for selection:

Tachometer mode (checkbox)

If one of the two values DR or DL is amended the other will be automatically adjusted to the nearest value if the rule is not observed. In practice, if DR is amended and DL<=DR, then DL=DR+1. If DL is amended and DR>=DL, then DR=DL-1.

The parameter values are automatically updated to the closest permitted value as soon as the parameters selected are confirmed by pressing OK.

 

The Parameters tab contains the box (which is checked by default) for the option which restarts counting after a controller power failure.

Important notes:

Cycle duration

10ms

20ms

30ms

40ms

50ms

Modes

 

 

 

 

 

1 (UP, DOWN, DIR and tachometer)

4.0KHz

3.6KHz

2.4KHz

1.8KHz

1.44KHz

2 (CUMUL) *(1)

3.6KHz

1.8KHz

1.2KHz

900Hz

720Hz

2 (PH) *(2)

3.6KHz

1.8KHz

1.2KHz

900Hz

720Hz

4 (IND) *(1)

1.8KHz

900Hz

600Hz

450Hz

360Hz

*(1) : The value indicated corresponds to the average in a cycle of frequencies present at each input.

*(2) : The value indicated corresponds to the frequency present at input I1.

If the values specified in the table are exceeded the error bit is activated.