Item Properties
OPC-specification allows to add additional information to single OPC-items (opc-item means : a TwinCAT variable). This optional functionality is named "OPC-Item-Properties" in the OPC-spec and allows an opc-client to browse and read these additional properties.
Sample:
As an option the PLC variable "temperature" can hold addition informaton like comment (OPC-Property-ID 101) and also UNIT (OPC-Property-ID 100) which can be offered by the opc-server.
Configuration of OPC Propery ID in the PLC
Add a comment behind PLC-variable declaration. This comment will be interpreted by the opc-server and will define OPC-Item-Properties.
Today only global PLC-variables can contain item-properties. Elements of structures or arrays can not be configured. Future versions of OPC-Server will not have this limitation. |
Sample of PLC variable-declaration:
All item-properties are optional. |
lTemperatur : DWORD;
(* ~
(OPC : 1 : Make variable visible for
OPC-Server)
(OPC_PROP[0005] : 3 :
OPC_PROP_RIGHTS, here Read AND Write Access)
(OPC_PROP[0100] : Grad F :
OPC_PROP_UNIT)
(OPC_PROP[0101] : Demovariable :
OPC_PROP_DESC)
(OPC_PROP[0205] : We are the champions :
OPC_PROP_SND)
(OPC_PROP[0206] : ..\..\info.html :
OPC_PROP_HTML)
(OPC_PROP[0207] : ..\..\service.avi :
OPC_PROP_AVI)
*)
Each time compiling the PLC-project the PLC-Control will create the file <PLC-projectname>.tpy. This XML based file contains information about PLC-variables and their link to the OPC-server.
The OPC server will analyze this information of the TPY file., so configure the OPC-Server to know the file <PLC-projectname>.tpy Details
List of supported OPC-item properties of OPC-Specification :
Property ID | Req./Opt. | Description |
---|---|---|
OPC_PROP[0005] | Optional | OPC_PROP_RIGHTS |
OPC_PROP[0100] | Optional | OPC_PROP_UNIT : Unit |
OPC_PROP[0101] | Optional | OPC_PROP_DESC : Description |
OPC_PROP[0102] | Optional | OPC_PROP_HIEU |
OPC_PROP[0103] | Optional | OPC_PROP_LOEU |
OPC_PROP[0106] | Optional | OPC_PROP_CLOSE |
OPC_PROP[0107] | Optional | OPC_PROP_OPEN |
OPC_PROP[0200] | Optional | OPC_PROP_DSP |
OPC_PROP[0201] | Optional | OPC_PROP_FGC |
OPC_PROP[0202] | Optional | OPC_PROP_BGC |
OPC_PROP[0203] | Optional | OPC_PROP_BLINK |
OPC_PROP[0204] | Optional | OPC_PROP_BMP |
OPC_PROP[0205] | Optional | OPC_PROP_SND |
OPC_PROP[0206] | Optional | OPC_PROP_HTML |
OPC_PROP[0207] | Optional | OPC_PROP_AVI |
|
|
|
OPC_PROP[6007] | Optional | BECKHOFF Defined : Simulation ID |
OPC_PROP[6008] | Optional | BECKHOFF Defined : Alarm enabled |
OPC_PROP[6009] | Optional | BECKHOFF Defined : Alarm ID |
OPC_PROP[6010] | Optional | BECKHOFF Defined : Conversion enabled |
OPC_PROP[6011] | Optional | BECKHOFF Defined : Conversion ID |