Input DescriptionΒΆ

../_images/80ac5cd64e1e713c0a33139001895b34

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.

../_images/c3d8fd335683d75e0a317d31511d9201

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

SET (set counter)

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.

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.

CNT_SET (counter set)

Data type: INT

The counter can be set to a start value. This value must be applied to the input CNT_SET.

If input SET=TRUE, the counter takes this value.