Code covered by the BSD License  

Highlights from
Jasco Pumps RS232 communicatios

Jasco Pumps RS232 communicatios

by

 

20 May 2013 (Updated )

Commands to read and control Jasco pumps via RS232.

pumpobjwriteflowmode(serialObject, flowMode)
function pumpobjwriteflowmode(serialObject, flowMode)
% PUMPOBJWRITEFLOWMODE sets the flow mode of Jasco pumps
% pumpobjwriteflowmode(serialObject, mode) changes the flow mode of Jasco pumps
% to constant flow (mode == 0) or constant pressure (mode == 1), given a
% valid serial object and a mode number.

% e.g. pumpobjwriteflowmode(serialObject, 0) - sets flow mode to constant
% flow

% Range:

% serialObject = valid serial port object

% flowMode = 0 or 1


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

% error handling
if ~isequal(flowMode, 0) && ~isequal(flowMode, 1)
    % errors
    error('Flow mode must be 0 (constant flow) or 1 (constant pressure).')
end

% forms and writes command
pumpobjcomm('write', serialObject, sprintf('%d cfcp set', flowMode))

Contact us