Switch to desktop version  
Creating Totaliser Within eWON - Printable Version

+- Ewon Technical Forum (https://techforum.ewon.biz)
+-- Forum: Development (https://techforum.ewon.biz/forum-50.html)
+--- Forum: BASIC Script (https://techforum.ewon.biz/forum-52.html)
+--- Thread: Creating Totaliser Within eWON (/thread-845.html)



Creating Totaliser Within eWON - Josh - 25-02-2019

Hi,

I'm trying to create a tag in the eWON which would be a totaliser for a flow meter.

I have a standard flowmeter which the eWON downloads the flowrate from every 10 seconds, I'm trying to use the BASIC IDE to take this flowrate convert it to a volume and add it to a totaliser. I'm not good at the syntax though and because the system is already online and operating I'm worried about introducing bugs which could affect normal operations.

Firstly, is it possible to create another tag (or continuously update an existing tag) with the BASIC IDE that would behave the same as other tags? eg: downloadable with the datamailbox?

Secondly, where would be the best place to start for learning the syntax etc (I checked the eWON general reference)

Third, is there already an example of this on this forum that I missed?

Thanks!
Josh


RE: Creating Totaliser Within eWON - AngelaT - 25-02-2019

Hi Josh,

You can create tags with the MEM IO server that behave just like regular tags - you can log them, set alarms, publish them, but they don't read from a controller.  They represent variables on the eWON itself.  I'd recommend spending a little time over at https://developer.ewon.biz/ You'll find the programming reference guide and many good code examples to get you started.


RE: Creating Totaliser Within eWON - feedback - 12-02-2020

Hi,

Just insert simple script;

ONCHANGE "Test_Pulse", "IF Test_Pulse@ = 1 THEN Test@ = Test@ + 1"


RE: Creating Totaliser Within eWON - simon - 14-02-2020

Also, do not forget that you can set the topic to "RET" to retain your totalizer tag value even if the Ewon reboots.