Script about calculate the cumulative downtime

Gateway event

https://docs.inductiveautomation.com/display/DOC81/Gateway+Event+Scripts

Have the gateway event update a memory tag.
Bind the label props.text to the memory tag.