Main Content
flushdata
(To be removed) Remove all logged data records associated with
dagroup
object
Support for the OPC Data Access (DA) standard will be removed in a future release. Instead use OPC Unified Architecture (UA). See Version History.
Syntax
flushdata(GObj)
Description
flushdata(GObj)
removes all records
associated with the dagroup
object GObj
from
the 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