This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Number of scans for operation when starting


When working with the session-based interface, use the NumberOfScans property to specify the number of scans the session will acquire during the operation. Changing the number of scans changes the duration of an acquisition. When the session contains output channels, NumberOfScans becomes a read only property and the number of scans in a session is determined by the amount of data queued.



You can change the value only when you use input channels.


Change Number of Scans

Create an acquisition session, add an analog input channel, and display the NumberOfScans.

s = daq.createSession('ni');
ans =


Change the NumberOfScans property.

s.NumberOfScans = 2000
s = 

Data acquisition session using National Instruments hardware:
   Will run for 2000 scans (2 seconds) at 1000 scans/second.
   Operation starts immediately.
      Number of channels: 1
      index Type  Device   Channel  MeasurementType      Range        Name
      ----- ---- --------- ------- ----------------- ---------------- ----
      1     ai   cDAQ1Mod1 ai0       Voltage (Diff)  -10 to +10 Volts