Chart's not working
-
@phildunlap I will paste below the JSON code for the data sources:
{
"dataSources":[
{
"xid":"DS_4dc309c5-8959-488a-a217-c3d8e26b26e0",
"name":"testBACnet",
"enabled":true,
"type":"BACnetIP",
"alarmLevels":{
"INITIALIZATION_EXCEPTION":"URGENT",
"POLL_ABORTED":"URGENT",
"DEVICE_EXCEPTION":"URGENT",
"MESSAGE_EXCEPTION":"URGENT"
},
"purgeType":"YEARS",
"updatePeriodType":"SECONDS",
"covSubscriptionTimeoutMinutes":60,
"localDeviceConfig":"68e37f9e-7aa7-431f-a9bb-fe2b5d77bce1",
"updatePeriods":5,
"editPermission":"",
"purgeOverride":false,
"purgePeriod":1
}
]
}This is for the MangoES that works, and below I'll put for the one that don't work:
{
"dataSources":[
{
"xid":"DS_4dc309c5-8959-488a-a217-c3d8e26b26e0",
"name":"testBACnet",
"enabled":true,
"type":"BACnetIP",
"alarmLevels":{
"INITIALIZATION_EXCEPTION":"URGENT",
"POLL_ABORTED":"URGENT",
"DEVICE_EXCEPTION":"URGENT",
"MESSAGE_EXCEPTION":"URGENT"
},
"purgeType":"YEARS",
"updatePeriodType":"SECONDS",
"covSubscriptionTimeoutMinutes":60,
"localDeviceConfig":"68e37f9e-7aa7-431f-a9bb-fe2b5d77bce1",
"updatePeriods":5,
"editPermission":"",
"purgeOverride":false,
"purgePeriod":1
}
]
}And below is the JSON code for the point:
{
"dataPoints":[
{
"xid":"A100",
"name":"CTWaterConsumption",
"enabled":true,
"loggingType":"INTERVAL",
"intervalLoggingPeriodType":"MINUTES",
"intervalLoggingType":"INSTANT",
"purgeType":"YEARS",
"pointLocator":{
"dataType":"NUMERIC",
"objectType":"ANALOG_VALUE",
"propertyIdentifier":"present-value",
"objectInstanceNumber":100,
"remoteDeviceInstanceNumber":140,
"settable":false,
"useCovSubscription":false,
"writePriority":16
},
"eventDetectors":[
],
"plotType":"SPLINE",
"rollup":"NONE",
"unit":"",
"templateXid":"Numeric 3min Integer",
"simplifyType":"NONE",
"chartColour":"black",
"chartRenderer":{
"type":"IMAGE",
"timePeriodType":"DAYS",
"numberOfPeriods":1
},
"dataSourceXid":"DS_4dc309c5-8959-488a-a217-c3d8e26b26e0",
"defaultCacheSize":1,
"deviceName":"testBACnet",
"discardExtremeValues":false,
"discardHighLimit":1.7976931348623157E308,
"discardLowLimit":-1.7976931348623157E308,
"intervalLoggingPeriod":3,
"intervalLoggingSampleWindowSize":0,
"overrideIntervalLoggingSamples":false,
"preventSetExtremeValues":false,
"purgeOverride":false,
"purgePeriod":1,
"readPermission":"test",
"setExtremeHighLimit":1.7976931348623157E308,
"setExtremeLowLimit":-1.7976931348623157E308,
"setPermission":null,
"tags":{
},
"textRenderer":{
"type":"ANALOG",
"useUnitAsSuffix":true,
"unit":"",
"renderedUnit":"",
"format":"0"
},
"tolerance":0.0
}
]
}This is for the MangoES that works, and below I'll put for the one that don't work:
{
"dataPoints":[
{
"xid":"A100",
"name":"CTWaterConsumption",
"enabled":true,
"loggingType":"INTERVAL",
"intervalLoggingPeriodType":"MINUTES",
"intervalLoggingType":"INSTANT",
"purgeType":"YEARS",
"pointLocator":{
"dataType":"NUMERIC",
"objectType":"ANALOG_VALUE",
"propertyIdentifier":"present-value",
"objectInstanceNumber":100,
"remoteDeviceInstanceNumber":140,
"settable":false,
"useCovSubscription":false,
"writePriority":16
},
"eventDetectors":[
],
"plotType":"SPLINE",
"rollup":"NONE",
"unit":"",
"templateXid":"Numeric 3min Integer",
"simplifyType":"NONE",
"chartColour":"black",
"chartRenderer":{
"type":"IMAGE",
"timePeriodType":"DAYS",
"numberOfPeriods":1
},
"dataSourceXid":"DS_4dc309c5-8959-488a-a217-c3d8e26b26e0",
"defaultCacheSize":1,
"deviceName":"testBACnet",
"discardExtremeValues":false,
"discardHighLimit":1.7976931348623157E308,
"discardLowLimit":-1.7976931348623157E308,
"intervalLoggingPeriod":3,
"intervalLoggingSampleWindowSize":0,
"overrideIntervalLoggingSamples":false,
"preventSetExtremeValues":false,
"purgeOverride":false,
"purgePeriod":1,
"readPermission":"test",
"setExtremeHighLimit":1.7976931348623157E308,
"setExtremeLowLimit":-1.7976931348623157E308,
"setPermission":null,
"tags":{
},
"textRenderer":{
"type":"ANALOG",
"useUnitAsSuffix":true,
"unit":"",
"renderedUnit":"",
"format":"0"
},
"tolerance":0.0
}
]
}Also, will be a good idea to purge any point values to see if this is the reason? Maybe is there a value that is corrupted or something...
-
That JSON definitely does look to be the same. I assume you are an admin and it can't be a permissions issue with your other user not having 'test' permission.
Also, will be a good idea to purge any point values to see if this is the reason? Maybe is there a value that is corrupted or something...
That is a distinct possibility. You could check that without purging though, by downloading a failing series's data over the same range. I think NaN, Infinity, and -Infinity could pose problems for the chart. If the download fails then there could be something wrong with the data records and I would have expected the corruption to either fix itself or report a log message about it's inability to do so. If there is no log message and the download fails, you could restart Mango on the command line so that anything that could be going to stderr would be going to your console and try again, or just purge the point's data in that range and be done with it. Do these points chart properly on other pages?
-
@phildunlap Yes, I'm logged in with admin.
And to your last question, I don't have them in other pages, this is the only page where they are.
By downloading a failing series you are referring to that function to download the point data from the data_point_detail page, from mango interface? I've downloaded an excel document for the both points, from both MangoES, and I don't have any NaN or Infinity, only numbers.
-
By downloading a failing series you are referring to that function to download the point data from the data_point_detail page, from mango interface? I've downloaded an excel document for the both points, from both MangoES, and I don't have any NaN or Infinity, only numbers.
Yeah, or the watchlist or the new data point details page. Any place would have worked. The /data_points_details.shtm page does let you download the raw data.
Hmm. Then let's consider maybe your browser has cached something on the unit that is not working. Have you tried clearing your site data? If you do a hard refresh or open the page with the developer tools open and 'disable cache when developer tools are open' checked, that would work too.
After that there's really not a lot left than checking your Mango/overrides/ directory to see if anything is different. Or dropping a breakpoint where you're populating that array and stepping around to see which call is getting you different arrays.
-
@phildunlap I'm working a lot with the developer tools, and I clear the cash often.
Just now I've noticed that on that MangoES where the points are not working properly I have a lot of discarded polls, 99%.
Both MangoES get the data from the same PLC via BACnet IP, it's this a problem?
-
So one of your data sets is much sparser?
Literally the same PLC or just the exact same model of PLC? If literally the same PLC and they're on the same network it would be an error to have your local devices using the same local device ID. I'm not sure exactly how that would manifest, but I wouldn't think that it having sparse data is the answer to why it is null in your code, unless your setup requires there to be values to populate that array (not using a rollup that would have a value even without a value in the period? Not checking that values exist?). But, I would expect no issues polling the same BACnet IP device provided the Local Device on both ES's was configured to have a different device ID. As your data sources do have the same XID for the BACnet local device config, I guess this seems somewhat probable to be an issue.
-
@phildunlap Yes, it's literally the same PLC an they are on the same network.
-
@phildunlap What do you suggest? I can give you access to both MangoES if you want to.
-
Did you fix the BACnet local device issue? You would do that on the /system_settings.shtm page in the BACnet Local Devices section. They should not have the same device ID.
I believe DiagramCtrl is your code, yes? That array where you are taking an index of an then assessing the .value of something that is undefined, have you tried to examine how that array got populated? It's generally not sustainable for us to log into customer systems to troubleshoot customer code for free, but if you want to email the credentials to support@infiniteautomation.com we may choose to look without making any guarantees implied or otherwise.
I suggest focusing on why the array you think has things in it does not. And fixing the BACnet local device IDs to be different. It doesn't sound like it's an issue with our code, since you can fetch the values from the tools we provided to get the data. It's in the array you've built that the issue is, it seems.
-
@phildunlap Hi, I've made the changes in the /system_settings.shtm page, I changed the Device ID and the Data Source XID but I get a lot of discarded polls...
Any idea why?
Thank you!
-
Is it reading the values when it is not discarding the polls? Is it reliably the same device discarding the polls? If so I would encourage you check the wiring of the whole setup. If you disconnect the one that is not discarding polls, does anything change for the one that is?
-
@phildunlap Yes, is reading the values when is not discarding the polls.
I've noticed that if I change the Data Source XID, 6 minutes after I've changed the XID the Data Source is working and I have successful polls but after that I get only Discarded polls.
-
That sounds like something might be getting stuck somewhere, maybe? Can you go to the
/rest/v1/threads?asFile=true&stackDepth=40
API endpoint a few time when you are experiencing the aborted polls and email the resulting json files to support@infiniteautomation.com ?If you expand the runtime status of the data source (above the properties on the data source edit page), do you see it having a completed poll recently? What is the typical poll time?
-
@phildunlap Hi, I've disconnected the other MangoES from the network, now I have only one that is getting data from the PLC, and I let it to run a while and I don't have any discarded polls.
Thank you!