Jasco Pumps RS232 communicatios
20 May 2013
01 Jul 2013)
Commands to read and control Jasco pumps via RS232.
% PUMPOBJCONNECT initialises communication with Jasco pumps
% pumpobjconnect(serialObject) initialises communication with Jasco pumps,
% given serialObject as a valid pump serial object (generated by pumpobj).
% e.g. pumpobjconnect(serialObject) - initialises communication with the
% pump attached to COM9.
% serialObject = valid serial port object
% checks the number of input arguments
error(nargchk(1, 1, nargin))
% error handling
if ~isa(serialObject, 'serial') || ~isvalid(serialObject) || ~strcmp(serialObject.Status, 'closed')
error('serialObject must be a valid closed serial object.')
% opens communication (MLint wrongly reports this as outputting something)
% Vista needs a brief pause to behave itself correctly - I've left his is
% for XP too, but in case you wanted to shave off that whole 400 ms, you
% could try...BUT old MATLAB versions detect Vista as "Microsoft Windows
% 2000" - whether this is required or not for realterm has not been tested
%if isempty(strfind(system_dependent('getos'), 'XP'))