plcopc-uasiemenss7-1200tia-portal

Need clarity on opc ua server and opc ua client


I would like to create an application for industrial automation to do the following functionalities:

  1. Read values from PLC, SCADA, and DCA
  2. Process those values and notify failures to Supervisor and Technician

I am new to the Industrial Automation industry and IoT, and I knew that we have OPC UA in place to rescue.

I came across many websites and youtube videos to understand OPC UA and its predecessors (OPC DA, OPC A&E, OPC HDA). And I have installed matrikon OPC server and explorer (client) to explore more.

Let's say I want to read signals from SIMATIC S7-1200 PLC, from my understanding, the OPC UA server is shipped with PLC to convert OPC UA information to Profinet information.

So, my questions are:

If anyone shares some resources that would be grateful!


Solution

  • Where should I need to write logic to read values? OPC Server or Client?

    In OPC UA a Server is generally speaking a device or a component which provides data to OPC UA Clients. In your case the OPC UA Server is the SIMATIC S7. An OPC UA Client is then used to read variable values from this server.

    For debugging purposes and inspection you can use for example the free (commercial) tool UaExpert. You can only use it to see the current data of the server, you can not use it to program your logic around it.

    Finally, to answer your question: You need to use an OPC UA Client SDK to read values from an OPC UA Server and implement your own logic around it. There are commercial OPC UA stacks available, and open source stacks. A list of open source stacks can be found here: Open Source OPC UA Stacks.

    I know that the open62541 stack is able to connect to the Simatic S7 and it can read values from variable nodes.

    I am going to use NODE-OPC-UA. Is there any open-source OPC client GUI out there?

    OPC client GUI is quite a generic term. What exactly is your goal for the GUI? If you just need it for debugging and inspection, use UaExpert. Since OPC UA is just a Framework and Protocol definition, you need to program the logic behind the values yourself. Currently there's not really a generic OPC UA GUI with which you can easily define your own logic as an OPC UA client. Use any OPC UA client SDK to achieve this.

    How to write our own OPC Server for PLC which doesn't have OPC UA complaint?

    This question can not be answered in a generic way. It strongly depends which PLC hardware you are using. E.g., is it possible to directly put your own program onto the PLC? Is it completely closed and you need to use a fieldbus interface to communicate with the PLC?

    A generic solution for this would be that you implement an OPC UA Server on an external device, e.g., a PC. This PC is directly connected with the PLC. Inside your implementation you then need to implement the communication with the PLC and then map the received PLC values to the OPC UA Server variables. So basically your OPC UA Server acts as a gateway.