For the optimization of the data transfer rate each data client (in this case the PmOpcClientData object) informs the OPC server how it wants to share the specified data. By one of these optimizing parameters it is possible for the data group to set if the group is active (see the Parameters page and the ActiveGroup property). If the group is not active (nor other clients require these data), then the OPC server needn't update these data in its CACHE memory and thus it can update other data more often.
Another optimization is the selection of the data receipt mode. The OPC client can decide if it'll receive the data automatically (and thus it wants the OPC server to sent it the data values that were changed) or if it wants to control the data itself (read and write to the OPC server on a request).
If the OPC client is to receive the data automatically, then it must enable the update for the group (see the Parameters page and the Update property). If the update is enabled, then the OPC server sends changed data values of this group automatically to the client. The update can be further optimized by setting the parameters: the minimum update rate and the dead band (See property: UpdateRate and Deadband property). It means that the OPC server won't sent the data to the client faster that it is defined in the minimum update rate and it won't sent the data if the change of the value is less than the dead band (the change from the last sent value to the client is meant).
If the OPC client is to read and write to the OPC server itself, then it is advisable to disable the automatic update. It is possible otherwise to leave the automatic update switched on and whilst for example to write but it could happen on this combination that before the client writes the required value to the OPC server, this value is updated from the server and thus the value that is already on the OPC server, will be written to it.
For similar reasons it is often desirable - if you want to read the items and to write into them at the same time - rather to create two OPC groups (two PmOpcClientData objects). One group will be determined for reading and the other for writing. Thus the real value states can be better controlled.
In the PmOpcClientData object, the #vars identifier enables access to the data items of the Var type defined on the Data page. This identifier can be used in methods working with application object tree (e.g. for the Pm method), or for the PP binding in the application and in panels. For example the pMe.Pm("opcdata/#vars/aaa") method returns the aaa data item from the object named opcdata that is of the PmOpcClientData type.
The varibales in the PmData object can use ExtOpcClient and register themselves directly into the PmOpcClientData. Then, on the page PmOpcClientData > Data, it is not necessary to define any variables.
Some OPC servers (for Simatic, Schneider, Bernecker&Reiner ..) can transfer a data array (Array) in one data item (the common limitation is that all data array items must be of the same data type). If such data has to be received/sent as well, then the Data type configurator has to be set to Variant data type for the data item (this is disabled in PmRtFree - Free runtime license).
When receiving data containing the Array item, the PROMOTIC system modifies this item into the standard VBscript form (e.g. the Integer values array is transformed into the Variant values array of the Integer subtype). Then one item from this array can be read e.g.
When sending the data containing the Array item it is necessary to save a vector, that is not in the standard VBScript form, into this item. It can be done e.g. by the Pm.TransformValue method with the parameter 41 e.g.