CD522 Used as Time Frequency Meter

The Function Block CD522_FREQ_SCAN: CD522_FREQ_SCAN CD522_FREQ_SCAN is used to measure times, frequency and rotation speeds on channel Z0 or Z1 of the module.

The module CD522 can be used in 12 different configurable operating modes. The operating mode is configured in PLC Configuration using module parameters. After that, it is activated during the initialization phase (power-on, cold start, warm start).

The data exchange from and to the user program is performed using input and output operands. These necessary operands are created and reserved automatically, when one module CD522 is added into the I/O-Bus configuration.

In order to configure and use the function counter of module CD522, different operating modes are available. The Function Block CD522_FREQ_SCAN should be used with one of these operating modes:

Operating Mode 15 “Time frequency meter (Z)”
Should be specified in PLC Configuration with the parameter mode counter.

The module CD522 provides 2 channels (Z0 and Z1) which can be used to measure times, frequencies and rotational speeds with a resolution of 1 µs. Both have the same specification and can work completely separated.

The Function Block CD522_FREQ_SCAN should be used to control with input EN_CNT, configure the capture on falling edge with input EN_0 or rising edge with input EN_1 of signal, and the specification of the mode of the measurement (time, frequency and Rpm) with input EN_FREQ (see figure and table below).

The table shows values measured according to configuration input parameters and this example of timing.

Attention

:strong:Risk of malfunctions!

Never use the time measurement (bit EN_FREQ=FALSE) mode if the CD522 is connected to a CS31 Bus Module, e. g. CI592.

Depending on the input parameters of function block, the result of time measurement can be measured in time in µs, frequency in Hz or speed of rotation in rotation per minute.