Code covered by the BSD License  

Highlights from
CO2gui - lab control and automation

CO2gui - lab control and automation



06 Jan 2010 (Updated )

Software used for controlling and data logging lab equipment.

function rheodyneobjstart(rheodyneTimer)
% RHEODYNEOBJSTART starts the timer for Rheodyne controllers
% rheodyneobjstart(rheodyneTimer) starts the timer for Rheodyne control,
% given a valid timer object.

% e.g. rheodyneobjstart(rheodyneobj) starts the Rheodyne timer.

% checks the number of arguments
error(nargchk(1, 1, nargin))

% error handling
if length(rheodyneTimer) > 1 || ~isvalid(rheodyneTimer)
    % errors
    error('rheodyneTimer must be a valid scalar timer object.')
elseif ~strcmp(rheodyneTimer.Tag, 'rheodyne')
    % errors
    error('Incorrect timer - the timer must be generated from rheodyneobj.')

% gets the user data
userData = rheodyneTimer.UserData;

% more error handling
if ~isfield(userData, 'audioPlayerObject')
    % error
    error('audioPlayerObject is missing from the timer UserData.')
elseif ~isa(userData.audioPlayerObject, 'audioplayer')
    % error
    error('audioPlayerObject in timer UserData is not an audioplayer object.')

% starts it only if it wasn't already running (stops annoying warnings
% coming up)
if ~isrunning(rheodyneTimer)
    % starts the timer - as there is no start delay this will also
    % immediately start the sound

Contact us