Code covered by the BSD License  

Highlights from
Knauer pump RS232 communication

Knauer pump RS232 communication



Functions for communicating with Knauer pumps via RS232.

function knauerpumpobjdisconnect(serialObject)
% KNAUERPUMPOBJDISCONNECT terminates communication with Knauer pumps
% knauerpumpobjdisconnect(serialObject) terminates communication with
% Knauer pumps, given serialObject as a valid pump serial object (generated
% by knauerpumpobj).

% e.g. knauerpumpobjdisconnect(serialObject) - terminates communication with the
% pump, then deletes and clears the serial object

% Range:

% serialObject = valid serial port object

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

% error handling
if ~isa(serialObject, 'serial') || ~isvalid(serialObject) || ~strcmp(serialObject.Status, 'open')
    % errors if the realterm handle isn't there, and the serial object is
    % closed
    error('serial must be a valid open serial object.')

% closes communication conventionally

% deletes it afterwards

Contact us