Input DescriptionΒΆ
EN (enable)
Data type: 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.
INST (instance)
Instance description of the Function Module that should be controlled via this function block. The variable is automatically generated during the configuration with the Automation Builder. Use the operator ADR to get the address of the variable.
Example
EN_CNT (enable counter)
Data type: 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 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.
EN_TOUCH (enable touch)
Data type: BOOL
A rising edge at input EN_TOUCH enables a catch/touch trigger measurement. If input EN_TOUCH = TRUE, a rising edge at digital inputs DI0, DI1, DC2, DC3 (for counters A and 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.
If input EN_TOUCH is set to FALSE, the output RDY_TOUCH is set to FALSE.
EDGE_TOUCH
Data type: BOOL
If EDGE_TOUCH = FALSE, a catch/touch value will be operate on falling edge of the configured digital input (for counters A and B).
If EDGE_TOUCH = TRUE, a catch/touch value will be operate on rising edge of the configured digital input (for counters A and B).
UD (up/down mode)
Data type: BOOL
At input UD, the counting selection is set for up/down counting mode:
UD=FALSE: count up
UD=TRUE: count down
RESET (reset counter)
Data type: BOOL
If input RESET = TRUE, the counter value (ACT) is reset to 0. As long as input RESET = TRUE, no pulses are counted because the counter is always overwritten by the value 0.
A rising edge at digital input DI0, DI1, DC2, DC3 causes the function block to reset the value at output ACT.
SET_START (set start value)
Data type: BOOL
If set input SET=TRUE, the counter takes the values from input START_VALUE to transfer it to output ACT. As long as input SET=TRUE, no pulses are counted because the counter is always overwritten by the input START_VALUE.
A rising edge at input causes the function block to store the START_VALUE value and to display this value at output ACT.
SET_END (set end value)
Data type: BOOL
If input SET_END=TRUE, the counter is set to the value specified at input END_VALUE.
START_VALUE
Data type: DINT
The counter can be set to a start value. This value must be applied to the input START_VALUE.
END_VALUE
Data type: DINT
If the counter reaches the planned input END_VALUE, the binary output CF is set to TRUE and the value is stored.