Code covered by the BSD License  

Highlights from
Data Acquisition Start/Stop Button

4.33333

4.3 | 3 ratings Rate this file 17 Downloads (last 30 days) File Size: 2.22 KB File ID: #4521
image thumbnail

Data Acquisition Start/Stop Button

by Scott Hirsch

 

23 Feb 2004 (Updated 12 Jan 2010)

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

| Watch this File

File Information
Description

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.
 
  Example:
       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

Acknowledgements
This submission has inspired the following:
EQUALIZER
Required Products Data Acquisition Toolbox
MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
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

18 Nov 2004 nick koshnick  
12 Sep 2005 le thanh hiep  
04 Aug 2011 zhenqiang

good I need

Please login to add a comment or rating.
Updates
12 Jan 2010

Updated copyright.

Tag Activity for this File
Tag Applied By Date/Time
example Scott Hirsch 22 Oct 2008 07:14:58
application Scott Hirsch 22 Oct 2008 07:14:58
daq Scott Hirsch 22 Oct 2008 07:14:58
data acquisition Scott Hirsch 22 Oct 2008 07:14:58
button Scott Hirsch 22 Oct 2008 07:14:59
start Scott Hirsch 22 Oct 2008 07:14:59
stop Scott Hirsch 22 Oct 2008 07:14:59
realtime Scott Hirsch 22 Oct 2008 07:14:59
realtime IGENStudentGuy 26 Mar 2011 18:03:02

Contact us at files@mathworks.com