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.

tempobjwritemaxtemp.m
function tempobjwritemaxtemp(tempObj, maxTemp)
% TEMPOBJWRITEMAXTEMP changes the maximum temp. of Eurotherm controllers
% tempobjwritemaxtemp(tempObj, maxTemp) changes the maximum temperature of
% Eurotherm temperature controllers given a valid serial port object and a
% temperature from -199.9 to 500.  The temperature is sent as a single
% precision number.

% e.g. tempobjwritemaxtemp(tempobj(7), 500) - changes the maximum
% temperature to 500 C on the device on COM7

% Range:

% tempObj = valid serial object (generated by tempobj)

% maxTemp = number: -199.9 - 500


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

% error handling (the numbers are tested more thoroughly in tempobjcomm)
if maxTemp < -199.9 || maxTemp > 500
    % errors
    error('Maximum temperature must be between -199.9 and 500 C.')
end

% sends command
tempobjcomm('writefullres', tempObj, 1, 111, maxTemp);

Contact us