Documentation Center

  • Trial Software
  • Product Updates

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 output channels, DurationInSeconds becomes a read only property and its value is determined by .

Values

In a session with only input 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, the DurationInSeconds is set to 1 second.

Examples

Create a session object, add an analog input channel, and change the duration:

s=daq.createSession('ni');
addAnalogInputChannel(s,'cDAQ1Mod1','ai0','voltage');
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 InputType      Range       Name
      ----- ---- --------- ------- --------- ---------------- ----
      1     ai   cDAQ1Mod1 ai0     Diff      -10 to +10 Volts

See Also

Properties

NumberOfScans, Rate

Functions

addCounterInputChannel

Was this topic helpful?