# Documentation

### This is machine translation

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

# DurationInSeconds

Specify duration of acquisition

## Description

When working with the session-based interface, use the DurationInSeconds property to change the duration of an acquisition.

When the session contains analog, digital, or audio output channels, DurationInSeconds is a read-only property whose value is determined by $\frac{s.ScansQueued}{s.Rate}$.

If the session contains only counter output channels with PulseGeneration measurement type, then DurationInSeconds represents the duration of the pulse train signal generation.

## Values

In a session with only input channels or counter output channels, you can enter a value in seconds for the length of the acquisition. Changing the duration changes the number of scans accordingly. By default, DurationInSeconds is set to 1 second.

## Examples

s = daq.createSession('ni');
s.DurationInSeconds = 2
s =

Data acquisition session using National Instruments hardware:
Will run for 2 seconds (2000 scans) 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