Products & Services Solutions Academia Support User Community Company

Learn more about OPC Toolbox   

flushdata - Remove all logged data records associated with dagroup object

Syntax

flushdata(GObj)

Description

flushdata(GObj) removes all records associated with the dagroup object GObj from the OPC Toolbox engine, and sets RecordsAvailable to 0 for that object.

GObj can be a scalar dagroup object, or a vector of dagroup objects.

Examples

Create a connected client and configure a group with two items:

da = opcda('localhost', 'Matrikon.OPC.Simulation');
connect(da);
grp = addgroup(da, 'ClearEventLogEx');
itm1 = additem(grp, 'Random.Real8');

Acquire 10 records using a logging task:

set(grp, 'UpdateRate', 0.5, 'RecordsToAcquire', 10);
start(grp);
wait(grp);

Examine the records available:

recordCount1 = get(grp, 'RecordsAvailable')

Flush all data from the client:

flushdata(grp)
recordCount2 = get(grp, 'RecordsAvailable')

See Also

getdata | peekdata | start | stop

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS