This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Release session hardware resources





release(s) releases all reserved hardware resources in the session s, and flushes any data you have queued in the hardware in that session.

A session might reserve exclusive access to the hardware associated with it. If you need to use the hardware in another session or by applications other than MATLAB®, use release(s) to unreserve the hardware and clear its data.

Hardware resources associated with a session are automatically released when you delete the session object or assign a different value to the variable containing the session object.


collapse all

Create a session and add an analog input voltage channel and acquire data in the foreground:

s1 = daq.createSession('ni');

Release the session hardware and create another session object with an analog input voltage channel on the same device as the previous session. Acquire in the foreground:

s2 = daq.createSession('ni');

Input Arguments

collapse all

Data acquisition session, specified as a session object. Create the session object using daq.createSession. 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.

Introduced in R2010b