Code covered by the BSD License  

Highlights from
Jasco Pumps RS232 communicatios

Jasco Pumps RS232 communicatios



20 May 2013 (Updated )

Commands to read and control Jasco pumps via RS232.

function pumpobjdisconnect(serialObject)
% PUMPOBJDISCONNECT terminates communication with Jasco pumps
% pumpobjdisconnect(serialObject) terminates communication with Jasco
% pumps, given serialObject as a valid pump serial object (generated by
% pumpobj).

% e.g. pumpobjdisconnect(pumpobj(9)) - terminates communication with the
% pump attached to COM9, 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 not a valid serial object or is closed
    error('serial must be a valid open serial object.')

% closes communication

% deletes it afterwards

Contact us