...
Table of Contents |
---|
...
Overview
As with all adapters, an existing Logic Simulator is required.
...
Where to find the different Gateway Adapters
...
Where to find
To find the OPC UA adapter, go to the Inspector window of a https://unit040.atlassian.net/wiki/spaces/PUD/pages/280987237/Logic+Simulator#Overview component.
This https://unit040.atlassian.net/wiki/spaces/PUD/pages/280987237/Logic+Simulator#Overview can be added under Logic.
...
Feature overview
...
Info |
---|
Only the settings between the lines refer to the OPC UA Adapter. |
...
Gateway settings | |||
---|---|---|---|
Adapter Target | Select a different adapter, please see prespective documentation for more information | ||
Adapter Setting (OPCUAServerSettings) | |||
XmlFilePath | File path to the policy file
| ||
endPointURL | The endpoint of the server | ||
configurationFilePath | Configuration path for the configuration XML (default is sample case, please use your own) | ||
namespaceIndex | the namespace index for opc ua | ||
IdentifierTypeOpc | The identifier type for this configuration For more information: http://documentation.unified-automation.com/uasdkhp/1.0.0/html/_l2_ua_node_ids.html | ||
UserName | Is passed to the server for authentication if the field is not empty (not used by default) | ||
PassWord | Is passed to the server for authentication when the UserName field is not empty (not used by default) |
...
Fidelity:
In order to get opc variables in real-time the fidelity of the signal definition has to be set to 0.
...
Note |
---|
Right now we do not offer support for certificate accepting within Unity. A quick workaround is to connect to the server via Ua Expert and accept the certificate there. Then it should also work in prespective. https://www.unified-automation.com/products/development-tools/uaexpert.html |
...
Opc ua variable naming
For the naming of opc ua variables we have to create the NodeId.
https://documentation.unified-automation.com/uasdkhp/1.0.0/html/_l2_ua_node_ids.html
Example NodeId:
ns=4;i=1241
for this example, you have to configure your PreLogic Simulator as follows:
...
Code Block |
---|
public class OPCTestComponent : PreLogicComponent { public override List<SignalDefinition> SignalDefinitions => new List<SignalDefinition> { new SignalDefinition("1241", PLCSignalDirection.INPUT, SupportedSignalType.BOOL), }; } |
Another example NodeId (Tia Portal):
ns=3;s="OPC_UA_DB"."TestBOOLINPUT0"
...