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.

function maxTemp = bprobjreadmaxtemp(BPRObj)
% BPROBJREADMAXTEMP reads the maximum temperature of Jasco BPRs
% maxTemp = bprobjreadmaxtemp(BPRObj) reads the current maximum temperature
% of Jasco BPRs.  BPRObj is the BPR serial object (generated by bproj). The
% temperature is returned as a scalar in C.

% e.g. bprobjreadmaxtemp(bprobj(5)) - returns the current maximum
% temperature of the BPR on COM5 e.g. 90 (C)

% Range:

% BPRObj = valid serial port object

% checks the number of arguments
error(nargchk(1, 1, nargin))
% requests maximum temperature
maxTemp = bprobjcomm(BPRObj, '#0x1000 0x83');

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

% selects out the temperature and converts it into C
maxTemp = hex2dec(maxTemp{1}{3}) / 100;

Contact us