Installation
| ◆ | Extract the archive AVRCC OPC template.zip to your Program Files directory (which should already have a directory called AVReporter). It contains all the driver’s files in the correct directory structure. |
| ◆ | If the OPC server is located on the local machine: |
| ► | Install the appropriate version of the OPC Code Components Redistributable. |
| ◆ | If the OPC server is located on a remote machine: |
| ► | Install the appropriate version of OPC Core Components Redistributable on both the client and server computers. |
| ► | Make sure OPCEnum (usually C:\WINDOWS\OPCENUM.EXE) is registered as a service (check in Start -> Settings -> Control Panel -> Administrative Tools -> Services). If it is not, run this executable with the argument /service. You may also want it to start automatically at system startup. This can be enabled on the Services form mentioned earlier. Set up your firewall to allow AVReporter, the AVR Connection Center service executable, your OPC server and OPCENUM.EXE on all computers to access the network. The OPC server and OPCENUM.EXE also need to be able to accept incoming connections. In addition, TCP port 135 has to be open for DCOM to work. |
| ► | Remote OPC servers can be communicated with by using DCOM. This needs to be set up on both machines. |
| ▪ | Important: if the two computers belong to different domains, client (e.g. AVReporter.exe and AVRConnectionCenterService.exe) and server (e.g. your OPC server) softwares must be run by a local user with the same name and password that exists on both machines in order to be able to authenticate through DCOM. You can use the default Administrator account or create one dedicated to this purpose. |
| ▪ | On the server machine launch Start -> Run and execute Regedit.exe. Navigate to My Computer -> HKEY_CLASSES_ROOT and locate the entry or entries corresponding to your OPC server (for example Schneider-Aut.OFS). Verify that the same entry exists on the client computer. If it does not, right-click it on the server, select Export and create a .reg file that can be run on the client to create the same entry. |
| ▪ | On both computers: open Start -> Settings -> Control Panel -> Administrative Tools -> Local Security Policy. Select Security Settings -> Local Policies -> Security Options and verify the following settings: |
| • | DCOM: Machine Access Restrictions in Security Descriptor Definition Language (SDDL) syntax: double-click this entry and click Edit Security. Ensure that users Everyone, Interactive, Network and System are under Group or user names and all their permissions are set to Allow. |
| • | DCOM: Machine Launch Restrictions in Security Descriptor Definition Language (SDDL) syntax: double-click this entry and click Edit Security. Ensure that users Everyone, Interactive, Network and System are under Group or user names and all their permissions are set to Allow. |
| • | Network access: Let everyone permissions apply to anonymous users should be Enabled. |
| • | Network access: Sharing and security model for local accounts should be Classic. |
| ▪ | On both computers: open Start -> Settings -> Control Panel -> Administrative Tools -> Component Services. |
| • | Select Console Root -> Component Services -> Computers -> My Computer, right-click on it and select Properties. |
| ♦ | Go to tab Default Properties. Make sure Enable Distributed COM on this computer is checked and the page looks like this: |

| ♦ | Go to tab COM Security. |
| ► | Click End Limits under Access Permissions. Make sure Anonymous Logon, Everyone, Interactive, Network and System can be found under Group or user names and that all of their permissions are set to Allow. |

| ► | Click Edit Default under Access Permissions. Make sure Anonymous Logon, Everyone, Interactive, Network and System can be found under Group or user names and that all of their permissions are set to Allow. |
| ► | Click End Limits under Launch and Activation Permissions. Make sure Anonymous Logon, Everyone, Interactive, Network and System can be found under Group or user names and that all of their permissions are set to Allow. |

| ► | Click Edit Default under Launch and Activation Permissions. Make sure Anonymous Logon, Everyone, Interactive, Network and System can be found under Group or user names and that all of their permissions are set to Allow. |
| ♦ | Click OK. |
| • | Stay on the Component Services window, select Console Root -> Component Services -> Computers -> My Computer -> DCOM Config. |

| ♦ | Locate OpcEnum, double-click and set it up the following way (needs to be done on both the client and the server machines): |
| ► | General tab: |
| ▪ | Authentication Level should be Connect. |
| ► | Location tab: |
| ▪ | Run application on this computer should be checked. |
| ► | Security tab: |
| ▪ | Launch Permissions should be set to Customize. Click Edit. Make sure Everyone, Interactive, Network and System are added under Group or user names and that all of their permissions are set to Allow. |

