Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

NumberOfScans

Number of scans for operation when starting

Description

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.

Tips

Values

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

Example

Change Number of Scans

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

s = daq.createSession('ni');
addAnalogInputChannel(s,'cDAQ1Mod1','ai0','Voltage');
s.NumberOfScans
ans =

                 1000

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
Was this topic helpful?