You are here

How to model real system for OPC UA Server

OPC Unified Architecture (OPC UA) is a machine to machine communication protocol for industrial automation developed by the OPC Foundation. The specification is Open, Cross-platform with security. The specification consists in 14 documents totalizing 1250 pages which is complex and time consuming to understand. In this tutorial we do jump start and later one can do deep drive depending on needs.

Let's describe a real word problem that we want to solve:

From software point of view, we need to do the followings:
A. We need to provide a mechanism to open the door if not open already,
B. We need to close the door if not closed the door already,
C. We need to check if the door is closed or not

About heating related we need to do the following:
A. We need to provide a mechanism to start the heating system,
B. We need to stop the heating system,
C. We need to check if the heating system is running or not.

There are different ways we can continue with this requirements. We shall use the modeling tool provided by Unified Automation. So you need to download the tool. Some basic terms we need to know since these will appear in this document again and again. OPC UA address space is to provide a standard way for servers to represent objects to clients. It defines Objects in terms of Variables and Methods. Unified Architecture will provide more information.
At this point, let's start our modeler. For simplicity, lets think whole summer cottage as an object which contains another 2 objects (Door and Heating system). Door objects contains 2 methods (Open and close and contains a boolean type property to indicate if the door is open or not, IsDoorOpened). For heating system, we have 2 methods, StartHeating and StopHeating. We have a property of type double that indicates current temperature.

Also we want to get notification from the heating system when the temperature falls below 10 degree C to the end user. It means our system should generate event to the OPC UA client application. Client application can log this information reporting or some other reasons.