Back

Topic

[KB550]How to temporarily disable database archiving

Tags: HDS, Scripting, VBA

13 years ago
By ACHT
Options
Print
Applies to:

PcVue version 8.10 onwards


Summary:

This article describes how to pause and resume HDS database archiving using VBA. (For proprietary archive units you must use the SCADA Basic instruction HISTORY.)


Details:

Prerequisites

  1. Open PcVue
  2. Open the Visual Basic Editor (Display > Visual Basic Editor)
  3. Enable the “HDS Management Library” (Tools > References ) in the context you want to use it (workspace, mimic)

Declaration

objHDS = Instance of HDSMgt class
DB = Name of database in PcVue
PauseButton = Button in mimic to disable archiving
ResumeButton = Button in mimic to resume archiving after disabling
_click = “click” – event for the buttons

Code

‘——-Initialize new HDS Management Class (e.g. in general context)
Public objHDS As New HDSMgt
‘——-Buttons with click-events
‘——-PauseButton
Private Sub PauseButton_Click()
  Main.ThisProject.objHDS.Databases(“DB”).PauseRecording
  MsgBox “DB paused recording“
End Sub

‘——–ResumeButton
Private Sub ResumeButton_Click()
  Main.ThisProject.objHDS.Databases(“DB “).ResumeRecording
  MsgBox “DB resumed recording“
End Sub


Created on: 09 Mar 2012 Last update: 13 May 2024