====== Power meter ====== {{:en:mervis-ide:35-help:t36.png}} ===== Block name ===== T36_POWER_METER ===== ST call ===== PROGRAM TEST_T36 VAR PMIN: UDINT; PMOUT: REAL; FB: LIB.HVAC.V1_0.T36_POWER_METER; END_VAR FB(IN:= PMIN, OUT=> PMOUT); END_PROGRAM ===== Library ===== LIB\HVAC ===== Version ===== V1.0 ===== Description ===== The block calculates instantaneous power (or any other value, like flow etc.) from a cumulated value which is brought to the input (energy, water volume). It is used to calculate the momentary values for display of energy flow graphs in a building, for energy sources optimisation, peak power limitation, etc.\\ ===== Inputs ===== |Input|Type |Description |Default value| |IN |UDINT|Number of input pulses (“energy units”), cumulated value from a heat meter, energy meter, water volume meter or similar device |0 | |N |INT |Number of last pulses to take into account |16 | |K |REAL |Cumulated value represented by a single pulse (in case that the input value is not the energy value e.g. in kWh (then a constant of 1 shall be used)) |1 | |DECAY|REAL |Coefficient of exponential decay. The value ranges from 0 to 1, while 1 means no decay, or all n last pulses are of the same weight.\\ The more the value limits to 0, the less the older pulses are taken into account, or they less influence the output value.|1 | |OMIT |INT |Number of omitted samples. For //OMIT //= 1,//// one highest and one lowest sample are not taken into the calculation. |0 | ===== Outputs ===== |Output|Typ |Description | |OUT |REAL|Momentary value, or derivation of the input value.| ===== Function ===== The input value is sampled periodically. On change, time is recorded that elapsed between the last and the current pulse. The parameter n has to be set so as to reflect the input pulses frequency and nature of the measured value: the higher n, the more the derived signal averages with the last samples and its behaviour is smoother; the lower n, the more exactly the output reflect the momentary situation.\\ ===== Application example ===== {{:en:mervis-ide:35-help:t36_example.png}} Functions T36 calculate the actual power of the whole building, and of the chillers, according to cumulated values from pulse energy meters. The output of the subtracting block gives approximate power consumption of the rest of the building, which is total building consumption minus consumption of the chillers.