Engee documentation

OPCUA Client

Connecting to an external OPC server.

blockType: EngeeFunction

Path in the library:

/Interfaces/OPC-UA/OPCUA Client

Description

To work with the block, install/update the support package. equipment.

Block OPCUA Client designed to connect to an external OPC server via a subsystem Engee.Integrations. The block provides the transmission of input signals to the model and obtaining output data at each step of the simulation.

An example of using the block is available in the examples Engee-Device-Manager: example_opcua_client.engee. To get examples, use the command engee.package.getdemos.

opcua client 1

Ports

Input

# IN_1 — input bus
bus

Details

The input bus.

Data types

BusSignal

Complex numbers support

I don’t

Output

# OUT_1 — output bus
bus

Details

The output bus.

Data types

BusSignal

Complex numbers support

I don’t

Parameters

Main group

# Server address: — server address

Details
Default value

"opc.tcp://localhost:4840/freeopcua/server/"

Program usage name

endpoint_m

Tunable

No

Evaluatable

Yes

# Security policy: — Security policy
None | basic256 | basic128Rsa15 | basic256Sha256

Details
Values

None | basic256 | basic128Rsa15 | basic256Sha256

Default value

None

Program usage name

security_policy_m

Tunable

No

Evaluatable

Yes

# Message security: — messaging security
None | Sign | SignAndEncrypt

Details
Values

None | Sign | SignAndEncrypt

Default value

None

Program usage name

message_security_m

Tunable

No

Evaluatable

Yes

# Read variables: — readable variables

Details

A dictionary of readable variables, in which a match is set for each readable variable. nodeid and type.

OPC_Read_vars = Dict(
        :MyVar => ("ns=2;i=2", Float64),
        :MyVar2 => ("ns=2;i=3 Float64),
        :MyVar3 => ("ns=2;i=4", Float64),
    )

After setting the dictionary of read and write variables (parameter Write variables:) the busbars of the recorded and read signals will be defined in the workspace. Then they can be used in the model. Busses in workspace.

opcua client 2

If you do not need to write or read data, specify an empty dictionary. Dict().

Default value

Dict(:MyVar => ("ns=2;i=2", Float64), )

Program usage name

read_variables_m

Tunable

No

Evaluatable

Yes

# Output Bus Name — output bus name

Details

If there is more than one block in the model OPCUA Client, then it is required to specify the name of the output bus for each instance.

Default value

OPCOutputBus

Program usage name

output_bus_name_m

Tunable

No

Evaluatable

Yes

# Write variables: — writable variables

Details

Dictionary of recorded variables. It is set similarly to the dictionary of readable variables. Read variables:.

Default value

Dict(:MyVar => ("ns=2;i=2", Float64), )

Program usage name

write_variables_m

Tunable

No

Evaluatable

Yes

# Input Bus Name: — name of the input bus

Details

If there is more than one block in the model OPCUA Client, then it is required to specify the name of the input bus for each instance.

Default value

OPCInputBus

Program usage name

input_bus_name_m

Tunable

No

Evaluatable

Yes

# Timeout, s: — timeout, with

Details

The time in seconds after which the empty values will be returned.

Default value

2.0

Program usage name

timeout_m

Tunable

No

Evaluatable

Yes

# Sample time, s: — the period for invoking the block

Details

Specify the interval between the calculation steps.

Default value

0.1

Program usage name

sample_time_m

Tunable

No

Evaluatable

Yes

Данные пользователя

# Username: — username

Details

The username for authorization on the server.

Default value

""

Program usage name

username_m

Tunable

No

Evaluatable

Yes

# Password: — user’s password

Details

The user’s password for authorization on the server.

Default value

""

Program usage name

password_m

Tunable

No

Evaluatable

Yes