Skip to content

OPCUA driver

This driver allows the communication between Simumatik and any plaftform using a OPCUA server.

Parameters

Aside from the common parameters described in the communication_driver docs, this driver includes:

  • url: URL address of the OPCUA server. Default = 'opc.tcp://localhost:4840'

Definition example

The following json examples represent the data exchanged with the driver.

Setup data

The setup data will give values to the parameters required and will specify the I/O variables info.

{
    "parameters": {
        "url": "opc.tcp://localhost:4840", 
    },
    "variables": {
        "sensors": {
            "datatype": "byte", 
            "size": 1,
            "operation": "write"
        },
        "motors": {
            "datatype": "byte", 
            "size": 2, 
            "operation": "read"
        }
    }
}

Update input

As defined in the setup data, we will write the data in the "sensors" var, therefore the driver will send this information:

{
    "sensors": 2,
}

Update output

As defined in the setup data, we will read the data in the "motors" var, therefore the driver will receive this information:

{
    "motors": 2,
}

Component example

If you want to review a component using a full implementation of the OPCUA client, take a look to one below:

alt text