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 InputType      Range       Name
      ----- ---- --------- ------- --------- ---------------- ----
      1     ai   cDAQ1Mod1 ai0     Diff      -10 to +10 Volts
Was this topic helpful?