Vision Easy Chart - Correctly show a value change

I guess if you were to approach IA for something that would look about right for what you’re doing, it would be to ask for a pen type that replaces every point with two points x units to the left and right and renders a line between all points, representing measurement uncertainty.

It feels like there would be a lot of technical issues with this (what do you do when those points overlap with other points, what do you do when they go off the screen, etc), but it would look nice if you could set it to be based on x% of element width or something, I suppose.

That would be exactly what I'm looking for, basically the discrete pen style but, optionally, merged into analog pens.
For short periods of time it isn't important, but I do think not having this can be very misleading for large periods of stagnant data, which my client has already brought up.

I will submit a feature request

It can get technical, but it would be hard to answer things like that until code is available. Real-time makes things trickier, but historical should be easy enough with the first iteration of processing the data points.

I think this goes back to what I mentioned earlier about using the deadband to your advantage. Even if you only are worried about a 1/2 foot jump, your tag could scan at 20 or 30 seconds but you set your deadband to 1/2 foot and it won't do an entry unless it exceeds that. I would also utilize the max time between entries to limit your gaps. If your process has slow changes, you could even set it to every half hour or hour if you wanted to, to limit your entries to your database. If your max time between entries is every 30 minutes, thats at max 48 entries per day if you don't have much of a change in level. To me that is very minimal. But by having the deadband set to 1/2 ft(or whatever you want for a limit), if you make a sudden jump inside of that max time, you would still get an entry.

True, I agree that is minimal, and while not a perfect solution as the general problem still exists (Not a linear change in a 30 min timespan), it may address the problem without going script crazy.

I mean…
https://docs.inductiveautomation.com/display/DOC80/Custom+Tag+History+Aggregates
You’re welcome to come up with your own aggregation function(s).

2 Likes

Thanks, that may do what I need.
Is it possible to use a custom aggregate from a statically configured pen via the EasyChart customizer? Or does it have to be done through python like the examples show?

Can you help by providing a working example of a custom Aggregate? I’ve been trying to test the one on the link with no success, not sure what I am doing wrong.

Here’s the code

shared script:

this is a simple count function, called for each value in a time window

def myCount(qval, interpolated, finished, blockContext, queryContext):
cnt = blockContext.getOrDefault(‘cnt’,0)
if qval.quality.isGood():
blockContext[‘cnt’]=int(cnt)+1

if finished:
    return blockContext.getOrDefault('cnt', 0)

Script on Button:

dataSet = system.tag.queryTagHistory(paths=[’[RobotDashboard_ARS]ars a/robot 5/ps’], rangeHours=48, aggregationModes=[‘shared.aggregates.myCount’], returnSize = 0)

event.source.parent.getComponent(‘Table 1’).data = dataSet.

So far it just returns the values of dataset in the time frame, and if I modify (or even erase the shared script) the result is exactly the same.

Thanks.

I’m not sure it fits exactly the entire set of requirements, anyway I’d like to share that I got the same need and I could got it by setting the DeadBand Style of my tag to Discrete (instead of Auto or Analog)

Referring to the point of analog value, sensor resolution, etc, in my case the need was to show a reference point given to a Temperature control loop, so the step change was a real step change, because changed in a PLC scantime and it’s not an analog measure. I mean, a “step change” could be real

2 Likes

This fixed it