EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-02-22 11:01 PM . Last Modified: 2023-05-02 11:48 PM
Hello,
In Geo SCADA, I save some data hourly to the database. I put this data into filtering and sorting processes by assigning a SQL query to a button I have created, and I can display it in the format I want on the Historic List. The SQL query I wrote is as follows. Thanks to this query, I can reach a list like the one below when the Historic List is opened.
But I can't show this filtered list I created on trend.
TREND (TRACE(RawHistoric, 'Temperature',SOURCE('Point3.Historic')), XAXIS(RelativeLatest),YAXIS('Temperature'))
I found the above format while searching the help pages, but when I adapted it to my own list, I kept getting errors. The format I created and the error I got are as follows.
SCX:////Trend/TREND (TRACE(RawHistoric, 'Debi', SOURCE ('Title="Events"&InitialSQL="SELECT TOP( 3 ) ""RecordId"", ""RecordTime"" AS ""~Time"", ""Value"" FROM CDBHISTORIC WHERE ( ""~Time"" BETWEEN { OPC ''H-23H'' } AND { OPC ''H+1H'' } ) AND ( ""Id"" = 35088 ) ORDER BY ""Value"" ASC"'')), XAXIS (RelativeLatest), YAXIS (‘Debi'))
In addition, I tried to create a "New User Query" and use the same query and format to create a trend with the help of the button to reach the solution for the issue I mentioned. But when I click on the button, although the trend is opened, it does not show any data, I am encountering a situation like the signal I have marked below.
How can I resolve this situation? Can you help me?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-02-23 12:54 AM . Last Modified: 2023-02-23 01:51 AM
Historic trends use OPC HDA items as the source for their data. The SOURCE element of a TRENDSPEC is the name of an OPC HDA item. Trends do not support using an SQL query as the source of their data.
OPC HDA only supports filtering by OPC data quality (good, uncertain, bad) and time range.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-02-23 01:32 AM
So what can I write as Source? I know that it is not possible to make permanent changes in the Historic List. In other words, when I edit the SQL query in the signal I created, if I close and open that page, it is reset again and the query is back to its original state. That's why I can't do it directly by assigning the signal to the train.
If so, what is the alternative way to trend the filtered data on the Historic List or filter the data directly in the trend? Is it possible to do this with the help of script? I'm waiting for your help.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-02-23 01:46 AM . Last Modified: 2023-02-23 01:49 AM
As I said you can only filter historic trends by OPC data quality (good, uncertain, bad) and time range, nothing else.
The source for a historic trend is just the name of the OPC HDA item to be displayed, e.g. "Group.SubGroup.PointName.Historic".
To build your own lists just create a mimic containing an embedded list with the required SQL query.
Alternatively, save the list as a favourite or create a button on a mimic with a hyperlink pick action to the list.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-02-23 03:53 AM
I guess I didn't explain. Actually, I don't have a problem with the list. I can handle the listing issue as I want using a query and via the button. However, I'm having a problem displaying this list on trend. As far as I know, the trend is actually the charted version of the 'Historic List' and if the list can be created, shouldn't the trend of this list also be created?
I have shown below as an example what I want to do. I transferred the hourly values I received for a day to the train. 24 points prove this. 4, 5, and 6 A.M. The 3 values marked in green, which belong to, are actually the values that I want to show in this trend. The 21 values I marked in red represent values that do not need to be displayed in the trend. I just want to draw a minimum of 3 values at 4, 5 and 6 A.M. The remaining values can either not be shown in the trend at all, or all values can be shown by marking the green values in some way.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-11 09:25 PM
You essentially need to create a new Internal Analog Point, and then use logic in some manner to update its value (or write directly to the historic value) as you want.
The trend engine is designed to show you historical values of points. If you want different historical values shown, you will need to hand customise those historical values (against different points).
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.