Hi Sacha,
Now your code probably puts the counter back to 0 at the start of each month do you just want a counter that keeps on counting or is there a specific condition or time period you want it to reset after?
Kind regards
Frederik Vandael
Hi Frederik,
yes. It should reset to 0 after switching the equipment status from operating to standby via a digital tag. That works. But it seems, that it also resets at the end of the month.
For explanation: We use a value-based search in the custom calculation that defines the operating and non-operating phase. In the operating phase we use another value-based that uses the “TM_HOUR_”-TAG = constant to calculate the operational values like flow and concentration of the input and output.
Best regards
Sascha
After an investigation of the code we determined the cause if similar as described in the following question:
Summary: it is important to define a max duration for your period of interest, this is because the length of the index interval can very with every run of the custom calculations script.
More info about indexing and the index interval can be found in the following notebook:
https://github.com/TrendMinerCS/custom-calculations/blob/main/custom_calculations_introduction.ipynb