Please how do i export HISTORICAL DATA from clearscada to a CSV file. I want it to be in form of a button, when the user wants to export he can click the button and inputs the period for which he wants to export the historical data. Please is this possible?
Solved! Go to Solution.
Sure, lots of ways, the best way really depends what you want to do with the CSV file afterwards
* Use the CSV Export driver, but may not be as flexible that you need
* Use logic, use VAR INPUT to define the time and %S to query the data from CDBHistoric, then use and FILE_WRITE() functions. This will store the file on the server and has the advantage that it can be both scheduled and manually triggered, but again lose some flexibility on defining the source point
* Use scripting on mimics. Use the Form object or similar to prompt for date inputs, Server.Query to get the data from CDBHistoric and create a COM object to fso to write files to the local workstation's disk. Probably lots more flexibility with this one but more coding required
The first option - the facility is called 'SQL Expert' - find the object in the Create ... New ... Other menu.
Any SQL can be written which exports that data in CSV (or tab) into a file. This can be scheduled or triggered from the client.
Note that option 1 may or may not work on WebX, and on Virtual ViewX will write a file on the web server.
(This thread should be in the Geo SCADA forum, but I don't see an option to move a thread. 🙂 )
Yeah i have tried the SQL export, but its not as flexible as i want, the Client cannot specify the date range in which he wants to export the historical data and also, it doesnt save each export in a new CSV file, it overwrites the old one.
When i do this, does it export in a new csv file with the new time specification? Although i tried this format"%Ddd MMM yyyy% %THH:mm:ss%" and it kept giving me "Invalid OPC relative time for trip sequence", this was the format that worked e.g D-2D or H
It worked!, so i used the %THH mm ss% format in the Output filename. It creates a new file now. Thanks! Prolly try to figure out how the client can specify the Date range he/she wants.
Hi, does this topic relate to https://www.se.com/ww/en/faqs/FA312272/
Also, does a .HRD / .csv file contain historic data relating to all points with historic data? I have not seen one of these files structure just yet.
(I notice, by week, yes?)