Description

This is a driver to expose data to an OPC server instance. The OPC Plugin is designed to work with the Generic Driver output.

Driver Information

Driver
Interface Type  UDP Driver Class Type Output
UTC Driver (question)  No Input / Output Input Executable DrvOpcServerHandler.exe
Related Pages
Table of Contents

Decoding Notes

 This driver only supports JSON input, any other input is discarded.

Interfacing Notes

By default this driver listens to 127.0.0.1 : 51234. (Port number can be changed in the registry.)

If remote access is needed the host must allow DCOM access: run (WIN+R) DCOMcnfg

Make sure to access and launch Allow Local and Remote Access to ALL groups.

Also check Defaults:


*Server plugin might not show in this list. Will only be shown if driver is online.



Also add these Firewall rules:

Port:  TCP 135  "DCOM inbound"

Program

  • C:\Windows\System32\OPCEnum.exe <OR> C:\Windows\SysWOW64\OPCEnum.exe
  • <Qinsy installation folder>\OpcClassicServer.exe


QINSy Configuration

To configure the OPC plugin with QINSy the driver must be added to the template and a Generic Driver *.xml must be created.

Database Setup

The driver can be found under Output Systems -> OPC Server Plugin.
The OPC Plugin is designed to work with the Generic Driver output and should have the same port number as the Generic Output driver.


Subsequently you need to add a Network - Generic Output driver with default settings 127.0.0.1 : 51234.

Generic Layout editor

To receive data with OPC an output driver *.xml should be created in the Generic Layout Editor. It is important that the driver is outputting in JSON format so it can be read into an OPC server:

To select data which has to be outputted by the Generic Driver consult out knowledge base Generic Layout Editor


QINSy Online

In online mode QINSy will open a Generic Output to UDP 51234 window, where the .xml should be added:

The saved *.xml will automatically be recognized when saved in the directory C:\Users\Public\Documents\QPS\QINSy\Drivers\Definitions\Output.
If you have multiple *.xml files select the correct one and go to the next menu:

In the Output Message Wizard you can change the output settings. Check if the Output Type is still JSON and select Finish:

In the main Generic Output window the .xml file is shown with the the data which is outputted by the driver:

Additional Information

Driver can be started without QINSy.

Only use this to register and unregister the plugin. This is mostly used for testing purposes and not used for online.

  • Open a Cmd with admin rights
  • Go to QINSy install folder ( cd "<path>")
  • Run DrvOpcServerHandler.exe - stand alone

Closing the Cmd window without completing the process can result in unwanted behavior.

Registry Options

Settings are now written to a configuration file in Public Documents.

C:\Users\Public\Documents\QPS\QINSy\Drivers\Settings\DrvOpcServerHandler\<project>

Example of configuration. Do not change <Server> tag

Config Example
<settings version="1.0" xmlns:dt="urn:schemas-microsoft-com:datatypes">
 <OPC>
  <Server>
   <OPC_Data_Port dt:dt="ui4">0</OPC_Data_Port>
   <UDP_Port dt:dt="ui4">41900</UDP_Port>
  </Server>
  <Config>
   <Data_Quality_Timeout_Bad dt:dt="ui4">6000</Data_Quality_Timeout_Bad>
   <Data_Quality_Timeout_Deteriorated dt:dt="ui4">3000</Data_Quality_Timeout_Deteriorated>
   <Wait_For_Configuration dt:dt="ui4">5</Wait_For_Configuration>
  </Config>
 </OPC>
</settings>
  • Data_Quality_Timeout_Deteriorated
    • Time in milliseconds
    • Changing this value will change the time it will take for the driver to consider the received output as old data. (Not Updating)
  • Data_Quality_Timeout_Bad
    • Time in milliseconds
    • Changing this value will change the time it will take for the driver to consider the received output as bad quality. (As in Timeout.)
  • Wait_For_Configuration
    • Time in seconds
    • Number of seconds the plugin will wait for configuration. After the time expires the plugin will use the last configuration.


As of Version 5 the plugin does not use the registry anymore

HKEY_CURRENT_USER\SOFTWARE\QPS\QINSy\8.0\Utilities\OPC Server Plugin\Settings

Version 1 or higher

  • Data Quality Timeout'. (int) (milliseconds)
    Changing this value will change the time it will take for the driver to consider the received output as bad quality. (As in not updating.)

    • UDP Port'. (int) port number to listen to incoming data (default: 51234)

  • Version 3 or higher
    • \Wait For Configuration (int) (seconds) number of seconds the plugin will wait for configuration. After the time expires the plugin will use the last configuration.