Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

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:

grp.UpdateRate = 0.5;
grp.RecordsToAcquire = 10;
start(grp);
wait(grp);

Examine the records available:

recordCount1 = grp.RecordsAvailable

Flush all data from the client:

flushdata(grp)
recordCount2 = grp.RecordsAvailable

See Also

| | |

Introduced before R2006a

Was this topic helpful?