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.

tempobjwritemode(tempObj, mode)
function tempobjwritemode(tempObj, mode)
% TEMPOBJWRITEMODE changes the operating mode of Eurotherm controllers
% tempobjwritemode(tempObj, mode) changes the operating mode of
% Eurotherm Series 2000 temperature controllers given a valid serial port
% object and a mode of 0 (auto) or 1 (manual).

% e.g. tempobjwritemode(tempobj(7), 1) - changes mode to automatic on
% the device on COM7

% Range:

% tempObj = valid serial object (generated by tempobj)

% mode = number: 0 or 1


% check the number of arguments
error(nargchk(2, 2, nargin))

% error handling (the numbers are tested more thoroughly in tempobjcomm)
if ~isequal(mode, 0) && ~isequal(mode, 1) && ~isequal(mode, 2)
    % errors
    error('Mode must be either 0 (automatic), 1 (manual), or 2 (off).')
end

% sends command
tempobjcomm('write', tempObj, 1, 273, mode);

Contact us