Edge counter with data point function
Posted: Tue Apr 03, 2018 11:10 am
Dear all,
I want to create a DPE (unsigned int) as part of a DP which increments itself by a rising edge of a an boolean DPE which is also part of the same DP. Of course this can be realized with a control script which runs in a separate control manager. But I asked myself if this couldn't be realized with a data point function, so it would be much easier to create new data points from the same type?! I know there the possibility to count edges with the statistical data point functions, but this has the disadvantage, that it only counts within the determined time range, couldn't be reset manually and it needs an archive config for the boolean value. A normal data point function isn't configurable with it's own value as input, because it causes a circle calculation and to use the own value as global value doesn't work because the value is read only once during initialization of the data point function. But anyway has somebody an idea how a simple counter that immediately increments itself after a rising edge with a data point function?
Thanks and best regards
Daniel
I want to create a DPE (unsigned int) as part of a DP which increments itself by a rising edge of a an boolean DPE which is also part of the same DP. Of course this can be realized with a control script which runs in a separate control manager. But I asked myself if this couldn't be realized with a data point function, so it would be much easier to create new data points from the same type?! I know there the possibility to count edges with the statistical data point functions, but this has the disadvantage, that it only counts within the determined time range, couldn't be reset manually and it needs an archive config for the boolean value. A normal data point function isn't configurable with it's own value as input, because it causes a circle calculation and to use the own value as global value doesn't work because the value is read only once during initialization of the data point function. But anyway has somebody an idea how a simple counter that immediately increments itself after a rising edge with a data point function?
Thanks and best regards
Daniel