Input Description¶
EN
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
BOOL | FALSE | TRUE/FALSE | - |
The input EN has to be driven in edge triggered mode.
The execution of the Function Block is started with a positive edge on the input EN.
In the first call it evaluates its inputs and creates a local copy of them. Afterwards it starts its internal algorithm. It may take several PLC task cycles until it is executed.
Once the execution is completed DONE and its other outputs are set. To start the Function Block again a new positive edge on the input EN has to be applied.
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):