Code covered by the BSD License  

Highlights from
CO2gui - lab control and automation

CO2gui - lab control and automation

by

 

06 Jan 2010 (Updated )

Software used for controlling and data logging lab equipment.

rheodyne232objstatus(serialObject)
function status = rheodyne232objstatus(serialObject)
% RHEODYNE232OBJSTATUS gets the current status of the rheodyne timer object
% status = rheodyne232status(rheodyneTimer) reads if the Rheodyne timer is
% running or not.  rheodyneTimer is the timer object (generated by
% rheodyneobj). status is 1 if the timer is running, and 0 if it is not.

% e.g. status = rheodyne232objstatus(rheodyne232obj(5)) - returns the
% current status of the rheodyne timer, e.g. 1 for if it is running.


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

% checks the timer is there
if ~isserial(serialObject) || ~isrunning(serialObject)
    % complain
    error('Serial object is not a valid open serial object.')
    
elseif ~isfield(serialObject.UserData, 'timerObject') || ~istimer(serialObject.UserData.timerObject)
    % error
    error('Timer in user data of serial object is not present or is invalid.')
end

% returns the response
status = isrunning(serialObject.UserData.timerObject);

Contact us