OPC

Hans-Petter Halvorsen

What is OPC?

OPC is a standard that defines the communication of data between devices from different manufactures.

OPC requires an OPC server that communicates with one or more OPC clients. OPC allows “plug-and-play”, gives benefits as reduces installation time and the opportunity to choose products from different manufactures.

We have different OPC standards:

The organization OPC Foundation maintain the OPC standards.

Introduction to OPC with Examples:

 

PowerPoint used in the Video

 

Below you find different OPC resources.

 

MatrikonOPC Simulation Server

MatrikonOPC Simulation Server is free and can be used for testing OPC DA.

Download MatrikonOPC Simulation Server

Troubleshooting

Problems with installing or using the software?

If you have issues, please contact support@matrikonopc.com.

 

NI OPC Servers

An alternative to Matrikon is NI OPC Server.

A Demo version is included with "LabVIEW DSC Module" or "LabVIEW Real-Time module". This one can also be downloaded separately.

Download NI OPC Servers 2016

LabVIEW OPC with NI OPC Servers

 

OPC UA Simulation Server

OPC Foundation provides a set of sample OPC UA servers for demonstrating OPC UA functionality.

Download OPC UA Simulation Server and Sample Applications

OPC in LabVIEW

You can either uses OPC DA or OPC UA. LabVIEW has built-in support for OPC DA using the DataSocket palette. For OPC UA you need the LabVIEW OPC UA toolkit.

 

OPC DA in LabVIEW

OPC DA in LabVIEW + PowerPoint used in the Video

 

OPC UA in LabVIEW

OPC UA in LabVIEW + PowerPoint used in the Video + LabVIEW Examples

 

OPC UA in LabVIEW 2017 and newer

The LabVIEW OPC UA Toolkit contains the OPC UA API that was formerly part of the LabVIEW Datalogging and Supervisory Control (DSC) Module and the LabVIEW Real-Time Module. From the 2017 release, the LabVIEW OPC UA Toolkit becomes a standalone product. The LabVIEW DSC Module and the LabVIEW Real-Time Module no longer contain the OPC UA API. Read more.

 

Note! When creating OPC Clients: The VIs Write.vi and Read.vi that was previously used in LabVIEW 2016 has been replaced with Multiple Write.vi and Multiple Read.vi.

This means: In LabVIEW 2017 and newer it is recommended to use Multiple Write.vi and Multiple Read.vi instead of Write.vi and Read.vi for new applications. Note that Multiple Write.vi and Multiple Read.vi are slightly more complicated to use.

But if you open previous code in LabVIEW 2017 or newer, it will still work, because the old Write.vi and Read.vi are still included, but hidden in the palette in LabVIEW. You will find them here:

C:\Program Files...\National Instruments\LabVIEW 20xx\vi.lib\OPCUA\client\internal\

 

More information about LabVIEW 2018 OPC UA Toolkit (National instruments)

Examples from National Instruments:

 

 

Download LabVIEW 2018 OPC UA Toolkit

The LabVIEW OPC UA Toolkit contains the OPC UA API that was formerly part of the LabVIEW Datalogging and Supervisory Control (DSC) Module and the LabVIEW Real-Time Module. From the 2017 release, the LabVIEW OPC UA Toolkit becomes a standalone product. The LabVIEW DSC Module and the LabVIEW Real-Time Module no longer contain the OPC UA API. Read more.

OPC in Visual Studio/C#

There are no built-in support for OPC in Visual Studio/C#, so you need to use a 3.part sooftware package. If you only need OPC DA, you can, e.g., use Measurement Studio from National Instruments.

 

OPC with Visual Studio + PowerPoint used in the Video

 

Measurement Studio:

Download Measurement Studio

University of South-Eastern Norway (USN) has a site license for LabVIEW and other software from National Instruments, including Measurement Studio. If you are a student or staff at USN, you can freely download and install Measurement Studio and many other software from National Instruments.

 

Note! Measurement Studio 2015 with Microsoft Visual Studio 2015 and Newer

 

OPC UA in C#:

Build OPC UA .NET applications using .NET StandardLibrary(OPC Foundation)

Official OPC UA .Net Standard Stack and Samples from the OPC Foundation (GitHub)

OPC in MATLAB

You need the MATLAB OPC Toolbox. The MATLAB OPC Toolbox supports both OPC DA and OPC UA.

Below you find an Introduction to using OPC in MATLAB:

MATLAB OPC Toolbox + PowerPoint used in the Video

 

More information about the MATLAB OPC Toolbox.

 

OPC UA in MATLAB (MathWorks)

 

If you want to use OPC UA, you should also download the OPC UA Simulation Server.

 

University of South-Eastern Norway (USN) has a site license for MATLAB, including the OPC Toolbox. If you are a student or staff at USN, you can freely download and install MATLAB and the OPC Toolbox.

OPC in Python

OPC DA:

OpenOPC for Python

 

OPC UA: You find multiple OPC UA examples on GitHub. Just Google. I havent tested them.

 

OPC Tunneller

Here we have many different options.

Here are some OPC Tunneller Software:

OPC Resources

Below you will find more interesting OPC resources


LabVIEW

LabVIEW Programming and Tutorials

MATLAB

MATLAB programming and Training



OPC Videos

OPC Videos within different Applications and Areas

Industrial IT

Industrial IT resouces



Automation

Automation and Control resources

SCADA

Supervisory Control and Data Acquisition