Difference between revisions of "Activity:CreateOPCUAConnection (Activity)"
(Created page with "{{ActivityInfoBox | title = Create OPC UA Connection | name = CreateOPCUAConnection | image = 220px | imagecaption = CreateOPCUAConnect...") |
(→See also) |
||
(20 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | The CreateOPCUAConnection creates a connection to an OPC UA data source. A valid connection is the initial step in communicating with OPC sources. | ||
+ | |||
+ | =Description= | ||
{{ActivityInfoBox | {{ActivityInfoBox | ||
| title = Create OPC UA Connection | | title = Create OPC UA Connection | ||
| name = CreateOPCUAConnection | | name = CreateOPCUAConnection | ||
− | | image = [[File: | + | | image = [[File:UI_Activity_CreateOPCUAConnection.png|220px]] |
| imagecaption = CreateOPCUAConnection (Expanded) | | imagecaption = CreateOPCUAConnection (Expanded) | ||
| purpose = Connect to OPC UA | | purpose = Connect to OPC UA | ||
Line 10: | Line 13: | ||
}} | }} | ||
− | + | ===Arguments=== | |
− | + | ||
− | ==Arguments== | + | |
− | {| class="wikitable sortable" | width = " | + | {| class="wikitable sortable" | width = "70%" |
|- | |- | ||
− | ! Argument!! Type !! Direction | + | ! Argument!! Type !! Direction !! Purpose |
|- align="left" | |- align="left" | ||
− | | SessionName|| | + | | SessionName|| {{String_MSDN}}|| In || Configures the session name property of an UPC UA connection. This name is transferred to the server when the connection is opened. |
|- align="left" | |- align="left" | ||
− | | ApplicationName|| | + | | ApplicationName|| {{String_MSDN}}|| In || Configures the OPC UA application name property of an OPC UA connection. The application name is used to configure the OPC UA endpoint and to identify the client certificate in the Windows certification store. |
|- align="left" | |- align="left" | ||
− | | ApplicationURI|| | + | | ApplicationURI|| {{String_MSDN}}|| In || Configures the OPC UA application URI property of an OPC UA connection. The application URI is used to configure the OPC UA endpoint. |
|- align="left" | |- align="left" | ||
− | | ProductURI|| | + | | ProductURI|| {{String_MSDN}}|| In || Configures the OPC UA product URI property of an OPC UA connection. The product URI is used to configure the OPC UA endpoint. |
|- align="left" | |- align="left" | ||
| TransportProfile|| OpcUaTransportProfileType|| In || Configures the transport profile to use for the client endpoint. | | TransportProfile|| OpcUaTransportProfileType|| In || Configures the transport profile to use for the client endpoint. | ||
|- align="left" | |- align="left" | ||
− | | URL|| | + | | URL|| {{String_MSDN}}|| In || Configures the session URL property of an OPC UA connection. The session URL specifies the target point for an OPC UA connection and contains the transport protocol (i.e. TCP or HTTP) and the target address, along with optional parameters to identify specific channels on the target server. |
|- align="left" | |- align="left" | ||
− | | URL_HTTP|| | + | | URL_HTTP|| {{String_MSDN}}|| In || ... |
|- align="left" | |- align="left" | ||
− | | URL_TCP|| | + | | URL_TCP|| {{String_MSDN}}|| In || ... |
|- align="left" | |- align="left" | ||
− | | OperationTimeOut|| | + | | OperationTimeOut|| {{TimeSpan_MSDN}}|| In || Configures the operation timeout property of an OPC UA connection. Actions initiated by the client will time out, if they are not completed within the timeout value specified by this option. The default value is 60 seconds. |
|- align="left" | |- align="left" | ||
− | | UseBinaryEncoding|| | + | | UseBinaryEncoding|| {{String_MSDN}}|| In || Configures the OPC UA connection to use the OPC UA binary encoding. If this option is configured to false, XML encoding will be used. |
|- align="left" | |- align="left" | ||
| ClientCertificate|| X509Certificate2|| In || Configures the client certificate to use for the OPC UA connection. The client certificate will be used by the server to authenticate the client. Connections no validated successfully will be forcefully closed by the server. | | ClientCertificate|| X509Certificate2|| In || Configures the client certificate to use for the OPC UA connection. The client certificate will be used by the server to authenticate the client. Connections no validated successfully will be forcefully closed by the server. | ||
|- align="left" | |- align="left" | ||
− | | CertificateStoreType|| | + | | [[#CertificateStoreType|CertificateStoreType]] || {{String_MSDN}}|| In || Configures the certificate store type to use for the retrieval of the client certificate when it is not directly configured. The default is to search the Windows certificate storage. |
|- align="left" | |- align="left" | ||
− | | CertificateStorePath|| | + | | [[#CertificateStorePath|CertificateStorePath]] || {{String_MSDN}}|| In || Configures the certificate store path to use for the retrieval of the client certificate when it is not directly configured. The default is to search for certificates installed to the local machine (as opposed to the current user). |
|- align="left" | |- align="left" | ||
− | | CertificateSubject|| | + | | CertificateSubject|| {{String_MSDN}}|| In || Configures the subject of the client certificate when retrieving that from the certificate storage. |
|- align="left" | |- align="left" | ||
| SecurityPolicy|| OpcUaSecurityPolicyType|| In || Configures the security policy to use for the client endpoint. | | SecurityPolicy|| OpcUaSecurityPolicyType|| In || Configures the security policy to use for the client endpoint. | ||
Line 50: | Line 51: | ||
| MessageSecurity|| OpcUaMessageSecurityMode|| In || Configures the message security mode to use for the client endpoint. | | MessageSecurity|| OpcUaMessageSecurityMode|| In || Configures the message security mode to use for the client endpoint. | ||
|- align="left" | |- align="left" | ||
− | | UserName|| | + | | UserName|| {{String_MSDN}}|| In || Configures the options for a username/password style authentication. |
|- align="left" | |- align="left" | ||
− | | Password|| | + | | Password|| {{String_MSDN}}|| In || Configures the options for a username/password style authentication. |
|- align="left" | |- align="left" | ||
| Connection|| OpcUaServerConnection|| Out || returns the created connection. | | Connection|| OpcUaServerConnection|| Out || returns the created connection. | ||
|- align="left" | |- align="left" | ||
− | | Result|| | + | | Result|| {{Boolean_MSDN}}|| Out || True if successful, false if failed |
|} | |} | ||
− | ==Usage== | + | ==== CertificateStoreType ==== |
+ | * "Windows" ... for a windows certificate store, | ||
+ | * "Directory" ... for a directory certificate store. | ||
+ | ==== CertificateStorePath ==== | ||
+ | The value has to be a combination of the OPA UA ''StoreLocation'' and ''StoreNames'' constants, for example "LocalMachine\My". | ||
+ | |||
+ | Constants that identify certificate store locations. | ||
+ | * "CurrentUser" ... The store assigned to the current user. | ||
+ | * "LocalMachine" ... The store assigned to the local machine. | ||
+ | |||
+ | Constants that identify certificate store names. | ||
+ | * "UA Applications" ... The store used for UA application certificates. | ||
+ | * "UA Certificate Authorities" ... The store used for UA certificate authorities certificates. | ||
+ | * "My" ... The store used for personal certificates. | ||
+ | * "Root" ... The store used for trusted root certificate authorities. | ||
+ | |||
+ | [[Category:OPC|CreateOPCUAConnection (Activity)]] | ||
+ | |||
+ | ===Usage=== | ||
+ | This activity is used to start the communication with an OPC data source. It is a nestable activity, which means it can host any amount of sub-activities that will be processed sequentially. The hosted activities are typically [[Activity:ConfigureOPCUAVariable (Activity)|ConfigureOPCUAVariable]] activities, either as direct children but also wrapped within looping activities like ForEach or While. | ||
+ | |||
+ | =Example= | ||
+ | The CreateOPCUAConnection activity, as used in the larger example "Read value from OPC variable": | ||
+ | [[File:UI_Activity_CreateOPCUAConnection_Example.png|x700px]] | ||
− | + | <headertabs /> | |
==See also== | ==See also== | ||
+ | * [[OPC UA (Plugin)]] | ||
* [[Workflow Designer]] | * [[Workflow Designer]] | ||
− | * [[CreateOPCUAScope (Activity)]] | + | * [[Activity:ConfigureOPCUAVariable (Activity)]] |
+ | * [[Activity:CreateOPCUAScope (Activity)]] | ||
+ | * [http://documentation.unified-automation.com/uasdkdotnet/2.3.1/html/namespaceUnifiedAutomation.html UA Bundle SDK .NET] | ||
− | + | [[Category:OPC|CreateOPCUAConnection (Activity)]] |
Latest revision as of 10:49, 6 March 2024
The CreateOPCUAConnection creates a connection to an OPC UA data source. A valid connection is the initial step in communicating with OPC sources.