Code covered by the BSD License  

Highlights from
Knauer pump RS232 communication

Knauer pump RS232 communication

by

 

Functions for communicating with Knauer pumps via RS232.

knauerpumpobjwritepumpheadsize(serialObject, pumpHeadSize)
function knauerpumpobjwritepumpheadsize(serialObject, pumpHeadSize)
% KNAUERPUMPOBJWRITEPUMPHEADSIZE changes the pump head size of Knauer pumps
% knauerpumpobjwritepumpheadsize(serialObject, pumpHeadSize) returns the
% pump head size of Knauer pumps, where serialObject is a valid serial
% object generated by knauerpumpobj.  Currently only allows 10 and 50 mL
% pump heads.

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

% checks the pump head size is valid
if ~isvalidknauerpumpheadsize(pumpHeadSize)
    
    % complain
    error('Must supply a valid pump head size - 10 or 50 [mL].')
end

% writes it
knauerpumpobjcomm(serialObject, 'write', sprintf('HEADTYPE:%.0f', pumpHeadSize));

Contact us