Main Content


Specify destination for logged data


LoggingMode can be set to 'disk', 'memory', or 'disk&memory'. If LoggingMode is set to 'disk', DataChange events (records) are stored to a disk file as specified by LogFileName. If LoggingMode is set to 'memory', records are stored to memory (the buffer). If LoggingMode is set to 'disk&memory', records are stored to memory and to a disk file. LoggingMode defaults to 'memory'.

The disk file or memory buffer contains data logged from the time you issue the start command, until the time you issue a stop command or the number of records specified by the RecordsToAcquire property has been logged. Each DataChange event constitutes one record, containing one or more items. Only items that change value or quality are included in a DataChange event. The logged data includes the ItemID, Value, TimeStamp, and Quality for each item that changed.

Note that when you issue a refresh command while the toolbox is logging, the results of that operation are included in the log, since a refresh forces a DataChange event on the OPC server.

You extract data from memory with the getdata function. You can return the data stored in a log file to the MATLAB® workspace with the opcread function.



Read-only while logging

Applies to


Data type

character vector


[ 'disk' | 'disk&memory' | {'memory'} ]