The session-based interface provides functions for both foreground and background data acquisition. Foreground data acquisition blocks the MATLAB command line; background acquisition does not. Background acquisition enables you to collect data continuously and plot or process the data while you are collecting it. A listener is available to flag session events. When an event occurs, the specified callback function is executed.