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.

tempobjwriteoutputpower(tempObj, outputPower)
function tempobjwriteoutputpower(tempObj, outputPower)
% TEMPOBJWRITEOUTPUTPOWER changes the output power of Eurotherm controllers
% tempobjwrietoutputpower(tempObj, outputPowerp) changes the outputPower of
% Eurotherm temperature controllers given a valid serial port object and a
% number (%) from 0 to 100.  The output power is sent as a single precision
% number.

% e.g. tempobjwriteoutputpower(tempobj(7), 100) - changes the output power
% to maximum (100%) on the device on COM7.

% Range:

% tempObj = valid serial object (generated by tempobj)

% outputPower = 0 - 100


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

% error handling (the numbers are tested more thoroughly in tempobjcomm)
if outputPower < 0 || outputPower > 100
    % errors
    error('Output power must be between 0 and 100.')
end

% sends command
tempobjcomm('writefullres', tempObj, 1, 3, outputPower);

Contact us