Code covered by the BSD License  

Highlights from
Knauer pump RS232 communication

from Knauer pump RS232 communication by Geoffrey Akien
Functions for communicating with Knauer pumps via RS232.

isvalidknauerpumpheadsize(pumpHeadSize)
function response = isvalidknauerpumpheadsize(pumpHeadSize)
% ISVALIDKNAUERPUMPHEADSIZE checks that a pump head size is valid
% response = isvalidknauerpumpheadsize(pumpHeadSize) checks whether a pump
% head size is valid or not.  The current check is valid only for 10 or 50
% as scalars.

% checks arguments
error(nargchk(1, 1, nargin))

% checks the input
response = isequal(pumpHeadSize, 10) || isequal(pumpHeadSize, 50);

Contact us