Code covered by the BSD License  

Highlights from
CO2gui - lab control and automation

CO2gui - lab control and automation

by

 

06 Jan 2010 (Updated )

Software used for controlling and data logging lab equipment.

bprobjwriteheatercontrolstatus(BPRObj, status)
function bprobjwriteheatercontrolstatus(BPRObj, status)
% BPROBJWRITEHEATERCONTROLSTATUS sets the heater status of Jasco BPRs
% bprobjwritethermocouplestatus(BPRObj, status) sets the heater control
% status of Jasco back-pressure regulators, where BPRObj is a valid serial
% port object (generated by bprobj) and status is a logical number.

% e.g. bprobjwriteheatercontrolstatus(BPRObj(5), 1) - enables heater
% control on the BPR on COM5.

% Range:

% BPRObj = valid serial port object

% status = 0 or 1


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

% error handling
if ~isnumeric(status) || ~isscalar(status) || ~ismember(status, 0:1)
    % errprs
    error('Heater control status must be a logical number (0 or 1)')
end

% sends command
bprobjcomm(BPRObj, sprintf('#0x25 %d', status))

Contact us