Skip to main content
Skip table of contents

OPC Client Connector

This adapter establishes a connection to an OPC server and retrieves and sets values.

Properties

Operation

Defines the operation executed by the function adapter

Possible values: execute : Execute the function adapter

Parameters

Adapter

Main adapter class (do not change!)

Possible values: de.softproject.integration.adapter.opc.OpcAdapter : >Main class (Default)

HostHost name or IP address of the OPC servers
DomainName of the OPC server's Windows domain
UserUser name, to access the OPC server
PasswordPassword of the user
ClsIdClass ID of the OPC server software
ProgIDWindows program ID

Status values

1

The operation was executed without a technical error

-1

The operation was finished with a technical error

The operation was possibly executed partially; More detailed information on the error cause can be found in the server log

Configuration

Within the folder X4DB/0 a file opc.xml must be created, which has the following structure:

XML
 <opc_config>
 	<Connection> 
 		<Host></Host>
		<Domain></Domain>
 		<User></User>
 		<Password></Password>
 		<ClsId></ClsId>
	</Connection>
 	<Group name=''>
 		<Item name=''/>
 		<Item name=''/>
 	</Group> 
</opc_config>

The following applies to each element <Group> and <Item>:

  • It can be created any number of groups with any number of items
  • A group is a collection of items assembled by the user that should be treated together
  • The group name can be chosen individually
  • The item name must match its name on the OPC server
  • Read operations are always performed on the entire group
  • An item can be in several groups at the same time
  • When writing, it can only be written on the items that are in the same group

Input

The adapter expects a specific input XML structure. These input XML structures can be generated dynamically via XSLT mappings depending on the processed XML data.

XML
 <OPC>
 	<read>
		 <Group name=""/>
		 <Group name=""/>
 	</read>
 	<write>
 		<Group name=""> 
 			<Item name="">...</Item>
			<Item name="">...</Item>
 		</Group>
	 </write>
	 <copy>
 		...
 	</copy> 
</OPC>

Explanation

The following applies to each element <read>:

  • For the element read any number of attributes can be defined, which are copied to the output
  • read element can contain any number of Group-Elemente enthalten

The following applies to each element <write>:

  • For the element write any number of attributes can be defined, which are copied to the output
  • A write element can contain any number of Group elements with any number of Item elements

The following applies to each element <copy>:

  • For the element copy any number of attributes can be defined, which are copied to the output
  • The copy element can contain any number of XML elements with any content; These elements are copied to the output

Output


For all commands the respective attributes are copied to the container elements

Command: read


XML
<OPC>
 <read>
 <Group name=""> 
 <Item name="">...</Item>
 <Item name="">...</Item>
 </Group>
 </read>
</OPC>

Command: write

The command will be executed, but no output will be generated:


XML
<OPC>
 <write/>
</OPC>

Command: copy


XML
<OPC>
 <copy> <!-- XML structure from the input document --> </copy>
</OPC>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.