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_TOUCH
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
BOOL | - | - | - |
Touch/catch operation is enabled through control bit (EN_TOUCH). This resets the status flag (NTOUCH), when the pre-determined edge occurs; the current counter value is stored in the touch value double word. In the same time, the status NTOUCH is set to TRUE.
A rising edge at input EN_TOUCH enables a catch/touch trigger measurement. If input EN_TOUCH = TRUE, a rising edge at input I3 (for counters 0-A and 0-B)) or I11 (for counters 1-A and 1-B) causes the Function Block to store the actual counter value ACT1 and ACT2 and to display this value at output CNT_TOUCH1 and CNT_TOUCH2.
The next measurement is again initiated by a rising edge at input EN_TOUCH.
If input EN_TOUCH is set to FALSE, the output RDY_TOUCH is set to FALSE.
Input EN_TOUCH corresponds to bit 6 in “control byte”.
EDGE_TOUCH
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
BOOL | - | - | - |
If EDGE_TOUCH = FALSE, a catch/touch value will be operate on falling edge of input I3 (for counter 0) or I11 (for counter 1).
If EDGE_TOUCH = TRUE, a catch/touch value will be operate on rising edge of input I3 (for counter 0) or I11 (for counter 1).
Input EDGE_TOUCH corresponds to bit 7 in “control byte”.
EN_GRAY
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
BOOL | - | - | - |
If EN_GRAY=TRUE, the actual value will be calculated from GRAY code.
EN_BCD
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
BOOL | - | - | - |
If EN_BCD=TRUE, the actual value will be calculated from BCD code.
SET_END
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
BOOL | - | - | - |
If set input SET_END=TRUE, the counter is set to the value specified at input END_VALUE.
END_VALUE
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
DWORD | - | - | - |
If the counter reaches the planned input END_VALUE (read while SET_END is set to TRUE), the outputs configured as ENDV is set to TRUE.
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):