emersbergerl / opcua2powerlink

Open source implementation of gateway for OPC UA (OPC Unified Architecture) to the real-time Industrial Fieldbus POWERLINK
22 stars 4 forks source link

Configuration of OPC UA server on MN instead of CN #2

Open bpanhale opened 3 years ago

bpanhale commented 3 years ago

Hello Team,

I am very new to Powerlink and OPC UA concepts. As per my understanding, According to current implementation of OPC UA server is reading data from CN (Controlled Node) then we are reading data through OPC UA client. So my question is can we implement vice-versa. i.e Implement OPC UA server on MN instead of CN to read data from all the CN's? Also, Can we separate OPC UA server code from MN so we can individually run this application?

Please refer below diagram-

image

emersbergerl commented 3 years ago

Hello,

Thank you for your interest, I tried to answer your questions and provide you some idea on how to get started. I hope that answers all your questions!

Concept:

It would be possible to use an OPC UA Server together with an POWERLINK MN,
in that case, the MN can read/write data to all the CN's and in your MN application you
forward this data to an OPC UA Server.

In case you separate both MN and OPC UA Server, you will have to think about a way on how to
transfer the data between both applications. (Shared Memory, Pipes,...)

The basic role of the MN is to read/write data to the CN's, so it would be a good
use for a OPC UA Server as it has all the data available from the POWERLINK network.
An example for this kind of MN/OPC UA combination is the PLC manufacturer B&R which 
provides both POWERLINK MN and OPC UA Server/Client functionality on their PLC's.

Implementation:

The "opcua2powerlink" project doesn't contain the MN parts, so you would have to check
the openPOWERLIK stack for the MN parts, which will need to be imported.
Also, the "opcua2powerlink" application is based on the openPOWERLINK "demo_cn_console"
you will have to change that to the "demo_mn_console" and all its requirements.

But if you want to separate the POWERLINK MN and the OPC UA applications, then there would be a simpler approach.
You build both separate applications, using the openPOWERLINK stack, by following the steps to create the "demo_mn_console" application
and the following the steps for creating the "open62541" OPC UA Server sample.

Then you would have the 2 applications, where it would be possible to run them independent of each other and
you just have to find a way on how to send the data between them.
Afterwards, if everything is working fine, you just that the 2 applications and optimize everything so that
you have a nice solution.