now i can present you my final solution(s) for your posted aims.
The LOGO! and special the series 0BA5 give us some difficult problems to solve:
- calculations can only made with integer values!
- the value range of the used analog blocks are only smal!
- the 0BA5 has no the possibility to calculate "a / b" if "b" is only present at the running time of the program OR "a * b" if "a" and "b" are only present at the running time of the program!
The EXCEL-file "Energy_meter_calculations.xls" perhaps can help you to understand my way of solution. One result is, that the measuring/caltulation of energy kWh can done without the know of the time distancs of the sensor pulses (because the volume is constant 10 l). The suitable scaling of the values and the calculation steps are most importent to get a solution. Please look at the comments at the files.
Look at "DEMO_energy_meter_kWh_V1.lsc" how to calculate and display energy kWh. Page 1 contains the inputs and there preparation. I implemented two versions to get/calculate the temperatur difference! At page 2 you find the part to add the smal fractions of energy evers puls and creates an internal puls to count the result sum of energy. Optional you can use pulses to external application(s). The file contains two methods to display the result...
The second version "DEMO_energy_meter_V2 (with flow rate).lsc" containe an extension of file "..V1.." to mesaure/calculate the flow rate (at page 3). To measure the time between two pulses is no solution, because a division with this value is impossible. I used the way over the detection of n pulses per time window, based at my circuit "Demo_Threshold_trigger_en.lsc". The easier use of the internal block "threshold trigger" is not realy possible, because no scaling and no use of the resuls is possible then.
The third version "DEMO_energy_meter_V3 (with heat power kW).lsc" containe an extension of file "..V2.." to calculate the heat power in relation of the detected flow rate. But, because there is no multiplication with a measured time (between two pulses) with LOGO! 0BA5 available, i used the n possible results of flow rate to select a calculation way ("flow rate * cp" as explicite constant values; at page 4) to display a value for the actual heat power (= at the last time window = 300 s).
blink
I hope you can life with this solution way....
Now a additional comment: I have found a difference working of the version 5 and 6 of the Software LOGO!SoftComfort. Remember that the circuit part at page 2 in "DEMO_energy_meter_kWh_V1.lsc" works well in LSC version 5 and 6 and at a real LOGO!-module . Look at the file "DEMO_energy_meter_kWh_V1b (LogoSoftComfort_V6).lsc", witch works well with LSC version 6 - but not with LSC version 5. Sorry but i dont now what a real LOGO! is doing with that circuit version V1b. It should work well - please test this and tell me your result. If it works well too, then you can change all versions V1 to V3 of my solution files (that saves blocks).
blush
Best regards
Betel
Attachment: FORUM_Energy_meter_01.zip (445 Downloads)
Dear Betel,
This is a great program but to much complicated for my basic knowledge. blush
What blocks should I modify to have a flow meter with 1 pulse/liter and a difference in Thigh and Tlow of about 70ºC.