| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → OPC Toolbox |
| Contents | Index |
| Learn more about OPC Toolbox |
flushdata(GObj)
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.
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')
getdata | peekdata | start | stop
![]() | flatnamespace | genslread | ![]() |

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 |