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.

tempobjwritemintemp.m
function tempobjwritemintemp(serialObject, minTemp)
% TEMPOBJWRITEMINTEMP changes the minimum temp. of Eurotherm controllers
% tempobjwritemintemp(serialObject, maxTemp) changes the minimum
% temperature of Eurotherm temperature controllers given a valid serial
% port object and a temperature from -199.9 to 500.  The temperature is
% sent as single precision.

% e.g. tempobjwritemintemp(tempobj(7), 0) - changes the minimum temperature
% to 0 C on the device on COM7.

% Range:

% serialObject = valid serial object (generated by tempobj)

% minTemp = 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 minTemp < -199.9 || minTemp > 500
    % errors
    error('Minimum temperature must be between -199.9 and 500 C.')
end

% sends command
tempobjcomm('writefullres', serialObject, 1, 112, minTemp);

Contact us