| ▪ | Access Permissions should be set to Customize. Click Edit. Make sure Everyone, Interactive, Network and System are added under Group or user names and that all of their permissions are set to Allow. |
| ► | Identity tab: |
| ▪ | Make sure OpcEnum is run by The system account (services only). |
| ♦ | On the server machine locate your OPC server, double-click and set it up the following way: |
| ► | General tab: |
| ▪ | Authentication Level should be Connect. |
| ► | Location tab: |
| ▪ | Run application on this computer should be checked. |
| ► | Security tab: |
| ▪ | Launch Permissions should be set to Customize. Click Edit. Make sure Everyone, Interactive, Network and System are added under Group or user names and that all of their permissions are set to Allow. |

| ▪ | Access Permissions should be set to Customize. Click Edit. Make sure Everyone, Interactive, Network and System are added under Group or user names and that all of their permissions are set to Allow. |
| ► | Identity tab: |
| ▪ | Choose a user who will run the OPC server. If the client and server computers are in different domains, this user must fit the criteria described on the first page. |
Configuration
AVR Connection Center’s OPC driver allows you to regularly query an OPC server for a number of tags and insert their current values into an ODBC data source such as an SQL Server (and, specifically, the AVRDATA database). These tags must be described in a table of another ODBC data source – by default this is a CSV file (items.csv) located in <Program Files directory>\AVReporter\bin\AVR Connection Center\. Each line of this file specifies a tag on the OPC server you want to query. Its columns are:
DeviceID: first segment of the tag name. AVR Connection Center will attempt to access this tag by its full name which is QuantityID appended to DeviceID. It may contain delimiters which usually are either dots or exclamation marks, depending on the OPC server. This column can be left blank.
DeviceName: current value of the tag will be inserted into the AVRDATA database as a sample from this device. You are free to choose anything as device name.
QuantityID: second segment of the tag name. AVR Connection Center will attempt to access this tag by its full name which is QuantityID appended to DeviceID.
QuantityName: current value of the tag will be inserted into the AVRDATA database as a sample of this quantity. You are free to choose anything as quantity name.
Unit: the AVRDATA database can store a unit for every quantity. Specify whatever you believe to be the correct unit of the logged value.
Type: the OPC server is expected to return a value of this data type when queried for the tag being described. Specifying the wrong data type may prevent normal operation and cause errors.
The Items.csv file coming with the driver already contains a few lines as examples; most likely you want to delete these when configuring the driver.
Opening the driver OPC template in AVR Connection Center allows to perform the rest of the setup. Field Additional parameter of the Source panel contains all the settings used to access the OPC server. Most of them have values that need to be specified after an equal sign, e.g. SERVERADDRESS=127.0.0.1, and they are separated by semicolons. The following parameters need to be supplied in order to use the driver:
SERVERADDRESS: IP address or hostname of the OPC server. Use 127.0.0.1 or localhost if it is situated on the same computer as the client.
SERVERNAME: name of the OPC server.
NAMESPACE: all the samples inserted into the AVRDATA database will belong to this namespace.
TIMEZONE: all the samples inserted into the AVRDATA database will use this time zone.
TIMEZONE_OFFSET_IN_MINUTES: offset of the time zone specified above (for example: this value is -60 if the time zone is UTC+1).
TIMEZONE_DAYLIGHT_OFFSET_IN_MINUTES: daylight offset of the time zone specified above. Usually -60 if they are using daylight saving and 0 if not.
SOURCETYPE: all the samples inserted into the AVRDATA database will belong to devices of this type.
The following are optional and can be omitted:
SECONDARYSERVERADDRESS: IP address or hostname of a secondary OPC server. AVR Connection Center will attempt to use this as a data source in case the primary one becomes unreachable.
SECONDARYSERVERNAME: name of the secondary OPC server.
USESERVERTIMESTAMPS: this parameter has no value (thus it is not followed by an equal sign); its presence indicates that values should be inserted into the target database with the timestamp provided by the OPC server. The driver will produce an own timestamp if the parameter is missing.
Example list of parameters in the text box Additional parameter of the source:
SERVERADDRESS=localhost; SERVERNAME=Schneider-Aut.OFS; NAMESPACE=Schneider-Aut.OFS; TIMEZONE=unknown timezone; TIMEZONE_OFFSET_IN_MINUTES=0; TIMEZONE_DAYLIGHT_OFFSET_IN_MINUTES=0; SOURCETYPE=Schneider OPC Factory Server; SECONDARYSERVERADDRESS=another_machine; SECONDARYSERVERNAME=Schneider-Aut.OFS; USESERVERTIMESTAMPS
