Software:
B&R Automation Studio, Visual Studio (or something similar)
Software/Package | Link |
---|---|
B&R Automation | https://www.br-automation.com/en/downloads/#categories=Software-1344987434933 |
Visual Studio | https://visualstudio.microsoft.com/downloads/ |
Programming Language:
C#, Python
Packages:
C# (OPCFoundation), Python (FreeOpcUa)
OPCFoundation: https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua/
FreeOpcUa: https://github.com/FreeOpcUa/python-opcua
The project is focused on a simple demonstration of client-server communication via OPC UA. In this case, it is a B&R Automation PLC (server), which communicates with the client via the C# or Python application. An example application is reading and writing multiple data of the same type (REAL/Float).
In PLC configuration packages, it is mandatory to activate OPC UA communication with port 4840 and enable the structure of variables for reading and writing.
The application uses performance optimization using multi-threaded programming. Communication (C# application) can be used in Unity3D for digital twin / augmented reality or in the ROS system (Python or similar approaches as C++).
The project was realized at the Institute of Automation and Computer Science, Brno University of Technology, Faculty of Mechanical Engineering (NETME Centre - Cybernetics and Robotics Division).
Node Identification (NodeId):
ns = all variables use a number (6)
s (Part 1) = Program (Task) Name,
Note: If the variable is global, the task name is AsGlobalPV.
s (Part 2) = Variable (read / write)
string -> "ns=6;s=::Task:Var"
Server (B&R PLC) - Repositary [/BaR_PLC_Server/OPCUa_Client_simple/test/Logical/]:
Server (B&R PLC) - Repositary [/BaR_PLC_Server/OPCUa_Client_simple/test/Logical/]
[ AS Main Program ] /Program/Main.c/
Client (C#) - Repositary [/C_Sharp_Client/Opcua_client/]
[ Main Program (Application) ] /Program.cs/
Client (Python) - Repositary [/Python_Client/]:
[ Main Program (Sync. Write) ] /example_write_opcua_sync.py/
[ Main Program (Sync. Read) ] /example_read_opcua_sync.py/
[ Main Program (ASync. Write) ] /example_write_opcua_async.py/
[ Main Program (ASync. Read) ] /example_read_opcua_async.py/
[ Data Evalation ] /opcua_evaluation.py/
Data - Repositary [/Python_Client/Data/]:
[ Collected data (Python, C#) ] /CSharp_OPC_UA_Data_Evaluation_Sync.txt/
/Python_OPC_UA_Data_Evaluation_ASync.txt/
/Python_OPC_UA_Data_Evaluation_Sync.txt/
Python Sync.:
Python ASync.:
CSharp:
Python Sync.:
Python ASync.:
CSharp Sync.:
@misc{RomanParak_DT_BaR,
author = {Roman Parak},
title = {Data collection from the B&R Automation control system using the OPC UA communication protocol},
year = {2020-2021},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/rparak/OPCUA_Simple/}}
}