DC541_FWD_CNTΒΆ

../_images/29ad0255e389dada0a33139000eba54e
Parameter Value
Library_File_Name DC541_AC500_V11.lib
Firmware V1.1.3, DC541 firmware: V1.1
Type Type_Function_Block_History
Group Counters

The function block DC541_FWD_CNT provides a 32 bit count-up counter which is able to count a maximum frequency of 50 kHz at the inputs C0 and C1 or 5 kHz at the inputs C2-C7. In the DC541, the counter is implemented as a 16 bit counter. The actual counter value ACT_CNT is bulit inside the function block by adding the counter differences that occur within the individual cycles. In order not to loose any counting pulses, the function block has to be called cyclically.

  • Channel 0-1: 50 kHz max. -> 32767 / 50 = 655 ms
  • Channel 2-7: 5 kHz max. -> 32767 / 5 = 6550 ms

Using the counter e.g. in a 100 ms task will prevent any loss of counting pulses.

Operating modes

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

The operating mode is selected at 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 LIM_MIN is higher than LIM_MAX, an error is displayed.

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

The 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.