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.

daq.createSession

Create data acquisition session for specific vendor hardware

Syntax

session = daq.createSession(vendor)

Description

example

session = daq.createSession(vendor) creates a session object for configuring and operating data acuisition devices from the specified vendor.

Examples

collapse all

Create a data acquisition session object s, for National Instruments® devices.

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

Data acquisition session using National Instruments hardware:
   Will run for 1 second (1000 scans) at 1000 scans/second.
   No channels have been added.   

Input Arguments

collapse all

Vendor name for the device you want to create a session for, specified as a character vector. Valid vendors are:

  • 'ni'

  • 'digilent'

  • 'directsound'

  • 'adi'

  • 'mcc'

Data Types: char | string

Output Arguments

collapse all

Data acquisition session, returned as a session object. Use the data acquisition session for acquisition and generation operations. Create one session per vendor and use that vendor session to perform all data acquisition operations.

The session has the following properties:

ChannelsArray of channel objects associated with session object
ConnectionsArray of connections in session
DurationInSecondsSpecify duration of acquisition
IsContinuousSpecify if operation continues until manually stopped
IsDoneIndicate if session operation is complete
IsLoggingIndicate if hardware is acquiring or generating data
IsNotifyWhenDataAvailableExceedsAutoControl if NotifyWhenDataAvailableExceeds is set automatically
IsNotifyWhenScansQueuedBelowAutoControl if NotifyWhenScansQueuedBelow is set automatically
NotifyWhenDataAvailableExceedsControl firing of DataAvailable event
NotifyWhenScansQueuedBelowControl firing of DataRequired event
NumberOfScansNumber of scans for operation when starting
RangeSpecify channel measurement range
RateRate of operation in scans per second
RateLimitLimit of rate of operation based on hardware configuration
ScansAcquiredNumber of scans acquired during operation
ScansOutputByHardwareIndicate number of scans output by hardware
ScansQueuedIndicate number of scans queued for output
UserDataCustom data
VendorVendor information associated with session object

Introduced in R2010b

Was this topic helpful?