Class: de.wireware.opc.OpcMapperModule
From FactorityWiki
Contents |
Summary
Classification: Module for FACTORITY Connectivity Server
This module allows defining datapoints, which are directly mapped to external OPC items.
Note: Since OPC DA is used, this class is only functional using Windows (Win32 to be precise).
Specification
Parameters
| Name | Purpose |
|---|---|
| simulation | If "true", the OPC server is not contacted, but all datapoints are created. All created datapooints are writeable from external. This may be used for development when the real OPC server is not available. |
Data section
Formal specification
<!ELEMENT data (connection)*> <!ELEMENT connection (group)*> <!ELEMENT group (item)*> <!ATTLIST connection host CDATA #REQUIRED server CDATA #REQUIRED client-handle CDATA #REQUIRED online-datapoint CDATA #IMPLIED > <!ATTLIST group name CDATA #REQUIRED update-rate CDATA #REQUIRED percent-dead-band CDATA #IMPLIED > <!ATTLIST item name CDATA #REQUIRED datapoint-name CDATA #REQUIRED datapoint-type CDATA #REQUIRED access-path CDATA #IMPLIED writeable (true,yes,false,no) "false" external-writeable (true,yes,false,no) "false" >
connection: A connection to a specific OPC server
A connection tag defines a connection to specific OPC server.
| Attribute | Purpose |
|---|---|
| host | The ip address or hostname of the computer on which the OPC server resides |
| server | The name of the OPC server |
| client-handle | A textual handle, which represents the client (the Connectivity Server) |
| online-datapoint | If specified a datapoint with this name is created, which is set to true, while the OPC server is online |
group: A OPC item group
A group is a set of items, which is updated together.
| Attribute | Purpose |
|---|---|
| name | The name of this item group |
| update-rate | The update interval (in ms) for the items in this group |
| percent-dead-band | This may be used to limit the amount of updates (see OPC specificaton) |
item: A single OPC item mapped to a WireWare datapoint
This specifies a single OPC item, which is mapped directly to a datapoint.
| Attribute | Purpose |
|---|---|
| name | The name of the OPC item |
| datapoint-name | The name of the datapoint, which is created and to which the OPC item is mapped to |
| datapoint-type | The type of the datapoint (see below) |
| access-path | The path for accessing the OPC item (see OPC specification) |
| writeable | if set to true, the datapoint is writeable. Writes are sent directly to the OPC item. |
| external-writeable | if set to true, a client application may write to the datapoint |
The following datatypes are defined
| integer or int | a 32bit integer value |
| boolean or bool | a boolean value |
| double or float | a double precision floating point value |
| bin:nn | a binary value, with a length of nn bytes, where nn may be between 1 and 1024 |
Datapoints
Only the datapoints, which are specified in the data section are created (see above).
Example
<module>
<class>de.wireware.opc.OpcMapperModule</class>
<name>opc1</name>
<data>
<connection host="localhost"
server="OPC.SimaticNET"
client-handle="w2plc1"
online-datapoint="con1-online">
<group name="test"
update-rate="1000">
<item name="WinCC flexible RT.WinLC RTX.Data_MES.Maschine.life_bit"
datapoint-name="life"
datapoint-type="bool"
writeable="true" />
</group>
</connection>
</data>
</module>
