主要内容

table

R2026b

Convert OPC data object to a table

    Description

    dataTable = table(dObj) converts OPC UA data object into an M-by-2n+1 table.

    dObj must have the same time stamps for each of the nodes (elements of dObj), otherwise the function generates an error. Use tsunion, tsintersect, or resample to generate an OPC UA data object containing the same time stamp for all items in the object.

    example

    Examples

    collapse all

    Load the OPC UA example data file, convert the uaDataVis object to have the same time stamps, and convert the resultant data into a table.

    load opcSampleUaData;
    dUnion = tsunion(uaDataSample);
    dTab = table(dUnion);

    Input Arguments

    collapse all

    OPC UA data, specified as an OPC UA data object array. For more information, see Data.

    Output Arguments

    collapse all

    OPC UA data values, returned as a table. dataTable contains an M-by-2N+1 table of data values, where M is the number of data values in dObj and N is the number of nodes in the array.

    Version History

    Introduced in R2015b

    See Also

    Functions