Hello,
I am trying to restart an archive manager using internal DP _Managers.Exit and convManIdToInt() function.
The problem is, that I can't find corresponding manager type constant.
Is there a way to find ID for my archive manager, so I could restart it with CTRL script?
Restart an archive manager
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Restart an archive manager
Hello,
restarting the archive managers using the datapoint element _Managers.Exit does not work.
The archive manager has no connection to the event manager. Using _Managers.Exit only processes can be stopped which are connected to the event manager.
Why do you want to restart the archive manager?
Are you using a redundant system?
Best Regards
Leopold Knipp
Senior Support Specialist
restarting the archive managers using the datapoint element _Managers.Exit does not work.
The archive manager has no connection to the event manager. Using _Managers.Exit only processes can be stopped which are connected to the event manager.
Why do you want to restart the archive manager?
Are you using a redundant system?
Best Regards
Leopold Knipp
Senior Support Specialist
- LIGO
- Posts:27
- Joined: Tue Aug 02, 2016 1:57 pm
Re: Restart an archive manager
No, we are using a standard system, not a redundant one.
In our project we decided to divide our archive to several files, which are stored under different paths.
That is because we are working with data from equipment tests, which should be stored separately.
Later, by changing the main path to archive (at DP _ValueArchive_x.general.filePathSet), we will have access only to the data that we want.
But the path change requiring archive manager restart. With the manual restart everything is working fine.
In our project we decided to divide our archive to several files, which are stored under different paths.
That is because we are working with data from equipment tests, which should be stored separately.
Later, by changing the main path to archive (at DP _ValueArchive_x.general.filePathSet), we will have access only to the data that we want.
But the path change requiring archive manager restart. With the manual restart everything is working fine.
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Restart an archive manager
Hello,
please note that changing the path for the value archives at the datapoint elements is not allowed.
The archive files have to be stored in the VA-directories inside of the project database (/db/wincc_oa).
To ensure that the archive and all its functions (panels, scripts) are working correctly the path must be set to an empty string.
Best Regards
Leopold Knipp
Senior Support Specialist
please note that changing the path for the value archives at the datapoint elements is not allowed.
The archive files have to be stored in the VA-directories inside of the project database (/db/wincc_oa).
To ensure that the archive and all its functions (panels, scripts) are working correctly the path must be set to an empty string.
Best Regards
Leopold Knipp
Senior Support Specialist
- LIGO
- Posts:27
- Joined: Tue Aug 02, 2016 1:57 pm
Re: Restart an archive manager
Thank you for information.
Then, is it possible (and permissible) to "divide" the archive using backup/restore method?
For example:
- do closed archive file backup;
- move backup file away;
- delete original file (using proper WinCC OA instruments);
- restore backup file on demand.
Then, is it possible (and permissible) to "divide" the archive using backup/restore method?
For example:
- do closed archive file backup;
- move backup file away;
- delete original file (using proper WinCC OA instruments);
- restore backup file on demand.
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Restart an archive manager
Since it is only for tests, you could also use a script to connect to the test data and write it to a file. This way you have complete control over it and the files could also be read by other programs.
- LIGO
- Posts:27
- Joined: Tue Aug 02, 2016 1:57 pm
Re: Restart an archive manager
It is possible that I said wrong, but "equipment test" means, that this is a main goal of our system (testing equipment on the stand).
So data should be stored properly and separately for every test.
Anyway, I wrote a script for backup/restore method described higher and it works.
It is taking some time for switching files and making backup but it is ok in our project.
So data should be stored properly and separately for every test.
Anyway, I wrote a script for backup/restore method described higher and it works.
It is taking some time for switching files and making backup but it is ok in our project.
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Restart an archive manager
Hello,
I'm not sure if your approach will work.
Restoring only single archive files will maybe work if the filenames are all identical.
If the filenames (created during a single test) will differ restoring the files will not work anymore.
Using a method using a backup database will only work if
1) a backup is made for the complete database when the test is finished using the WinCC OA online backup
2) copy the backup from the backup folder to a defined folder with an unique name
3) stop the project
4) remove the database in the WinCC OA project
5) restore a backup database
6) start the project
Best Regards
Leopold Knipp
Senior Support Specialist
I'm not sure if your approach will work.
Restoring only single archive files will maybe work if the filenames are all identical.
If the filenames (created during a single test) will differ restoring the files will not work anymore.
Using a method using a backup database will only work if
1) a backup is made for the complete database when the test is finished using the WinCC OA online backup
2) copy the backup from the backup folder to a defined folder with an unique name
3) stop the project
4) remove the database in the WinCC OA project
5) restore a backup database
6) start the project
Best Regards
Leopold Knipp
Senior Support Specialist
- LIGO
- Posts:27
- Joined: Tue Aug 02, 2016 1:57 pm
Re: Restart an archive manager
Thank you for reply,
but I can't understand why it can be a problem.
It can be done manually, isn't it? ( System management - Database - Database Configuration - - Activity - right arrow to backup or DIR + left arrow to restore).
So why it couldn't be done with a script? (of course with some work on scanning what archive files were created during test before backup etc.)
Also, I was trying to restore files after deleting original files (using _VADelete() or after automatic deletion because of reaching maximum number of archive files), and it succeed.
I understand, that it will be problematic to restore that files on another system, but it is not necessary. And your instructions would work in that case, I suppose.
but I can't understand why it can be a problem.
It can be done manually, isn't it? ( System management - Database - Database Configuration - - Activity - right arrow to backup or DIR + left arrow to restore).
So why it couldn't be done with a script? (of course with some work on scanning what archive files were created during test before backup etc.)
Also, I was trying to restore files after deleting original files (using _VADelete() or after automatic deletion because of reaching maximum number of archive files), and it succeed.
I understand, that it will be problematic to restore that files on another system, but it is not necessary. And your instructions would work in that case, I suppose.
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Restart an archive manager
Hello,
it will work with your approach if the database within the project is always the same, e.g. there is no restore made of a previous database.
When a new archive file is created or when it is compressed/backuped/restored) the information for the archive file (start time, end time, compression state, file state) is written to the archive index list AR_X (X is substituted with the archive number).
You can only restore files which are known by the system (information is stored in the index file).
To save data for a specific range of time you could follow the given procedure:
-- before starting the test a new archive files is created, e.g AR_0002_2016.09.17.-12.00.00
-- the test is made
-- when the test is finished again a new archive file is created, e.g. AR_0002_2016.09.17.-14.00.00
Data for the test procedure is stored in the file beginning with AR_0002_2016.09.17.-12.00.00 up to the fille created before AR_0002_2016.09.17.-14.00.00.
These files can be backuped and restored afterwards if data is needed.
You need to know which test was performed at which time to be able to identifiy the files which belong to a specific test.
Best Regards
Leopold Knipp
Senior Support Specialist
it will work with your approach if the database within the project is always the same, e.g. there is no restore made of a previous database.
When a new archive file is created or when it is compressed/backuped/restored) the information for the archive file (start time, end time, compression state, file state) is written to the archive index list AR_X (X is substituted with the archive number).
You can only restore files which are known by the system (information is stored in the index file).
To save data for a specific range of time you could follow the given procedure:
-- before starting the test a new archive files is created, e.g AR_0002_2016.09.17.-12.00.00
-- the test is made
-- when the test is finished again a new archive file is created, e.g. AR_0002_2016.09.17.-14.00.00
Data for the test procedure is stored in the file beginning with AR_0002_2016.09.17.-12.00.00 up to the fille created before AR_0002_2016.09.17.-14.00.00.
These files can be backuped and restored afterwards if data is needed.
You need to know which test was performed at which time to be able to identifiy the files which belong to a specific test.
Best Regards
Leopold Knipp
Senior Support Specialist