Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 3.5 KB

1_OPCUA_Demo.md

File metadata and controls

51 lines (36 loc) · 3.5 KB

Quick Reference Guide

Collect data via OPC UA from the field

SourceCode can be found here

The OPC UA Taglist Node is now preinstalled on your EPC.
With the OPC UA Taglist Node, you can connect to any OPC UA Server and read huge amount of data (variables) with just one node.

1. Prepare the OPC UA Server

Make sure that the OPC UA Server supports OPC UA to be able to connect with the EPC-Client.

Important! Make sure the time configured on the EPC (can be configured with PLCnext Engineer) matches the time configured on the OPC UA Server.
If the time doesn't match, the certificates may be rejected from the Server.

2. Configure the OPC UA Tagnode

  1. Import the ExampleFlow
    OPCUA_Tagnode

  2. Configure the OPC UA Tagnode.
    Set the "Endpoint" to the Serveradress. In the example below, the adress ("opc.tcp://192.168.1.10:4840") is the OPC UA Server of the EPC. Also, the "Topic" may change if you connect to a non-Phoenix Conatct device.
    UA_TagnodeConfig

    Note: Please be aware, that the topic has changed to "ns=6" with FW 2023.0 LTS.

    Also, further extand the configuration (Pencil button) and set the required security setting.
    UA_TagnodeConfig2

  3. Configure the OPC UA Client node Configure the "OPC UA Client" node and set the same "Endpoint" and "Topic" and Security settings.

  4. Configure the "InfluxDB Batch Insert" node. Set up your organisation and bucket-name as you have configured it in InfluxDB

3. Use the OPC UA Tagnode

  1. If all configurations are done correctly, deploy your changes.
    The OPC UA Taglist should show the status "Done", the OPC UA Client should show the status "session active".

  2. If the OPC UA Client successfully connected to the OPC UA Server, the OPC UA Tagnode should now list all available OPC UA variables found on the server.
    Select all required variables in the list, accept by clicking "Done".
    OPCUA_Tagnode_Vars.

    Attention! - Since FW 2023.0 LTS, even if the REST variables of the localhost (EPC) are to be read, the full IP address (example: 192.168.1.10) of the localhost must be entered. It is no longer possible to enter "localhost" as the host IP.

  3. In my example, 10 variables are read. Since those 10 variables should be written into InfluxDB in an Array, the node "Combine multiple output into one" has to be set to 10 messages:
    Combine_REST

  4. The data will now be written into the local InfluxDB database. With this method, a hige amount of data (huge amount of variables) can be read into the local database with minimal effort and with the exact same flow that is as small as shown above.
    I can now analyse and pre-process the data in InfluxDB Chronograf.
    Influx_UAdata

Troubleshoot: If your OPC UA Client node can not connect to your OPC UA server "rejected by OPC UA Server" please check the configured time (in WBM or similar) of the client and server. The time of both have to be somewhat the same, otherwiese the certificates both exchange to each other is invalid!
You can also change the configured time of the EPC using PLCnext Engineer.