Stop a logging task
stop(GObj) stops all logging tasks associated with the dagroup object GObj. GObj can be a dagroup object or a vector of dagroup objects. When the function stops a logging task, it sets the object's Logging property value to 'Off', and triggers execution of the object's StopFcn callback.
A dagroup object also stops running when the logging task has acquired all the requested records. This occurs when RecordsAcquired equals RecordsToAcquire.
The object's EventLog property records the Stop event.
Configure and start a logging task for 30 seconds of data:
da = opcda('localhost','Matrikon.OPC.Simulation'); connect(da); grp = addgroup(da,'ExOPCREAD'); itm1 = additem(grp,'Triangle Waves.Real8'); itm2 = additem(grp,'Saw-Toothed Waves.Int2'); grp.LoggingMode = 'memory'; grp.UpdateRate = 0.5; grp.RecordsToAcquire = 60; start(grp);
Stop the logging task after 5 seconds: