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: |
Parameters
Adapter | Main adapter class (do not change!) Possible values: |
Host | Host name or IP address of the OPC servers |
Domain | Name of the OPC server's Windows domain |
User | User name, to access the OPC server |
Password | Password of the user |
ClsId | Class ID of the OPC server software |
ProgID | Windows program ID |
Status values
1
| The operation was executed without a technical error |
| 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:
<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.
<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 A
read
element can contain any number ofGroup
-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 ofGroup
elements with any number ofItem
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
Command: read
<OPC>
<read>
<Group name="">
<Item name="">...</Item>
<Item name="">...</Item>
</Group>
</read>
</OPC>
Command: write
<OPC>
<write/>
</OPC>
Command: copy
<OPC>
<copy> <!-- XML structure from the input document --> </copy>
</OPC>