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.

realtermfprintf(handle, input, terminator)
function realtermfprintf(handle, input, terminator)
% REALTERMFPRINTF sends a command to the serial device via realterm.

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

% error handling
if ~isrealtermhandle(handle)
    % the real term handle must be a valid handle
    error('The realTermHandle is not valid.')
elseif ~isrunning(handle)
    % realterm must be connected
    error('Realterm is not connected to the serial object.')
elseif ~isstring(input)
    % the input must be a string
    error('Must send the data as a string.')
elseif ~isstring(terminator)
    % if supplied the terminator must be a string
    error('The terminator must be a string.')

% currently just runs the fwrite command - not very sophisticated
realtermfwrite(handle, [input, terminator])

Contact us