| Dettagli del download |
|
ExportHistDataToCSV is a project designed to show how to export historical data from a relational database to a text file in the CSV format. It is assumed that the computer on which this project runs is equipped with Microsoft SQL Server with its instance named SQLEXPRESS and credentials preset when installing SQL Server from Reliance Add-On Pack. In case SQL Server has been installed in another way, it is necessary to customize the connection string (Project Options > SQL) and the value of the constant c_ConnectionString in the Define_DataExport script. A data table named IncrementalData is defined through the Data Table Manager. The Reliance SCADA system logs the table's data to the table named IncData contained in the database R_ExportHistDataToCSV in Microsoft SQL Server running on the same computer (both the database and the table will be created with Reliance once the project is started for the first time). To export the historical data to the file, scripts defined through the Script Manager are used. The export itself is performed by calling the ExportHistDataToCSV procedure, whose definition is contained in the Define_DataExport script. The name of a physical table (in this case, it is "IncData", see the ExportHistDataToCSV script) is passed as a parameter to the procedure. In the same way, it would be possible to export historical data from any other table if multiple tables were contained in the database (it would be enough to pass the name of this table as a parameter to the procedure). You can export either all the data logged to the table or data from a specific time period (time range). This can be configured in the visualization window named MainWindow. To export all data, deactivate the options Start and End. Otherwise, activate the options Start and/or End and enter the time range's start and/or end. Data export can be invoked by clicking on the Export button (this will run the ExportHistDataToCSV script). |
|
|||||||||||||||||||||||||||||||||

Gli esempi presenti su questo sito sono stati liberamente inviati dagli utenti di automationforum.it, è stato espressamente specificato loro di inviare solo esempi FREE. Automationforum.it non si ritiene responsabile dell'eventuale presenza di esempi rilasciati sotto licenza commerciale, Automationforum.it invita tutti coloro che individuano esempi rilasciati sotto licenza commerciale presenti in questa raccolta a segnalarlo dall'apposito