How do I import data from OPC server to the AVReporter database?

Discussion in 'AVReporter Questions' started by Anthon.T, Feb 8, 2014.

  1. Anthon.T

    Anthon.T New Member

    I am very new to the software, and having troubles setting up my OPC connections in the plugin. Could someone give a detailed guide, how to do it? The OPC server is located on the same machine as AVReporter.
  2. konsys

    konsys Administrator Staff Member

    Hi, you have to go through the following steps to set up OPC Server connections properly:

    - After you open the plugin, specify the address of an OPC server. Use "localhost" if it is on the same computer as AVReporter.
    If the OPC server is located on a remote machine you need to configure DCOM on both computers to
    allow OPC communication.
    - Press the button with the magnifier icon. This discovers OPC servers running on the machine
    with the address specified. They will show up in the drop-down list labelled "OPC server name".
    - Select one of the OPC servers. Server names can also be provided manually but one not showing
    up after discovery usually indicates it is not accessible.
    - Press button "Read tags".
    Warning: OPC read operations may take a while if there is a large amount of tags involved.
    - A hierarchical view of tags on the selected OPC server will be loaded and displayed in the
    tree view. Children of a branch node will only be discovered and shown after the node is clicked.
    Properties of the currently selected node can be seen in text boxes under the tree view.
    Checking a branch node causes all its children to get discovered, expanded and checked recursively.
    In the tree view please check any tags you want to import data from. Use the tree view's context
    menu to access item "View values" which enables you to monitor values and properties of checked
    tags in real time.
    To control how checked tags will show up in the database and on reports review the following:
    a) Namespace can be specified in a text box over the tree view. Devices in the AVReporter database
    belong to one or more namespaces which can be used to organise the database. They may, for example,
    represent different buildings or industrial sites. Measurement values imported from the OPC server
    by the configuration you are currently editing will show up under the namespace you specify here.
    Please do not leave this field blank.
    b) Each data sample from the OPC server will be imported into the database as a logged value of a
    specific quantity of a specific device. Default quantity and device names are generated from the
    name of the OPC server and the fully qualified name of each tag.
    If you find these names unsuitable you can change them for the selected tag using fields
    "Alias device name" and "Alias quantity name".
    Another way to do this is selecting a branch node and pressing "Set alias * names recursively"
    in the context menu. This way all child nodes of the selected branch node can be assigned the same
    alias device or quantity name recursively.
    c) Units can be specified for each quantity name. If you select a tag with a given alias quantity
    name and change its unit all other tags using the same alias quantity name will use the same unit
    as well.
    d) Multipliers can be set for every tag individually. The tag's value will be multiplied by this number
    before it gets imported into the database (e.g. importing a tag with a constant value of 2 and a
    multiplier set to 10 will show up as 20 in the database).
    e) "Save numeric tags only" being checked causes non-numeric - such as string - values to be excluded
    from the list of tags on which importation is based. If you use the software to import measurement
    data into the AVReporter database this should stay checked.
    f) "Read from cache" tells the software to read values from the cache of the OPC server. This could
    be faster than real-time reading but most servers do not support it.
    - CSV delimiter should be ";" on Windows versions preceding Vista and "," onwards.
    - You can save the profile you are editing using buttons "Save" and "Save as" on the top of the window.
    - If you are done setting things up press "Save and deploy selected OPC tags".
    - The list of OPC tags you want to import from must be saved. A form will pop up so you can specify its
    name. For this purpose you can use the "groups" directory and a file name of your choice.
    - You need to specify the location of the "OPC template" configuration group of AVR Connection Center.
    - A new configuration group must be created based on the template. You are free to name it.
    - Press button "Open AVR Connection Center".
    - Open the new configuration group you've just saved.
    - Check the settings of the target database. If the AVReporter database is located on the local machine
    and uses default settings you do not need to change anything.
    - Go to tab "Job scheduler" and assign the new configuration group to a job.
    Whenever this job runs it will import the current values of all the OPC tags you've configured.
    - Don't forget to update table LoggedItems after you've logged values using a new device or quantity
    name for the first time.
    Anthon.T likes this.
  3. Anthon.T

    Anthon.T New Member

    Thank you for the answer, I will give it a try!

Share This Page