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 data = gilsonpumpobjreadall(gilsonPumpObj)
% GILSONPUMPOBJREADALL returns the current flow rate of Gilson 30x pumps
% data = gilsonpumpobjreadall(gilsonPumpObj) returns a cell array, with
% only the flow rate as the final (5th) element.

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

% pre-allocates the answer
data = cell(1, 6);

% try-catches to get data out without breaking
    % gets flow rate
    data{5} = gilsonpumpobjreadflow(gilsonPumpObj);

    % gets the status
    %data{6} = gilsonpumpobjstatus(gilsonPumpObj);

% gets the status - pumping is defined by the flow not being 0 -
% quicker than hunting for the 'Stop' or 'Run' part of the screen,
% although not rigorously correct - the double 'not' is there to
% convert it into a logical and back again - LOGICAL complains when you
% give it a value that isn't a 0 or a 1. if communications failed, then
% any([]) returns a 0 - i.e. not pumping
data{6} = any(data{5});

Contact us