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. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Release session resources





release(s) releases all reserved hardware resources.

When you associate hardware with a session using the Data Acquisition Toolbox™, the session reserves exclusive access to the data acquisition hardware.

Hardware resources associated with a session are automatically released when you delete the session object, or you assign a different value to the variable containing your session object. Optionally, you can use s.release to release reserved hardware resources if you need to use it in another session or to use applications other than MATLAB® to access the hardware.

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.


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