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.

tempobjdisconnect(serialObject)
function tempobjdisconnect(serialObject)
% TEMPOBJDISCONNECT terminates communication with Eurotherm controllers
% tempobjdisconnect(serialObject) terminates communication with Eurotherm
% series 2000 temperature controllers, given tempObj as a valid temperature
% controller serial object (generated by tempobj).

% e.g. tempobjdisconnect(tempobj(7)) - terminates communication with the
% temperature controller attached to COM7

% Range:

% serialObject = valid serial port object


% error handling
if nargin < 1
    % errors
    error('Insufficient arguments.')
    
elseif ~isvalidtempobj(serialObject)
    % Strictly speaking this check is unnecessary, but retained for future
    % use should the use of tempobjdisconnect only be intended for use with
    % objects generated from tempobj
    error('Invalid serial object.')
end
    
% closes communication (MLint will complain this gives an output - this is
% not true for serial objects)
fclose(serialObject)

% deletes object
delete(serialObject)

Contact us