DC541_32BIT_CNT

../_images/f3bbaaa5e389d4930a33139000eba54e1
Parameter Value
Library_File_Name DC541_AC500_V11.lib
Firmware V1.1.3
Firmware DC541 V1.1
Type Type_Function_Block_History
Group Counters

The 32-bit counter is a count-up/count-down counter with a directional discriminator. The counter can be used in two counting modes:

  • EN_UD = FALSE: Encoder mode

    Connection of an incremental transmitter (track A / track B, offset by 90°)

    It is possible to count signals up to approx. 60 kHz. This corresponds to a motor with a rotational speed of 3.600 rpm and a transmitter with 1.000 pulses per rotation. Pulse multiplication (x2 or x4) is not used.

  • EN_UD = TRUE: Up / down mode

    Up-/down counter

    It is possible to count signals up to approx. 60 kHz. Count-up for signals on channel C1, count-down for signals on channel C0.

The counter always uses the channels C0…C3 of the DC541:

  • C0: Track A of the incremental transmitter.
  • C1: Track B of the incremental transmitter.
  • C2 and C3: Reference cam or touch trigger.

The counter can be used in two operating modes:

  • Infinite counter (endless mode)
  • Limiting counter (limit mode)

The operating mode is selected using input EN_LIM.

If EN_LIM = FALSE, the counter operates as an infinite counter (endless mode). An overflow occurs corresponding to the 32 bit value at 16#FFFFFFFF = 4 294 967 295. In this mode, any exceeding of the limit value LIM_MAX or falling below the limit value LIM_MIN is displayed at the outputs MAX_LIM or MIN_LIM.

If EN_LIM = TRUE (limit mode), the counting range is between the limit values LIM_MIN and LIM_MAX. In case of an overflow, i.e. if LIM_MAX is reached, the counter restarts again at LIM_MIN.

The upper limit value LIM_MAX has to be higher than the lower limit value LIM_MIN. If the lower limit value LIM_MIN is higher than the upper limit value LIM_MAX, a corresponding error message is displayed at the outputs ERR/ERNO. In this case, the values for LIM_MIN and LIM_MAX are not forwarded to the DC541. The difference between LIM_MAX and LIM_MIN has to be at least twice the number (frequency) of counting pulses per DC541 cycle.

Example

Number of counting pulses (frequency) = 40 kHz = 40000 increments/s = 40 increments/ms

Cycle time of the DC541 = 100 µs

LIM_MIN = 0

Number of counting pulses per DC541 cycle: 40 increments/ms = 4 increments/100 µs

LIM_MAX > 8

Using input SET, the counter is set to the value CNT_SET. This value is kept as long as input SET = TRUE.

If the reference point approach is enabled at input EN_REF, the counter is set to the value of input CNT_SET when a rising edge occurs on channel C2 or C3.

Using input EN_TOUCH, a touch trigger measurement is enabled. This means: With the rising edge on channel C2 or C3, the counting value is stored and displayed at output CNT_TOUCH. The validity of CNT_TOUCH is indicated by output RDY_TOUCH. This functionality can be used to determine the counter value with regard to an external event. The results are increment accurate.

Only one function may be enabled at a time, either the reference point approach or the touch trigger measurement. If both functions are enabled simultaneously or if the execution of one function is not yet completed when enabling the other function, a corresponding error message is displayed at the outputs ERR/ERNO.

To initiate a new reference point approach or touch trigger measurement, a positive edge at the corresponding enabling input is necessary.

If the zero track of an incremental transmitter is wired to channel C2 or C3, no touch trigger measurement may be performed in the region of the reference cam!

The device DC541 must be configured as counting device (counter mode).

This function block has an integrated visualization which can be used to control all function block functions in parallel to the user program, if input EN_VISU = TRUE Visualizations.