From OpenSCADAWiki
Jump to: navigation, search
Other languages:
English • ‎mRussian • ‎Українська

The task of transferring configuration from one OpenSCADA project to another is often in demand. Moreover, most often it is necessary to carry out a partial transfer, for example, the transfer of individual developments that may be required in new project.

It should be noted that any developments with the slightest hint, and the prospect of re-use should be unified and stored in the separate-own library storages-DB.

At.png It is very not recommended to change the default configurations and elements of the standard libraries, and save your own-new libraries and elements in the storages of standard libraries. This will subsequently allow you to unhindered update the standard libraries, as well as simply use the developments of your previous projects.

1 Simple transferring of the storage with libraries and configurations

If you took into account the above recommendations and all your uniform developments are contained in a separate storage-DB, then the entire transferring process will consist in copying and connecting the storage in a new project or in it simple connecting for network DBMS.

The procedure for copying the storage-DB depends on the type of the storage and should be read in the relevant documentation.

SQLite databases in the form of separate *.db files are usually used for concomitant distribution with OpenSCADA distributions. Copying of the SQLite database, respectively, is the simple copying of the the required database file from the project-database folder of the old project to the project folder of the new one.

Connection is made by creating a new database object in the module of the required type of the subsystem "DB" and its subsequent configuration (read more). After the DB creation, configuration and enabling you can immediately download the DB data from it by clicking the "Load the program from this DB" on the form of the database object. However, this only involves loading, without enabling-starting the downloaded objects, so that may be easier to restart OpenSCADA.

2 Separation of the desired configuration

If the desired configuration is contained in the Generic Storage or in the storage of the standard libraries, you need to move it to a different storage. You can move the configuration either to a different storage with your libraries or to the export storage. The export storage, unlike to the library one, only serves to transfer the configuration and will be deleted subsequently. In any case, you must create a new storage of the desired type like to the connection procedure above. To transfer you should use the type that you plan to use in the new project. Usually, it is better to use the SQLite database type for the transfer, because of the simple copying procedure for it. However, if you use a network DBMS, the procedure may transform to the simple connection of the library or export storage to the new project.

Next you must separate the configuration in the library storage of unifying or export, if it can not be directly stored in the storage. Some parameter templates or controller parameters of the data acquisition, visual elements of the widget libraries, etc. can be separated by creating a library of export or unifying of the corresponding element. For the new library as a storage should be specified the previously created storage of unifying or export. Further you should copy the necessary elements from the original library to the library of unifying-export via the standard copy function. After copying the unifying-export library must be saved and its content will be appeared in the new storage.

If necessary to transfer an object with the separate DB field or entire libraries, the operation of creating the intermediate library and subsequent copying can be omitted. It is enough in the DB field to specify the previously created storage of unifying or export and save the element. Then a button will appear next to delete object data from the previous storage, which you can use if this operation is performed within a single project to separate the configuration to an other storage.

Further action, that is the simple transferring the storage, are performed in accordance with the previous section.

When you transfer the configuration by exporting it is necessary to perform the reverse process of copying from the export libraries to the local libraries of a new project and deleting of the export storage.

3 Low-level copy of the DB content

For transfer you can use selective copy of the DB tables with configuration by: select the table objects in the DB object, call the copy command, select the object of the new DB and call the past command (read more). However, it can be necessary to know the DB structure, about which you can read here.