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.

rheodyne232objstart(serialObject)
function rheodyne232objstart(serialObject)
% RHEODYNE232OBJSTART starts the timer for Rheodyne controllers
% rheodyne232objstart(serialObject) starts the timer for Rheodyne control,
% given a valid timer object.

% e.g. rheodyne232objstart(rheodyne232obj(8)) starts the Rheodyne timer for
% the Rheodyne attached to COM8.


% 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

% starts it only if it wasn't already running (stops annoying warnings
% coming up)
if ~isrunning(serialObject.UserData.timerObject)
    % starts the timer
    start(serialObject.UserData.timerObject)
end

Contact us