Water gauges - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Water gauges (/showthread.php?tid=2164) |
Water gauges - Thomas - 19.07.2019 Hello Water gauges returns pulses only. I can send these pulses through KNX bus and count them in LM. But how to do it correctly? If I use GO only then I can't do backup and restore for example. If I store values on SD card after every pulse I'm in risk I will kill it quickly. How do you solve this problem? RE: Water gauges - Erwin van der Zwart - 19.07.2019 Hi, Writing to storage is not direct to SD so could not hurt the SD. What i do in this case is use a KNX interface of Schneider MTN670802 and set it to impuls counter, it then counts the impulses internally and you can write the counted values over x period to the bus on a set interval. In the controller i get random values like 30, 40, 35 depending on the number of counted pulses in the set period and i sum them to the old value, this way you don't need to process every puls on the controller but you do it in batches. BR, Erwin RE: Water gauges - Thomas - 19.07.2019 (19.07.2019, 11:51)Erwin van der Zwart Wrote: Hi,But still you need a storage for the counter. Do you store it on SD card? Because both options are wrong in sobe way GO - backup and restore is impossible SD - changing of SD is complicated Some mix of both? I mean compare GO and SD and higher number wins seems to be a good choice. RE: Water gauges - Daniel - 19.07.2019 Storage function will save your value in to Redis DB which runs in RAM. It saves everything to SD or SPI (depend of the hardware version) every half an hour like everything else. |