Unable to configure extreme value discarding.
-
Hi Gary,
This depends on the version you are using. If you are using an older version it will be a bit different. This document will how you how to configure data sources and data points in the latest versions.
Let me know if this helps,
Joel.
Attachment: download link
-
Hi Joel,
Thank you for your reply. The file looks like other information I've already discovered as it includes a screen shot of the 'Discard extreme values' functionality that I want to use. I am not seeing that same screen content so I am no closer to solving my problem.
Has 'Discard extreme values' been introduced since 2.1.3?
The highest version number in the RELEASE-NOTES file is 2.1.3. Is there a better way to determine the version of Mango I am using?
Would upgrading to the latest version fix this issue?
And will it also solve this problem I had to work around:
In this code, p1.lastValue(0).value refers to a meta data point of type Binary. It returns 2 every single time regardless of input value:```
if (!p1.lastValue(0).value) {
return 1;
}
return 2;The following modifications to line 1 also exhibit the same problem:``` if (!(p1.lastValue(0).value)) {
if (!Boolean(p1.lastValue(0).value)) {
if (!(Boolean(p1.lastValue(0).value))) { ``` Regards, Gary
-
Additional note relating to the logical not operator problem: I have confirmed that I am seeing both true and false values as inputs by immediately returning the input:```
return p1.lastValue(0).value;
-
Hi Gary,
I would recommend upgrading to 2.2.2 as there are some nice new features and improvements. Can you post a screen shot of what your data point configuration looks like? It should be pretty much the same in 2.1.0
Thanks,
Joel. -
Hi Gary,
When going through the "lastValue" mechanism (which on certain older versions is the only way I know to get values in scripts from binaries, but that has since been fixed such that point.value works), you get a "PointValueTime" object that's a container for any of the kinds of data points. To get a boolean, you can either call point.lastValue(0).getBooleanValue() or point.lastValue(0).booleanValue . Just "getValue" gives you a "DataValue" object.
In situations like this with unknown attributes, a little script like:
out = ""; for(prop in b.lastValue(0)) { out += prop + " "; } return out
Can help make discovering those things easier inline. Those are wrappers for Mango classes whose source can be found in the 'dataImage' package in the public core.
-
JoelHaggar, please find a screen shot at https://www.flickr.com/photos/122215635@N06/
Thank you phildunlap, I shall try that.
-
I have some further information about the problem.
The missing fields under 'logging properties' appear if I change the return data type from Multistate to Number. I can then enter the details and save the data point but it still fails to filter values outside of the allowed range. Inspecting the data point configuration again shows the 'Discard extreme values' box is unticked.
A previous version of Mango Automation installed upon my colleagues laptop works fine.
Exporting nodes, changing the JSON and reimporting does not overcome the problem.
-
I think we already fixed this bug in 2.2.0:
http://store.infiniteautomation.com/core/2.2.2
- Fixed bugs on Data Point Settings tab where both the Purge Override settings and Discarding Extreme Values were not saving.
Please upgrade and see if that resolve it. If you want to use this feature I think your point needs to be a numeric point. It may be possible for us to allow this feature for multi-state points as well but that's not really how multistate points are designed to work.
Thanks,
Joel. -
Excellent news. Thanks so much for your help. I'll see how our systems admin is getting on with the upgrade.
I'll switch data type to numeric as it is not a problem. I had simply selected what I understood to be a pseudonym for integer as my return values are integers, not floats.