Git Product home page Git Product logo

converter-for-opcua's Introduction

Converter for OPC UA

Introduction

Converter for OPC UA is a general framework that not only connects different machines and sensors with different protocols in the factories but also convert them into unified OPC UA access interfaces. Customized data preprocessing can also be done during the convertion. The software framework is designed for flexible deployment with mininum hardware change for the factory.

Manufacturing operation levels are diversified as many manufacturing are still at industry 1.0 or 2.0 level. The machines are not connected and factories lack automation solutions. This framework will help connecting the unconnected and unifying the data access for further analytics.

Features

  • Extensible way to expose data to OPC UA
  • Out-of-box supporting common protocols (SCPI, MQTT, Modbus etc.) and light plugin development effort for new protocols
  • Flexible deployment model including Standalone, Edge Server+Edge Compute Node, Public Cloud+Edge Server+Edge Compute Node
  • Use Memory, SQLite or MongoDB as history storage

Architecture Overview

The architecture is as following:

Converter for OPC UA Architecture

Three key blocks have been introduced to support the core architecture: (1) OPC UA Converter; (2) AMQT based message broker; (3) Protocol plugin. RabbitMQ has been used as message broker because of its widely adoption. Resource dictionary(RD) concept was introduced to guide and simplify the converting process. RD will be transferred from plugin to converter by GETRD RPC invoking.

Getting Started

Requirements

The software can run on commodity PC, Server or IOT gateways. Our primary development OS is Ubuntu 16.04 LTS. As the code is developed primarily in Python. It should be straingforward to port to other platforms.

There are two ways of running Converter for OPC UA:

If you want to quickly try out or deploy in production environment, it's recommendated to run on Docker. Otherwise you can run natively as well to explore internals or develop plugins.

Running Natively

  • Install Dependencies

The easiest way of install dependencies is to run:

$ ./bin/setup_env_ubuntu.sh

The script will install all system and python package dependencies and setup a virtualenv environments

If you prefer to manually install dependencies, please check the following helper scripts:

  • bin/install_system_deps.sh: install system dependencies for ubuntu
  • bin/install_venv.sh: install virtualenv
  • bin/install_python_venv_deps.sh: install python dependencies and virtualenv

To only install python dependencies, run from home directory of the source:

$ pip3 install -r requirements.txt
  • Configuration

Edit opcua_plugin/modules.conf to uncomment plugins you want to run when starting the converter.

  • Running

All the following commands run in the home directory of the source code.

If using virtualenv, you need to activate virtualenv environment first:

$ source ./bin/activate_venv.sh

To start the converter, run:

$ ./bin/start.sh

To stop the converter, run:

$ ./bin/stop.sh

To restart the converter, run:

$ ./bin/restart.sh

To show the converter status, run:

$ ./bin/status.sh

Running on Docker

Converter and Plugins could be running in the same or separated Docker containers. The following Dockfile Guides show how to make Converter or Plugin images.

Running Tests

Functional test cases are placed in "tests" directory. Some unit tests are put in "unittest" directory along with the unit source code.

Check tests/README.md for how to run tests.

Using Plugins

Plugin is used to extend converter features such as adding new connection protocols. Plugins are placed in "opcua_plugin" directory. They are categorized in C and Python plugin and put in "cmodules" and "pymodules" directories respectly. Check README file in each plugin's directory to learn. Edit opcua_plugin/modules.conf to add plugins you want to run when starting the converter.

Check Plugins for details.

Using Interactive Console

A console-based interactive shell has been developed for debugging purpuse. Run:

$ python3 tests/tools/console.py

Check Console for details.

Examples for Developing Client

examples directory contains some example files about how to use Python to develop OPC-UA client for using Converter for OPC UA.

Frequently Asked Questions

Check FAQ for details.

License

The source code is licensed under Apache License 2.0. See LICENSE file for details.

It includes software developed from 3rd-party, See NOTICE file for details.

Contributing

Please submit Pull Requests or Issues. Your contribution is very much appreciated!

Contacts

For questions and issues regarding Converter for OPC UA, Please submit Issues.

converter-for-opcua's People

Contributors

aixiwangintel avatar xiangkwang avatar xwu99 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.