The app known as OPC Client in past releases is now called the OPC Data Access Explorer. opcDataAccessExplorer is a new corresponding command-line function that opens the app programmatically. The function opctool continues to open this app.
A new function, opchda, creates an OPC HDA client object in MATLAB. For more information on this function, see the opchda reference page.
The troubleshooting utility opcsupport has been enhanced to support OPC HDA as well as OPC DA functionality.
Two new troubleshooting utilities are provided specifically for OPC HDA and OPC DA:
For R2012a, error and warning message identifiers have changed in OPC Toolbox™.
If you have scripts or functions that use message identifiers that changed, you must update the code to use the new identifiers. Typically, message identifiers are used to turn off specific warning messages, or in code that uses a try/catch statement and performs an action based on a specific error identifier.
To determine the identifier for a warning, run the following command just after you see the warning:
[MSG,MSGID] = lastwarn;
This command saves the message identifier to the variable MSGID.
To determine the identifier for an error, run the following commands just after you see the error:
exception = MException.last; MSGID = exception.identifier;
This release supports OPC Toolbox in 64-bit MATLAB®.
Before using OPC Toolbox with 64-bit MATLAB for the first time, you must run opcregister to install the 64-bit OPC Core Components. This applies even if you have previously installed the OPC Core Components, either through 32-bit MATLAB or installation of an OPC Server on the local host. Failure to install the 64-bit OPC Core Components that ship with this version of OPC Toolbox can result in local OPC servers being unavailable to OPC Toolbox.
OPC Toolbox now supports OPC Historical Data Access (OPC HDA) specification version 1.2. This allows you to access and visualize historical process data from an OPC Historical Data Access server (commonly referred to as an historian).
Key features of OPC HDA support are:
You can browse networks for Historical Data Access servers.
A single OPC HDA client object allows you to manage connections to an HDA server, to browse the server name space, and to read raw and processed data from the server.
An OPC Historical Data Access object allows you to easily manipulate and visualize data retrieved from OPC HDA servers.
The OPC HDA read functions include:
readRaw — Reads raw historical data for a selection of item tags over a selected time span.
readAtTime — Reads data from the server at specific time intervals. It can return array data as an output, by specifying an optional 'datatype' argument.
readProcessed — Reads processed data from the server for chosen item tags using an aggregate type defined from a list of available types. It can return array data as an output, by specifying an optional 'datatype' argument.
readModified — Reads all modified data between two times for a particular item.
The OPC HDA data object functions include:
tsunion — (Time stamp union) Converts all data to have the same time stamps, by resampling at the union of the time stamps of all items.
tsintersect — (Time stamp intersection) Converts all data to have the same time stamps, using the time stamps common to all items in the array. Removes all data that is not common to all elements (items) in the data object.
resample — Converts all data to have the given (regularly) sampled time stamps that you provided. Combines elements with the same item ID, so that resample creates data objects with unique item IDs.
plot — Generates a plot so you can visualize the historical data.
For a command-window listing of available functions and links to their specific help, type:
You access the Historical Data Access (HDA) functions through the opc.hda package. For this reason, to get help on a particular HDA function, you must prefix the function name with opc.hda. For example, to get help on the getServerInfo function, type:
Other prefixes, such as opc, opc.hda.Data, or opc.hda.Client might be necessary, as listed in the output for help opc.hda.
To view OPC HDA documentation in the help browser, see
The new trend function provides a graphical display of live OPC data for an OPC group object. You can now watch live data stream to a MATLAB figure window. The trend functionality is independent of OPC logging tasks. More information is available on the trend reference page.
OPC Toolbox software now supports time series objects, allowing easier analysis and visualization of time domain data in MATLAB software. The addition of this functionality involves the extension of the existing OPC Toolbox functions getdata and opcread to support the creation of MATLAB time series objects. The new functions opcstruct2timeseries and opcqid have also been added to the toolbox to support this feature. More information is available on the reference pages for these functions.
The opcregister function has been enhanced with a '-silent' option to install OPC Foundation Core components without dialog boxes.
The event log is no longer cleared when a new event arrives and the event log is full. Instead, the oldest event is removed to make space for the new event. For more information, see the reference page for the EventLogMax property, by typing
You can now change the TimerPeriod property while a client object is connected.
This release of OPC Toolbox software includes support for communicating with OPC servers from Simulink® software. The OPC Toolbox block library includes blocks for reading data from an OPC server, writing data to an OPC server, and running a Simulink simulation in pseudo real time (by slowing the simulation to run at system time). For more information on using OPC Toolbox software with Simulink software, see Using the OPC Toolbox Block Library in the User's Guide.
The QualityID property has been added to daitem objects. The QualityID, expressed as a 16-bit unsigned integer, represents the quality of the data item when last read. To work with the QualityID property, you use the function opcqparts to convert the QualityID property into vendor, major, substatus, and limit status information; and the function opcqstr to convert the QualityID property into a string. For more information, see the QualityID property reference page.
|Release||Features or Changes with Compatibility Considerations|
|R2012a||Conversion of Error and Warning Message Identifiers|