Data Point - No Update "Alarm"
@mihairosu I guess I already have these meta data points existing.
How do I delete the existing script so I can just set it using the event handler?
I can't seem to be able to simply delete the script and save the point.
Turbo last edited by
@mihairosu For a metapoint, you need something in the script- You can just return the input value- Set variable name to my, set your input to update the context, and then just "return my" in the script body. This creates an empty meta point that just returns the value that you originally put into it.
MattFox last edited by MattFox
- Create your virtual datapoint
- Go to the datapoint list in the datasource page for the datapoint you are monitoring
- Click on the menu at the far right on the datapoint in question and select event handlers,
- set event type to no update
- add the type to set point and choose your virtual datapoint
cwangv last edited by
this is new feature.
CraigWeb last edited by
new Date() returns a date object.
The method requires a timstamp pointValuesSince(timestamp, cache): PointValueTime,
I didnt have the time to test this but this is what I think you script should be:
var now = Date.now() //returns the timestamp of now var minuteAgo = now - 60000//the timestamp of 1minute ago var data = p.pointValuesSince(minuteAgo, true); if(data.length > 0) return 0 return 1
Thank you everyone.
I was able to figure out that I needed to create the Event Detectors / Handlers and Virtual Points on the same device on which the data originates (a remote MangoGT). Then I can push the virtual data points I am interested in to our central server.
I was trying to do this on our central server, and create an event detector on one of the points being synced via persistent TCP sync, but it was not working there.
I am having issue with the "No Update" event detector. It seems to be malfunctioning.
This is on Mango v3: core 3.7.12.
Here's what I'm trying to do:
This same logic is applied to 5 different points, but some of them (currently 2) seem to be malfunctioning. I am showing an example of 1 of 2 that are not working at this moment.
Here is the device: BoilerMember3 and the data points.
The event detector is located on Alarm Status. As can be seen, the point is being updated every 15 sec and the most recent data is from 15:18:00, which is up to date, as seen on this screenshot.
The alarms page shows that this point's event detector, which is No Update, has been Active for 1.21 days ago, because of "target point is missing or disabled":
Data point is enabled:
Event detector is set:
Event handler is set to change a virtual data point:
Configuration of the virtual data point:
However, as can be seen in the first screenshot, this data point is now set as Active and this "Communication Failed", but this is incorrect because the Alarm data point has recent data and has been updating properly.
MattFox last edited by
@mihairosu your event types are set to no change in that picture. If the value is the same then alarm will be triggered.
CraigWeb last edited by
@mihairosu ye as @MattFox mentioned your current detector only looks for a change in value, using a no update is what you should be using. An update is considered a successful poll for polling data sources or a successful parse of a new value for listening data sources even if the point does not get logged.
Uh oh, that's a mistake on my part.
Thanks for catching that!