Main Content

resetcounters

Reset hardware scan count for all counter inputs

Since R2020a

Description

example

resetcounters(d) resets hardware scan count for all counter inputs between on-demand reads on the DataAcquisition d.

Examples

collapse all

Configure a DataAcquisition to measure an EdgeCount until the count exceeds a threshold, then reset the counter.

d = daq("ni");
addinput(d,"Dev1","ctr0","EdgeCount");
maxCount = 100;            
count = read(d);
while count <= maxCount
    count = read(d);
end
resetcounters(d);

Input Arguments

collapse all

DataAcquisition interface, specified as a DataAcquisition object, created using the daq function.

Example: d = daq()

Version History

Introduced in R2020a