Code covered by the BSD License  

Highlights from
CO2gui - lab control and automation

CO2gui - lab control and automation

by

 

06 Jan 2010 (Updated )

Software used for controlling and data logging lab equipment.

rheodyne232objtestcommand(serialObject)
function response = rheodyne232objtestcommand(serialObject)
% RHEODYNE232OBJTESTCOMMAND tests if the rheodyne is working properly
% response = rheodyne232objtestcommand(serialObject) requests the valve
% status twice to check if its working or not (the first time often fails,
% as when testing other commands, it is expecting other communications).

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

% sends the first one (we don't care about this one)
try
    % tries
    rheodyne232objreadversion(serialObject);
    
catch
end

% leave a short pause for robustness
pause(0.5)

% this one we don't try-catch, and allow to error if necessary
response = rheodyne232objreadversion(serialObject);

Contact us