Code covered by the BSD License  

Highlights from
Realterm communications suite

Realterm communications suite

by

 

06 Jan 2010 (Updated )

Use Realterm in a similar way to using the MATLAB "serial" commands and instrument control toolbox.

realtermserial(varargin)
function handle = realtermserial(varargin)
% REALTERMSERIAL works similar to serial objects, although currently only
% the basic properties (baud rate, flow control etc etc) are supported.

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

% designed to not break!
try
    
    % creates a serial object with the specified values
    serialObject = serial(varargin{:});

    % then creates a real term activeX server using the properties of the
    % serial object
    handle = realterm(handle);
    
catch ME
    
    % deletes the serial object if it didn't work
    if exist('serialObject', 'var')
        
        % delete it
        delete(serialObject)
    end

    % rethrow the error
    rethrow(ME)
end

Contact us