This adapter establishes a connection to an OPC server and retrieves and sets values.
Properties
|
|
Defines the operation executed by the function adapter Possible values: |
Parameters
|
|
Main adapter class (do not change!) Possible values: |
|
|
Host name or IP address of the OPC servers |
|
|
Name of the OPC server's Windows domain |
|
|
User name, to access the OPC server |
|
|
Password of the user |
|
|
Class ID of the OPC server software |
|
|
Windows program ID |
Status values
|
|
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
readany number of attributes can be defined, which are copied to the output -
A
readelement can contain any number ofGroup-Elemente enthalten
The following applies to each element <write>:
-
For the element
writeany number of attributes can be defined, which are copied to the output -
A
writeelement can contain any number ofGroupelements with any number ofItemelements
The following applies to each element <copy>:
-
For the element
copyany number of attributes can be defined, which are copied to the output -
The
copyelement 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
<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:
<OPC>
<write/>
</OPC>
Command: copy
<OPC>
<copy> <!-- XML structure from the input document --> </copy>
</OPC>