Configure VTScada as an OPC Classic Server

You are likely to experience problems if the VTScada server and the OPC client are not running as the same Windows account. This may be the case if the client is being run as a service, or VTScada is being run under another account (again, as a service). The most common symptom is that the client will attempt to launch a second instance of VTScada rather than connect to the first.

Preparation

Windows Server 2016 was used to determine these steps. They may not be applicable to other operating systems.
Tests used VTScada as a server and a client. Other OPC Servers and clients may differ.

Preparation is required before you configure VTScada to work as an OPC Server. Before proceeding, ensure that you can run Windows PowerShell with elevated permissions and that you have access to a Windows account that is a member of the local machine's Administrative Group.

 

  1. A VTScada license key that includes the OPC Server option.
    Contact your VTScada account representative.
  2. OPC Core Components installed.
    These are installed automatically by VTScada if your license includes the OPC option.
    May fail to install due to a lack of .Net 2.0. on your server. If so, uninstall any older version of the OPC Core Components and repeat the VTScada installation.

  3. The OPCEnum service must be set to start automatically, and must be running.
    If not, execute the following commands in a Windows PowerShell prompt that has elevated permissions:
$s = Get-Service OPCEnum
$s | Set-Service -StartupType Automatic
$s | Start-Service
  1. Firewall rules for OPCEnum.
    Set the profile as required using an elevated PowerShell prompt.
New-NetFirewallRule -DisplayName "OPC Server Enumerator 1.10" -Action Allow 
 -Profile <Choose one of Domain, Private, Public or Any as required> 
 -Protocol TCP -Direction Inbound -Program C:\Windows\SysWOW64\OpcEnum.exe
  1. A Firewall rule for VTScada should be enabled for the required connection profile.
    VTScada creates a rule for the Domain and Private profiles. This should be sufficient. Otherwise, create an exception for VTS.exe for all ports on the required profile(s). Steps may vary depending on whether you are using Windows Defender or a third-party firewall.
  2. Restart the computer.

VTScada running in desktop mode

The following steps were determined while using an account that was a member of the local machine's "Administrative Users" group.

  1. Open the DCOM settings for Trihedral VTS OPC Server,
    Select Launch and Activation Permissions,
    Select "Customize,
    Click "Edit",
    Remove "Remote Launch" for the INTERACTIVE user.
  2. Continuing in the DCOM settings for Trihedral VTS OPC Server,
    Select Access Permissions,
    Select "Customize,
    Click "Edit",
    Add the INTERACTIVE user,
    Enable local and remote access for the account.
  3. Continuing in the DCOM settings for Trihedral VTS OPC Server,
    Select the Identity tab,
    Select "The interactive user".
  4. Restart the computer.

VTScada running as a Windows service

The following steps were determined while using an account that was a member of the local machine's "Administrative Users" group. VTScada was set to run as a service under that account.

  1. Open the DCOM settings for Trihedral VTS OPC Server,
    Select Launch and Activation Permissions,
    Select "Customize,
    Click "Edit",
    Remove "Remote Launch" for the INTERACTIVE user.
  2. Continuing in the DCOM settings for Trihedral VTS OPC Server,
    Select Access Permissions,
    Select "Customize,
    Click "Edit",
    Add the INTERACTIVE user
    Enable local and remote access for the account.
  3. Continuing in the DCOM settings for Trihedral VTS OPC Server,
    Select the Identity tab,
    Select "This user"
    Ensure that the credentials for the service account are correctly entered. (Password)
  4. Restart the computer.

Steps within VTScada:

  1. From the tag browser, add an OPC Server Setup tag
  2. Give it a namespace.
    The name of the application is recommended

 

Within VTScada, no further action is required in order for the client to read the values of tags in the current VTScada application, but you may wish to secure your application. This is done outside VTScada using Windows® operating system user and group configuration tools.

Additional Notes:

  • Values are updated on change.
    The client attached to the VTScada OPC server need not (and should not) use polling. The fastest update rate supported by the server is 20ms.
  • Adding an OPC Server tag to a networked application enables the OPC server on every workstation running the application.
    Clients must specify which workstation they are connecting to.
  • If your application uses an OEM layer, having its own custom tag types, you will need to add code to those tag definitions in order for the OPC client to see them.
  • If your goal is to share live data between separate VTScada applications, using an OPC Server and Client combination will provide the most efficient means of transferring that data.