OPC XML/DA Client
The ProviewR opc client is implemented as an extern volume, which is mounted somewhere in the
object tree of the root volume. Under the mount object, the branches and items of the server
are displayed with special opc objects. An Opc_Hier object represents a branch and Opc_Int an
item with an integer value, Opc_Boolean an item with a boolean value etc. If an item object is
opened, the item values are displayed in a Value attribute, and some other properties as
description, lowEU, highEU, engineeringUnit, lowIR and highIR are displayed. When the object is
opened a subscription is started, and the value is continuously updated. For integer and float
items there is also an object graph that displays a trend of the value.
With the opc client you can
- browse the branches and items in Xtt, and also display item values and set item values.
- subscribe item values and display them in a Ge graph.
- fetch item values into the plc logic and also write values to items.
The opc client requires that name browsing is implemented in the opc server.
Ge
An item value can be displayed in a Ge graph by using the name in the extern volume. For
example, if the mount object for the extern volume is 'Ext-P1', and the local name of the item
is
/P1/Signals/Ai22
the signal name in Ge will probably be (this is dependent of the browsing function of the
server)
Ext-P1-P1-Signals-Ai22.Value##Float32
presuming that it is a float datatype.
Plc
Item values can also be handled in the plc program, using the GetExt... and CStoExt... objects.
The objects normally used for getting and storing attributes GetDp, GetAp, StoDp, StoAp etc.
can not be used, as they require that the referenced name is known in the development
environment, which is not the case for most extern volumes. In the Ext objects, the reference
is made with a name string, making it possible to enter the item name. To get the value of the
item in the previous example, you should use a GetExtFloat32 object, and the object name should
be
Ext-P1-P1-Signals-Ai22.Value
To store a value in an item, lets say /P1/Signals/Ao5, you use a CStoExtFoat32. This object
makes a conditional storage, and only on a positive edge of the condition. Compare with the
CStoAp, where the value is stored, as long as the condition is true. The reference name in the
CStoExtFloat32 object in this case should be
Ext-P1-P1-Signals-Ao5.Value
Client process
For each opc client-server connection a client process has to be started. The executable for
this process is opc_provider that has the arguments
1. Opc server URL
2. Extern volume id
3. Extern volume name
4. Server identity (optional, default 200)
Configuration
Register ExternVolume
Register the externvolume in the GlobalVolumeList with a volume name and identity.
Application file
Add a line in the application file to start the opc_provider. Here is an example for an opc
client connecting to the opc server 'http://servernode:8080'. The registered externvolume has
the name MyOpcVolume with volume id 0.1.99.55
opc_provider, opc_provider, noload, run, opc_provider, 9, nodebug,
http://servernode:8080 0.1.99.55 MyOpcVolume
If item values are fetched into the plc, the priority should be set to 4 (sixth argument).
Mount object
Create a mount object in the plant hierarchy of the rootvolume, and insert the objid of the
volumeobject in the externvolume into the Object attribute. In the example above this objid is
_O0.1.99.55:0.
Hint
The application file resides on $pwrp_load and has the name
$pwrp_load/ld_appl_'nodename'_'busnumber'.txt
where nodename is the name of the node, and busnumber the qcom bus number. If the node is
'mynode' and the busnumber is 507, the filename will be
$pwrp_load/ld_appl_mynode_507.txt