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.

bprobjreadheatercontrolstatus(BPRObj)
function status = bprobjreadheatercontrolstatus(BPRObj)
% BPROBJREADHEATERCONTROLSTATUS reads the heater status of Jasco BPRs
% status = bprobjreadheatercontrolstatus(BPRObj) reads the current
% heater control status of Jasco BPRs.  BPRObj is the BPR serial object
% (generated by bproj). The status is returned as a logical value (1 or 0).

% e.g. bprobjreadheatercontrolstatus(bprobj(5)) - returns the current
% heater control status of the BPR on COM5 e.g. 1.

% Range:

% BPRObj = valid serial port object


% checks the number of arguments
error(nargchk(1, 1, nargin))
    
% requests thermocouple status
status = bprobjcomm(BPRObj, '#0x1000 0x86');

% splits response into a cell array - the response should be "#0 0
% status"
status = textscan(status, '%s');

% selects out the status and converts it into a number
status = logical(str2double(status{1}{3}));

Contact us