The macros presented here automatically create all data points and calculations that are necessary to record and store the operating time of a switching data point.
This macro uses six additional data points for each data point to be recorded, e.g. to remember the time of the last switch-on or the current operating time.
1. Select a data point of the type Switch or EIB Switch (format of the data point type is Boolean) in the list of data points.
2. Run the macro
3. Visualize the data point with the extension _BZ_Anzeige with a control element (simply drag it into an image).
4. Optional: Visualize the data point with the ending _BZ_Reset with a control element (to reset the operating time).
The macro can be used as often as desired in a project, since the generated data point names are derived from the data point name of the switching data point whose operating time is to be determined.
Download the macro betriebszeit.idm (17 kByte)
The dialog of the macro:
The functionality of this macro is almost identical. However, instead of additional data points, data point properties are largely used (which are created automatically the first time):
- “POTSwitchOnTime”: contains the last switch-on time
- “POTOnTime”: contains the burning time since the last switch-on (in hours)
- “POTPrevOnTime”: contains the operating time until the last power off (in hours)
- “POTTotalOnTime”: contains the total uptime (POTOnTime+POTPrevOnTime)
This saves data points and increases the overview. In Elvis 2.6, the cyclic update macro does not use one timer data point per switching data point, but one of the new cyclic timers (which can be shared by all hour meters).
Download the power-on-time.zip macro (7 kByte)