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.

rheodyne232objwritecommandmode(serialObject, commandMode)
function rheodyne232objwritecommandmode(serialObject, commandMode)
% RHEODYNE232OBJWRITECOMMANDMODE changes the valve command mode
% rheodyne232objwritecommandmode(serialObject, commandMode) changes the
% command mode of the valve where the mode is a number from 1-5.  It is
% "normally" set to 5, with 0 being level logic, 2 being single pulse
% logic, 3 is BCD logic, 4 is inverted BCD logic, and 5 is dual pulse
% logic.  It is not known how this affects the device in practice.

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

% checks the baud rate supplied
if ~isnumeric(commandMode) || ~isscalar(commandMode) || ismember(commandMode, 1:5)
    % errors
    error('Invalid command mode - it must be an unsigned integer from 1 to 5.')

% sends the command
rheodyne232objcomm(serialObject, ['F', dec2hex(commandMode)]);

Contact us