Overlapping Historical Trends (Edge)

I want to be able to log the amp draw of a motor during startup during the last 5 starts, and then display these trends overlapping on the same time-base chart (0-90sec). This is an edge panel, so I can't query the historical database (as there isn't one).

My first thought was to use parallel arrays of REALs inside the PLC to store this historical data and then bring them into Ignition to show them on an overlapping chart. However, I'm worried about the sheer volume of tags that this would require. The PLC would log the value every 60ms, up to 1500 samples (90 seconds total). 5 arrays would be used to hold the last 5 instances of previously logged values. So, we're talking 7500 tags (per motor) coming into Ignition. To limit the on-change tag reads to one array of values, I would use an integer that holds the "latest data index" so that only one array of values is updating at a time.

Is that many tags a bad idea? Is something like this really doable for an Edge panel, or is this something that just needs to be left to the supervisory system that has a full Ignition install?


Possibly, with careful scripting to generate a custom dataset from local tag history.

That's the way I'd lean.

What if the arrays of data just exist in the PLC and are not Ignition tags.

Would it be just (or almost just) as bad to use system.opc.readValues() to get only the arrays that are needed, when they are needed (i.e. when the window is opened), instead of subscribing to 7500 tags per motor?

And maybe 1500 is overkill. Might be able to get by with 900 at a 100ms rate.

Ugly. PLCs don't like vomiting up large amounts of data like databases can. You definitely don't want to subscribe to those tags. Using system.opc.readValues() on demand would be a lesser evil, but not great.

This is a job for history, plus a transform to align timestamps.

1 Like

I was thinking I could use a short periodic sample mode and log the time of the last 5 starts to use in the query. Then I don't have to do much work to align the timestamps.

1 Like