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.

bprobjwritethermocouplestatus(BPRObj, status)
function bprobjwritethermocouplestatus(BPRObj, status)
% BPROBJWRITETHERMOCOUPLESTATUS sets the thermocouple status of Jasco BPRs
% bprobjwritethermocouplestatus(BPRObj, status) sets the thermocouple
% 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. bprobjwritethermocouplestatus(BPRObj(5), 1) - enables the
% thermocouple of 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('Thermocouple status must be a logical number (0 or 1)')
end

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

Contact us