This document encapsulates the details and configuration procedures regarding SKF @ptitude Analyst/OPC Client version 2.0 transfer service.
SKF @ptitude Analyst/OPC Client service utilizes the SKF @ptitude Analyst SDK to connect to the database and Dot Net 4.0 library to connect via Universal Access to OPC Services. Requirements for this service include SDK v1.2017.0208.00 as well as a properly-configured skfDbConnections.config file.
Note: Under some circumstances when using the [Set Active] command in the Analyst Configuration Tool’s Database Type feature, the following error message appears:
|
SKF @ptitude Analyst/OPC Client links are created in a standalone CSV file and saved to the SKF @ptitude Analyst program directory, typically in default path: C:\Program Files (x86)\SKF-RS\SKF @ptitude Analyst
Existing SKF @ptitude Analyst/OPC Client links (created in SKF @ptitude Analyst/OPC Client v1.x) can be copied out of the Microsoft Access database and placed in a CSV file using Excel:
- Open file MAopcManager.mdb using Microsoft Access
- Typically found in default path: C:\Program Files (x86)\SKF\MAOPCMGR\Database
- Locate the MAOPCDATAMAPPING table
- Highlight the table by pressing [Ctrl} + [A] and then copy to the clipboard using [Ctrl} + [C]
- Open a blank Excel spreadsheet and then paste the links in the clipboard using [Ctrl} + [A]
- Save As and choose CSV format, then save to the desired directory on the target computer
To register the service, use the command line and InstallUtil.exe file provided:
InstallUtil skfOPCService.exe
For testing purposes, a copy of the UA Dot Net SDK should to be installed. See the configuration appendix for the format of the skfOPCService.exe.config file. These values are editable through the Manager using the [Settings] key.
Logging Levels and Event Log Messages
Level 0 (always)
Type |
Event |
Example |
Warning |
Link @A POINT not found in database |
POINT WITH ID #### can no longer be found in the @A database. It will be removed from scanning. |
Error |
@A DB connection failed |
@ptitude Analyst database connection failed. |
Error |
Failure to read configuration file. |
"Error reading application configuration file." followed by system generated catch exception. |
Error |
Error reading from MDB database while generating list of POINTs |
“Get_List_Of_Points exception.” followed by system generated catch exception. |
Error |
Error reading from MDB database while generating list of Servers. |
“Get_List_Of_Servers exception.” followed by system generated catch exception. |
Error |
Error writing to MDB file while updating timestamp for transferred data. |
Unable to write to Access Database to update Link timestamp. |
Error |
Failure to create memory for DataMeasurement when storing @A data. |
Failed to create memory for DataMeasurement – POINT: (####)POINTName.” |
Error |
Failure to save measurement in @A database |
Failed to save Measurement record for POINT: (####)POINTName. |
Error |
Failure to create memory for MeasReading record in while storing @A data. |
Failed to create memory for MeasReading record for POINT (####)PointName, MeasId: (####). Deleting Measurement record. |
Error |
Failure to store MeasReading record in @A database. |
Failed to save MeasReading record for POINT (####)PointName, MeasId: (####). Deleting Measurement record. |
Error |
Failure to load MeasReading record for last measurement for a POINT during Analyst->OPC transfer |
Analyst->OPC. Failed to load (Overall | Inspection | MCD) MeasReading for Point: (####)PointName, MeasId: (####) |
Info |
@A DB Connection |
@ptitude Analyst database connection verified. |
Info |
On Service Start |
Service started successfully. |
Info |
On Service Stop |
Service stopped successfully. |
Level 1 (Low)
Type |
Event |
Example |
Info |
Reporting Level Setting |
Reporting Level: 3 |
Warning |
Failure to transfer data |
[Analyst->OPC | OPC->Analyst] [Failed to store | Failed to transfer] [Overall | MCD | Inspection] Measurement for TIMESTAMP. LINE 2: OPC Tag info. LINE 3: @A Point Name + Values |
Level 2 (Medium)
Type |
Event |
Example |
Warning |
Failed to load last measurement |
Failed to load last measurement for Analyst POINT: (####)PointName. |
Info |
Data Transfer Success |
[Analyst->OPC | OPC->Analyst] [Successfully stored | Successfully transferred] [Overall | MCD | Inspection] Measurement for TIMESTAMP LINE 2: OPC Tag info. LINE 3: @A Point Name + Values |
Level 3 (High)
Type |
Event |
Example |
Info |
Debug message for each POINT in the list during Timed event |
ID: (####) Is Active POINT PointName belongs to Server SERVERName |
Info |
Debug Message to display on each _Timer_Elapsed event |
_timer_elapsed |
Info |
Debug message when @A->OPC Transfer is attempted |
Analyst->OPC. Attempt to transfer data at TIMESTAMP Line 2: OPC Link information Line 3: Analyst POINT (###)PointName |
Info |
Debug message when updating MDB Link timestamp |
Update MAOPCDATAMAPPING SET DTS = timestamp WHERE MAPOINTID = pointid |
Info |
Debug message when update succeeds |
1 row updated |
Level 4 (Full)
Type |
Event |
Example |
Info |
Debug messages when reading the contents of the application configuration file. |
ACCESS CONNECT: XXXXX ACCESS DB: XXXXX
|
Info |
Debug messages when reading the MDB database |
Current Interval: ## minutes |
Info |
General debug messages |
Get_List_Of_POINTs start Get_List_Of_POINTs #### points read Get_List_Of_Servers Start Get_List_Of_Servers #### servers read |
Example configuration file (skfOPCService.exe.config)
- <?xml version="1.0"?>
- <configuration>
- <configSections>
- <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
- </configSections>
- <dataConfiguration defaultDatabase="MS_SQL_2014" />
- <connectionStrings configSource="skfDbConnections.config" />
- <appSettings>
- <add key="useUA" value = "1" />
- <add key="OPCConnectString" value = "opc.tcp://USSDGCND5342Z73:48030" />
- <add key="UANamespace" value = "http://www.unifiedautomation.com/DemoServer/"/>
- <add key="linkDatabase" value="C:\Temp\aptAnalystOPCTagList.csv" />
- <add key="loggingLevel" value="4"/>
- <add key="TransferInterval" value="15" />
- <add key="transferInspectionUncheckedResults" value="1"/>
- </appSettings>
- </configuration>
Key:
- Standard XML version header
- Configuration Section (2-17)
- ConfigSection (3-5)
- DataConfiguration (for use with DotNetSDK)
- @A Database Configuration Title
- Link to skfDbConnections.config file (*)
- AppSettings Section (8-16)
- useUA (if the service ultimately supports UA as well as DCOM DA2.0/3.0 protocols, this will allow the switching between the 2 modes (1=UA; 0=DA2.0)
- OPCConnectString – the connection parameters used to connect to the UA OPC Server.
- UANamespace – the namespace within the UA OPC Server where tags are located.
- linkDatabase – the location of the services link CSV file
- loggingLevel – controls the number of debug events written to the Windows Event Log file
- TransferInterval– The period (in minutes) between wakeup of the @A OPC Service thread to transfer new data.
- transferInspectionUncheckedResults ( 1= sends a 0 if Inspection Result is unchecked; 0=suppresses transfer if Inspection Result is unchecked )
(*) Requires configuration file from SKF @ptitude Analyst installation
Differences between versions 1.2 and 2.0
- Method of connecting to an OPC Server
- Version 1.2 uses DCOM to connect to an OPC DA 2.0 or DA 3.0 Server
- Version 2.0 uses OPC Universal Access (UA)
- Method of connecting to the SKF @ptitude Analyst database
- Version 1.2 requires two (2) accounts to be set up in SKF @ptitude Analyst – one for the MAOPCManager, and one for the Service.
- Version 2.0 does not require any accounts to be set up. It does, however, require the database configuration file (skfDBConnections.config) to be present. This file is created by the skfAnConfigTool.
- Need for Microsoft Access
- Version 1.2 stores the links and service parameters in a Microsoft Access database.
- Version 2.0 stores the links in a flat CSV file and service parameters in the service’s <XML> configuration file.
- Event Log messages
- Version 1.2 stored the event log messages in an internal table and loaded these messages upon startup of the MAOPCManager. This could lead to ever-increasing delays in starting the MAOPCManager if logging was left on. There was only one level of messaging.
- Version 2.0 stores the event log messages in the Windows Event Log (accessible through Control Panel). This results in a more consistent performance in opening up the configuration utility. There are 4 levels of messaging available.
- Robustness when loss of connection to the SKF @ptitude Analyst database or OPC Server occurs.
- Version 1.2 had occasional issues of ‘locking up’ when connection to the OPC Server was lost.
- Version 2.0 constantly tests the connection to the database as well as the OPC Server and automatically reconnects when connection is re-established.
- Age of tool set
- Version 1.2 was built over 10 years ago, using 15-year OPC protocols (DCOM)
- Version 2.0 is built with current Dot Net libraries to connect to both the SKF @ptitude Analyst database and the OPC Server using OPC’s latest protocols (UA)
- Ability to view links in a table
- Version 1.2 did not contain the functionality needed to view which POINTs were linked to what tags except with the tree control view.
- Version 2.0 has a filterable list (by name, by direction, by POINT Type) to quickly locate linked SKF @ptitude Analyst POINTs.
- End of document -
Comments
0 comments
Article is closed for comments.