DC541_FREQ¶
Parameter | Value |
---|---|
Library_File_Name | DC541_AC500_V11.lib |
Firmware | V1.1.3, DC541 firmware: V1.2 |
Type | Type_Function_Block_History |
Group | Counters |
The Function Block DC541_FREQ is used to measure times, frequencies and rotational speeds with a resolution of 100 µs.
It is able to measure frequencies from 0 to 2000 Hz (2 kHz). In order to obtain a precise measurement of frequencies > 50 Hz, a correspondingly high accuracy setting has to be chosen. It is recommended to use an accuracy of PREC = 1000, i.e. 0.001.
This Function Block has to be called cyclically, one time per second at least.
The inputs EN_0, EN_1 and EN_FREQ are used to determine the edges to be measured. If input EN_FREQ = TRUE, the frequency and the rotational speed are calculated in addition to the time measurement.
EN_0 | EN_1 | EN_FREQ | Edges measured | FREQ/RPM |
---|---|---|---|---|
FALSE | FALSE | TRUE | No measurement is performed. | yes |
FALSE | TRUE | TRUE | Measurement of time between two rising edges. |
yes |
TRUE | FALSE | TRUE | Measurement of time between two falling edges. |
yes |
TRUE | TRUE | TRUE | Measurement of time between any two edges. |
yes |
FALSE | FALSE | FALSE | No measurement is performed. | no |
FALSE | TRUE | FALSE | Measurement of time between the falling edge and the subsequent rising edge. |
no |
TRUE | FALSE | FALSE | Measurement of time between the rising edge and the subsequent falling edge. |
no |
TRUE | TRUE | FALSE | Measurement of time between any two edges. |
no |
Example
Different time measurement results depending on the values applied to the inputs EN_0, EN_1 and EN_FREQ.
EN_0 | EN_1 | EN_FREQ | Time measurement (duration DUR) [µs] | |||
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
FALSE | FALSE | TRUE | 0 | 0 | 0 | 0 |
FALSE | TRUE | TRUE | - | 500 | - | 450 |
TRUE | FALSE | TRUE | - | - | 350 | - |
TRUE | TRUE | TRUE | 300 | 200 | 150 | 300 |
FALSE | FALSE | FALSE | 0 | 0 | 0 | 0 |
FALSE | TRUE | FALSE | 300 | - | 150 | - |
TRUE | FALSE | FALSE | - | 200 | - | 300 |
TRUE | TRUE | FALSE | 300 | 200 | 150 | 300 |
The output NEW indicates that new measurement results are available.
The device DC541 must be configured as counting device (counter mode). Channel CH must be configured for frequency measurement.
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.