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.

gilsonpumpobjstop(gilsonPumpObj)
function gilsonpumpobjstop(gilsonPumpObj)
% GILSONPUMPOBJSTOP stops Gilson 30x pumps
% gilsonobjstop(gilsonPumpObj) stops the pump.

% This code is almost identical to that of gilsonpumpobjstart - room for
% removal of code duplication if necessary

% e.g. gilsonpumpobjstop(gilsonPumpObj(6)) stops the pump attached to COM6

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

% sets deviceID for future use
deviceID = 1;

% navigates back to the main menu
gilsonpumpobjmainmenu(gilsonPumpObj)

% then goes to the flow screen
gilsonpumpobjcomm('write', gilsonPumpObj, deviceID, 'Kda');

% selects the second line to read out next
gilsonpumpobjcomm('write', gilsonPumpObj, deviceID, 'W1');

% reads out the second line
bottomLine = gilsonpumpobjcomm('read', gilsonPumpObj, deviceID, 'W');

% if it is stopped, start the pump, otherwise do nothing else
if strcmp(bottomLine(24:27), 'Stop')
    % presses the stop button
    gilsonpumpobjcomm('write', gilsonPumpObj, deviceID, 'Ke');
end

% returns control back to the keypad
gilsonpumpobjcomm('write', gilsonPumpObj, deviceID, 'K');

Contact us