Contenido principal

showValues

Display table of values for OPC HDA data object

Description

showValues(dObj) displays a table of values for the OPC HDA data object or array of OPC HDA data objects specified in dObj.

If you specify a single data object in dObj, the table lists each timestamp with its corresponding value and quality.

If you specify multiple data object with the same timestamp in dObj, the table lists the timestamp followed by the value of each item.

If you specify multiple data object with different timestamps in dObj, the function generates an error. Use the tsunion method to generate an array with each item containing the same timestamps.

The date display preference determines the display format of the timestamp. You can set the format by using opc.setDateDisplayFormat.

example

Examples

collapse all

Load the OPC HDA example data file. Display the timestamps and the corresponding values and quality readings of the first hdaDataSmall object.

load opcSampleHdaData;
opc.setDateDisplayFormat('yyyy-mm-dd HH:MM:SS');
showValues(hdaDataSmall(1))
         TIMESTAMP           VALUE       QUALITY
    ===================  =============  ==========
    2010-06-01 09:30:00       0.000000  Raw (Good)
    2010-06-01 09:30:15       1.000000  Raw (Good)
    2010-06-01 09:30:30       2.000000  Raw (Good)
    2010-06-01 09:30:45       1.000000  Raw (Good)
    2010-06-01 09:31:00       0.000000  Raw (Good)

Input Arguments

collapse all

Raw OPC HDA data, specified as an OPC HDA data object or an array of OPC HDA data objects. All items in the data object array must have same timestamps.

Version History

Introduced before R2006a

See Also

Functions