Josep M. Rams wrote:
You can compare the actual potentiometer value with the value of the past cycle (with certain hysteresis). If the value has changed change execute from false to true.
Are you sure this will work? The documentation on codesys does not specify if another execute edge will replace the current execution, but for eg. Beckhoff says "It is not possible to trigger a move function block with new parameters while it is active.".
I have been using two independent blocks, that I execute alternatively. Maybe there is a smarter solution