Code covered by the BSD License  

Highlights from
Eurotherm Modbus RS232 Control

Eurotherm Modbus RS232 Control

by

 

11 Jul 2009 (Updated )

Reads and writes information to Eurotherm controllers via Modbus RTU protocols.

tempobjwriteoutputpower(serialObject, outputPower)
function tempobjwriteoutputpower(serialObject, outputPower)
% TEMPOBJWRITEOUTPUTPOWER changes the output power of Eurotherm controllers
% tempobjwrietoutputpower(serialObject, outputPower) 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:

% serialObject = 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', serialObject, 1, 3, outputPower);

Contact us