Back

Topic

[KB621]Periodic Trend Recording (svmgrHisTrendPeriod.dll)

Tags: Archives

12 years ago
By RM
Options
Print
Applies to:

PcVue version 8.10 onwards.
From PcVue version 11.0 onwards periodic recording is available as a standard configuration option.


Summary:

The svmgrHisTrendPeriod DLL allows you to force the periodic recording of Register and Bit variables using the historic data system. (Normally variables are only recorded on exception).


Details:

Introduction

The svmgrHisTrendPeriod DLL is an add-on developed with the SV Manager Toolkit. Itallows you to force the periodic recording of Register and Bit variables using the historic data system. (Normally variables are only recorded on exception). The mechanism used is to update the value timestamp of each concerned variable. The historic data recording system sees this as a change and records the value and timestamp as it does with the normal exception recording.

The DLL must be located in the BIN folder of the Supervisor. (From version 10.0 this is done as part of the Supervisor’s installation.) The DLL is enabled by creating a user manager initialisation file UsrMgr.dat, also located in the BIN folder. The file must contain the following lines.

[USRMGR\svmgrHisTrendPeriod]
DLL=svmgrHisTrendPeriod.dll

Recording properties are configured by an INI file HistoBlankMgr.ini located in the project’s C folder. The INI file is only read at start-up.

Recording mechanisms

The svmgrHisTrendPeriod DLL supports two recording mechanisms.

  • Periodic – Selected variables are recorded at a specified interval. Only one interval can be configured.
  • Single shot – Selected variables are recorded with a specific timestamp triggered by a change in value of a trigger variable. (Useful for recording values at the end of each day for example.)

Recording can either be of the actual variables concerned, or of a clone of the variable (specified by appending a fixed string to the name). The advantage of recording in a clone of the variable is that the clone will only have periodic recording. If you record in the same variable it will have both periodic recording plus the normal exception driven recording.

INI File: HistoBlankMgr.ini

The .INI file has the following parameters:

[HIS_PERIODTREND1]
AttributeNumber                  = 3
AttributeValue                     = P10
Period                                = 10
Synchronize                        = 60
Suffix                                 = _HISTO
TriggerVariableName           = His.TrendTrigger
TimeStamped                     = 23:59:59
Dateshift                            = 0
NotifyTriggerVariableName  = His.Notify
TriggerActivateTrace          = 1

AttributeNumber – The identity of one of the Supervisor’s variables extended attributes. Used in conjunction with AttributeValue to identify which variables are to be recorded.
Format: Number – range 3 to 16. Default 3.

AttributeValue – The text in this property is matched against the text in each of the Supervisor’s variable’s extended attribute AttributeNumber to determine if it is to be recorded.
Format: Text – Default BILAN

Period: – The period, in seconds, at which the selected variables are updated.
Format: Number – range 0 to 9999 seconds. 0 deactivates periodic recording. Default 60.

Synchronize: A period after the start of PcVue after which recording starts. The period determines at exactly which second past the minute recording takes place. The possible values are:
-1 – Deactivates periodic recording.1 – On the second.
5 – On the 5th second – 0, 5, 10, 15… 55 seconds past the minute.
15 – On the 15th second – 0, 15 or 45 seconds past the minute.
30 – On the 30th second – 0 or 30 seconds past the minute.
60 – On the minute.
Any other value will produce a message error in the log viewer.
Format: Number. Default 1.

Suffix: The suffix to be used for the clone variables for the periodic recording. If it this property doesn’t exist, or it is left empty, the original variables will be used.
Format: Text.

TriggerVariableName: The name of the bit variable to be used as the trigger for single shot recording. When the variable changes from 0 to 1 it will trigger the writing of all advised variables. (Note: Nothing will happen if the previous state was NS.)
Format: Text. Default TriggerBit

TimeStamped: The timestamp to be written when using single shot recording. This time will be written to all the clone variables.
Format: hh:mm:ss. Default 00:00:00

Dateshift: The dateshift is used is to add an offset in days to the timestamp.
Format: Number -1, 0 or 1 are the only allowed values. Default 0.

NotifyTriggerVariableName: The name of a bit or register variable that will be set to 1 when all advised variables are updated.
Format: Text. Default NotifyVar.

ActivateTrace: Enable (1) or disable (0) traces in the Event Viewer.
Format: Number. Default 1.

Example of the file HistoBlankMgr.ini

————————————————————-

[HIS_PERIODTREND1]
AttributeNumber                    =3
AttributeValue                       = Period
TriggerVariableName             = Triggerbit
TimeStamped                        = 18:40:00
Period                                   = 0010
Synchronize                            =60
Suffix                                    = _History
NotifyTriggerVariableName      = NotifyVar
ActivateTrace                          = 1

————————————————————-

This file defines all the Supervisor’s variables that will advise the DLL with the attribute number “3” and value “Period”, and will write to the clone variables (note that clone variables must not have enabled attributes!) with the suffix _History. The recording will synchronise at 60 seconds and will record every 10 seconds thereafter.

The resulting recording might look like this in a Trend Viewer.

histoblankmgr_s

Download attachments:


Created on: 11 Jan 2013 Last update: 04 Sep 2024