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.

gilsonpumpobjwritepumpheadsize(gilsonPumpObj, pumpHeadSize)
function gilsonpumpobjwritepumpheadsize(gilsonPumpObj, pumpHeadSize)
% GILSONPUMPOBJWRITEPUMPHEADSIZE writes the pump head size of Gilson 30x pump
% gilsonpumpobjwritepumpheadsize(gilsonPumpObj, pumpHeadSize) writes the
% pump head size of Gilson 30x pumps, where gilsonPumpObj is a valid
% serial object generated by gilsonPumpObj, and pumpHeadSize is a valid
% pump head size (5, 10, 25, 50, 100 or 200).

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

% error handling of pumpHeadSize
if all(~ismember([5, 10, 25, 50, 100, 200], pumpHeadSize))
    % errors
    error('Pump head size invalid.')

% deviceID
deviceID = 1;

% checks that a module is installed first
if ~strcmp(gilsonpumpobjreadmanometricmodule(gilsonPumpObj), 'None')
    % defines the extra keystrokes necessary to navigate through the extra
    % screens that are present if a module is installed
    keyStrokes = 'a';
    % defines it as empty
    keyStrokes = '';

% no easy way of writing pump head size, so need to navigate into the
% correct menu

% goes to the pump head size screen, enters the new value, then navigates
% back to the flow screen
gilsonpumpobjcomm('write', gilsonPumpObj, deviceID, ['Kaa', keyStrokes, 'a', num2str(pumpHeadSize), 'Ee']);

% reconnects the keypad
gilsonpumpobjcomm('write', gilsonPumpObj, deviceID, 'K');

Contact us