Input Description¶
EN
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
BOOL | - | - | - |
In order to enable the Function Block processing, input EN has to be continuously set to TRUE. The Function Block is not processed if input EN = FALSE.
When calling the Function Block the first time, the inputs are checked for validity and plausibility. If this is not the case, processing is aborted and corresponding error is displayed at output ERR/ERNO.
CNT_NUM
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
WORD | - | - | - |
CNT_NUM contains the counter number in the module:
- CNT_NUM = 0 is related to input A0, B0, Z0
- CNT_NUM = 1 is related to input A1, B1, Z1
EN_CNT
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
BOOL | - | - | - |
If EN_CNT = TRUE, pulse counting of counter is enabled. If EN_CNT = FALSE, no pulse counting is performed and the pulses are lost.
If counting has already started and if EN_CNT = FALSE, the pulse counting stops and counter value ACT is stored. If EN_CNT = TRUE again, the pulse counting will start again and counter value ACT will continue since previous value.
Input EN_CNT corresponds to bit 0 in “control byte”.
EN_0
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
BOOL | - | - | - |
If EN_0=TRUE, the time frequency measurement will be captured on the falling edge of signal.
Input EN_0 corresponds to output bit 1 in control byte.
EN_1
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
BOOL | - | - | - |
If EN_1=TRUE, the time frequency measurement will be capture on rising edge of signal.
Input EN_1 corresponds to output bit 2 in control byte.
EN_FREQ
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
BOOL | - | - | - |
If EN_FREQ=FALSE, the time frequency measurement will be specified in time mode and displayed on output DUR (in µs).
If EN_FREQ= TRUE, the time frequency measurement will be specified in frequency and rpm modes and displayed on output FREQ (in Hz) and RPM (in rotation per minute).
Input EN_FREQ corresponds to output bit 3 in control byte.
ADR_IN POINTER \ TO structCD522counterin
At this input, the address of the first input data from the structure of counter input of CD522 should be connected. The use of an ADR operator is needed. If input ADR_IN is not connected, then the outputs DONE=FALSE and ERR= TRUE.
Example (for counter 0):
ADR_OUT POINTER \ TO structCD522counterout
At this input, the address of the first output data from the structure of counter output of CD522 should be connected. The use of an ADR operator is needed. If input ADR_OUT is not connected, then the outputs DONE=FALSE and ERR= TRUE.
Example (for counter 0):