Next: Error Handling
Up: Representation of OPC XML-DA
Previous: OPC Item Properties
Contents
OPC items have a value, containing the actual information, which
corresponds to the value of a fieldbus data point. This value will be
of a certain OPC data type, such as string or integer but also more
complex types, such as an array. In order to access this information,
PyOPC has to map the OPC data type to a corresponding Python data
type, resulting in a possible data conversion. Table 1
describes all possible data conversions.
Table 1:
Data Conversion Between OPC XML-DA and PyOPC
|
Currently, the following data types are not supported by the PyOPC
framework10:
- The decimal data type is currently not supported at all and
cannot be used.
- The time based data types are not fully supported. Instead of
using Pythons datetime module, all data types are converted to the
Python time type. The duration type cannot be used. During conversion,
fractions of seconds and the time zone is lost.
- The base64Binary type is mapped to a Python string. It may be
reasonable to use a corresponding Python type instead, however this is
currently not supported.
[OPCXMLDA] further defines arrays, which may contain OPC data
types from the above. These arrays are directly mapped to Python
lists11 and its elements are
converted as shown in Table 1.
Next: Error Handling
Up: Representation of OPC XML-DA
Previous: OPC Item Properties
Contents
Hermann Himmelbauer
2006-11-07