Main Content

Display Data Objects

OPC HDA data read operations can produce a large amount of data returned to MATLAB®. To accommodate this, OPC Toolbox™ provides two functions to display data objects. By default, a summary of the data is presented. To display data in this form, type the object name at the MATLAB command line, similar to this:

myDataObject
1-by-1 OPC HDA Data object:
       ItemID          Value           Start TimeStamp           End TimeStamp                  Quality           
    ------------  ---------------  -----------------------  -----------------------  -----------------------------
    Scalar.Item1  8 double values  2010-10-13 14:18:11.832  2010-11-11 14:18:11.832  1 unique quality [Extra Data]

The showValues function displays the internal values of the data object in a table. This form is preferable if you want all the data values to be visible, for example when generating reports or visually scanning the data.

myDataObject.showValues
OPC HDA Data object for item Scalar.Item1:
           TIMESTAMP             VALUE          QUALITY
    =======================  =============  ================
    2010-10-13 14:18:11.832       3.000000  Extra Data (Bad)
    2010-10-18 14:18:11.832      37.000000  Extra Data (Bad)
    2010-10-22 14:18:11.832      17.000000  Extra Data (Bad)
    2010-10-23 14:18:11.832      21.000000  Extra Data (Bad)
    2010-11-01 14:18:11.832      25.000000  Extra Data (Bad)
    2010-11-09 14:18:11.832      38.000000  Extra Data (Bad)
    2010-11-10 14:18:11.832      31.000000  Extra Data (Bad)
    2010-11-11 14:18:11.832      39.000000  Extra Data (Bad)