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.

tempobjwritesettemp.m
function tempobjwritesettemp(tempObj, setTemp)
% TEMPOBJWRITESETTEMP changes the set point of Eurotherm controllers
% tempobjwritesettemp(tempObj, setTemp) changes the set temperature of
% Eurotherm temperature controllers given a valid serial port object and a
% temperature from -199.9 to 500.0.  The temperature is sent as single
% precision.

% e.g. tempobjwritesettemp(tempobj(7), 37.596) - changes set point to
% 37.596 C on the device on COM7

% Range:

% tempObj = valid serial object (generated by tempobj)

% setTemp = number: -199.9 - 500


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

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

% sends command
tempobjcomm('writefullres', tempObj, 1, 2, setTemp);

Contact us