Nothing Special   »   [go: up one dir, main page]

How To Implement Time Considerations With AVEVA Historian and IDAS Systems - Industrial Software Solutions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

How to Implement Time Considerations

with AVEVA Historian and IDAS Systems


AVEVA Historian

Tech Note: ISS-TN089


Published Date: March 22, 2009
Primary Product: Historian Server
Revision Date: May 10, 2022

SUMMARY
When working with AVEVA Historian and Remote IDAS, it is important to take time into
serious consideration. With IDAS historical data storage there is a term called the “Real-
Time Window“, which is a period of time behind and ahead of the AVEVA Historian system
time, where values coming into the system are considered “valid” and will be stored properly.

With AVEVA Historian, the real-time window can be any value coming into the system
between -30 seconds and +999 milliseconds. Time offset and discarded data can be a result
of improper time synchronization. The purpose of this document is to help identify time
issues between your AVEVA Historian and remote IDAS machines and correct them.

NOTE: This does not apply to MDAS storage. MDAS design is speciPc to late data. For the
purposes of this document, we are using a local IDAS. In practice, these steps will actually
apply to a Remote IDAS system (i.e. where the IDAS is not installed on the same node as
Historian).

APPLIES TO
AVEVA Historian (previously known as IndustrialSQL Server or InSQL) – all versions
Remote IDAS Systems

CONDITION
If you are experiencing Time Synchronization Issues, you will see messages like the
:
following in your System Platform Management Console (SMC) logs:

Time Sync Warning Message Type 1

Attempt to store values in the future; timestamps were overwritten with current time
(WINDOWS10VM, 242, 2022/04/19 12:21:12.108, 2) [WINDOWS10VM; pipeserver.cpp; 2073;
318530]

Where 2022/04/19 12:21:12.108 is the current time on the Historian which was used to
overwrite the timestamp by the source, and 2 is the time, in seconds, that the supplied
timestamp was ahead of the server time

Time Sync Warning Message Type 2

Values in the past did not Pt within the realtime window; discarding data
(WINDOWS10VM, 242, 2022/04/19 12:21:12.108, 2022/04/19 12:27:13.714) [CLVSRVR04;
pipeserver.cpp; 2629; 3]

Where WINDOWS10VM is the node sending data, 242 is the wwTagKey value for the tag
with the old timestamp, 2022/04/19 12:21:12.108, is the timestamp of the value received by
the Historian, and 2022/04/19 12:27:13.714 is the current time on the Historian.

PROCEDURE
1. You’ll Prst need to identify the problem topic. You can do this using the wwTagKey
parameter from the error messages. In our case this is 242.We can determine this by
running a query against the Runtime database (DB). First, open up SQL Server Management
Studio and connect to Historian, then create a new query in the Runtime DB.
:
2. Make sure you are running the query against the “Runtime” database, and then enter a
query similar to the query below. When Pnished with the query select “Execute“.

SELECT Tag.Tagname, Topic.Name Topic, Topic.TopicKey

FROM Tag

INNER JOIN Topic

ON Tag.TopicKey = Topic.TopicKey

WHERE Tag.wwTagKey = <wwTagKey parameter from Step 1 above>


:
3. In the results, take note of the Topic.

EISELECTTag.Tagname,Topic.NameTopic,Topic.Topickey
FROMTag
INNERJOINTopic
ONTag.TopicKey=Topic.Topickey
WHERETag.wTagKey=242
100%

LEResultsmiMessages
Taaname Topic TopicKey
Mixer100Inlet1CLS Topic1 6

4. Open the SMC Historian ConPguration, and then navigate to the IDAS. Locate the topic in
question and take note of the node name for the topic.
:
5. Now that we have identiPed the computer name for the Topic in question, we can start the
process of synchronizing the time between the IDAS node and the Historian node.

Note: ALL steps from this point forward will be conPgured on the remote IDAS system.

Begin by navigating to the directory where you want to create the batch Ple. When ready,
create a new text document.
:
f. Open a text editor like Microsoft Notepad. Enter the following script:

@echo off
net time \\HistorianNodeName /set /yes
exit

When Pnished, save and close the editor. Make sure to use the proper HistorianNodeName
when you implement this script.
:
*TimeBatch-Notepad

FileEditFormatViewHelp
@echooff
nettime\\HistorianNodeName/set/yes
exit

Ln3,Col5100%Windows(CRLF)UTF-8

7. Right-click on the newly created script Ple and select “Properties“.

Name Datemodified

ElTimeBatch 4/19/202210:51
Open
Print

Edit

SSharewithSkype
ScanwithWindowsDefender..
[AShare
Openwith
Restorepreviousversions

Sendto

Cut

Copy
Createshortcut
Delete
Rename

Properties

k. In the Prst editable text Peld change the Ple extension from “.txt” to “.bat“. This will
change the text Ple into a batch Ple. When Pnished click the “OK” button.Note: In order to
see the .txt extension, the “File Name Extensions” checkbox must be enabled in the View à
Show/Hide settings in Windows File Explorer.
:
9. A prompt will appear letting you know that changing the extension of a Ple may cause the
Ple to become “unusable”. Select “Yes“.

10. To verify that the change was successful you can simply observe the Ple’s icon, as
displayed below.
Name Datemodified Туре Size

CTimeBatch.bat 4/19/202210:58AM WindowsBatchFile 1KB

11. Now open the “Control Panel“, and then open “Administrative Tools” and select “Task
Scheduler”.
:
12. In Task Scheduler, select the “Create Basic Task…” option.
:
13. Name your task and provide a description if desired and click Next.
CreateBasicTaskWizard

CreateaBasicTask

CreateaBasicTask Usethiswizardtoquicklyscheduleacommontask.Formoreadvancedoptionsorsettings
Trigger suchasmultipletaskactionsortriggers,usetheCreateTaskcommandintheActionspane.
Action Name: TimeBatch
Finish
Description: Dailytasktoruntimesyncbatchfile.

<Back Next> Cancel

protected by reCAPTCHA
-
Privacy - Terms

14. Selected your desired trigger – in this example we choose “Daily”, then click next.
:
15. ConPgure additional time details related to your chosen time trigger and click next.

1f. Choose the “Start a program” option and click next.

17. Navigate to the batch Ple location using the “Browse” button, or manually enter the Ple
path to the batch Ple. Click next once this is selected.
:
CreateBasicTaskWizard

StartaProgram

CreateaBasicTask
Trigger Program/script:
Daily CATimeSync\TimeBatch.bat Browse...
ActiOn

StartaProgram Addarguments(optional):
Finish Startin(optional):

1k. Review the details of your task. You can also select the “Open the properties for this task
when I click Finish” checkbox to apply even more detailed task properties (e.g. stopping the
task if it runs for too long of a time frame, only run the task if the system is idle, etc.).
Otherwise, click “Finish” to complete the setup.
:
19. If desired, when Pnished you may right-click on the scheduled task and select “Run” to
implement the changes immediately.
:
All Industrial Software Solutions Tech Notes are provided "as is" without warranty of any kind.

© 2023 Industrial Software Solutions | All Rights Reserved


:

You might also like