Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For the purpose of this tutorial, we will demonstrate the usage with TOP Server, but any other OPC server should work.

Prerequisites

  • Windows computer to install the OPC Server
  • on the development computer a functional JDK (6 or 7)
  • on the development computer a running Eclipse 3.x or 4.x

Setting up TOP Server

The installation of TOP Server is pretty straight forward, no surprises there. The tricky part is actually the DCOM configuration. Helpfully on the TOP Server website is a comprehensive guide (http://www.opcactivex.com/Support/Tutorials/DCOM_Tutorial_-_Configuring_th/dcom_tutorial_-_configuring_th.html), which explains how to configure it. If you do all the steps, the DCOM configuration should work. At least it did in our test setups. If it doesn't contact your local system administrator or OPC Guru to help you out. Problems may arise from a large number of causes (firewalls, routers, permissions, ...).

...

As we could see in the section above, there are already some items available, we want to use one, that is permanently updated, so in our example we will use the tag "_System._Time_Second"

The first step, is to get the needed libraries for Utgard, on the download page of the openSCADA website, just download following files: Utgard binaries (plain zip), jinterop binaries (plain zip) and External binaries (plain zip).

Start Eclipse, create a new project, put following libs into a lib folder and add those to the build path:

  • slf4j.api_1.6.4.jar (openscada uses slf4j througout the project, thats also one of the reasons for the jinterop fork)
  • ch.qos.logback.classic_1.0.0.jar (slf4j needs an implementation, you may use a different one, like log4j; openscada uses logback, so we use it for the purposes of this tutorial as well)
  • ch.qos.logback.core_1.0.0.jar (slf4j needs an implementation, you may use a different one, like log4j; openscada uses logback, so we use it for the purposes of this tutorial as well)
  • org.openscada.jinterop.core_2.0.8.201303051454.jar (jinterop, the library to provide dcom access for java)
  • org.openscada.jinterop.deps_1.0.0.201303051454.jar (some dependencies for jinterop)
  • org.openscada.opc.dcom_1.0.0.201303051455.jar (OPC specific DCOM stuff)
  • org.openscada.opc.lib_1.0.0.201303051455.jar (the actual Utgard api)

So far, your Eclipse should look a bit like this:

 

---

Until then have a look at this great post: http://clifcarr.blogspot.de/2011/02/readwrite-to-opc-serverplc-register.html