Code covered by the BSD License  

Highlights from
CO2gui - lab control and automation

CO2gui - lab control and automation



06 Jan 2010 (Updated )

Software used for controlling and data logging lab equipment.

function tc08disconnect(tc08Handle)
% TC08DISCONNECT terminates communication with PicoLog program
% tc08disconnect(tc08Handle) terminates communication with the PicoLog
% program with the handle given by tc08connect previously.

% e.g. tc08disconnect(tc08connect) connects then disconnects again
% (pointless example)

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

% error handling
if ~isnumeric(tc08Handle) || ~isscalar(tc08Handle) || ~isreal(tc08Handle) || isnan(tc08Handle) || ~tc08Handle
    % errors
    error('Handle must be a real scalar number not equal to 0 obtained from tc08connect')

% terminates communications
response = ddeterm(tc08Handle);

% if it didn't work...
if ~response
    % errors
    error('Did not disconnect from TC-08 properly.')

Contact us