| OPC Toolbox™ | ![]() |
TS = opcstruct2timeseries(S)
TS = opcstruct2timeseries(S) converts the OPC data structure S into a cell array of time series objects. S must be a structure in the format returned by the getdata and opcread functions. S must contain the fields LocalEventTime and Items. The Items field of S must contain the fields ItemID, Value, Quality, and TimeStamp.
The cell array TS contains as many time series objects as there are unique item IDs in the data structure, with the name of each time series object set to the item ID. The quality is stored in the time series object although the time series object's quality value is offset from the quality value returned by the OPC server by 128. However, the quality strings displayed are the same. Because each record logged might not contain information for every item, the time series objects have only as many data points as there are records containing information about that particular item ID.
getdata, opcread, opcstruct2array, timeseries
![]() | opcstruct2array | opcsupport | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |