Code covered by the BSD License  

Highlights from
Data Acquisition Start/Stop Button


4.2 | 4 ratings Rate this file 21 Downloads (last 30 days) File Size: 2.22 KB File ID: #4521
image thumbnail

Data Acquisition Start/Stop Button



23 Feb 2004 (Updated )

Adds a stop/start button to a data acquisition applications.

| Watch this File

File Information

DAQSTOPBUTTON(FIG,OBJ) adds a start/stop button to figure FIG. This button can be used to start and stop data acquisition object OBJ. DAQSTOPBBUTTON will also delete OBJ when FIG is closed (i.e., it sets FIG's CloseRequestFcn to delete the object).
DAQSTOPBUTTON(FIG,OBJ,'P1','V1','P2','V2', ...) specifies Property-Value pairs for configuring properties of the start/stop button. Any valid property of a togglebutton can be specified.
HBUTTON = DAQSTOPBUTTON(...) returns a handle to the start/stop button.
       fh = figure; % Create a figure
       ai = analoginput('winsound'); % Create an input object
       addchannel(ai,1); % Add a channel
       set(ai,'TriggerRepeat',inf); % Configure to run infinitely
       set(ai,'TimerFcn','plot(peekdata(ai,500))'); % Each timer event will plot recent data
       hButton = daqstopbutton(fh,ai); % Add the stopbutton


Octave inspired this file.

This file inspired Equalizer.

Required Products Data Acquisition Toolbox
MATLAB release MATLAB 6.5 (R13)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
27 Mar 2014 Rajeev Yadav

Can you demonstrate if this works when we have GUIDE START pushbutton? I wouldlike to do continuous session based acquisition.

01 Jun 2012 Patrick

Sorry disregard!

01 Jun 2012 Patrick

Is there anyway to make the text on the button change from start to stop when it is toggled? Thanks!

04 Aug 2011 zhenqiang

good I need

12 Sep 2005 le thanh hiep  
18 Nov 2004 nick koshnick  
03 Jun 2004 Kompetch hirunpanit

1 GUI and M.file Data Acquisition Application used soundcard and serial port
2 GUI and M.file Test and Measurement Application used soundcard and serial port

12 Jan 2010

Updated copyright.

Contact us