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.

bprobjreadsettemp.m
function setTemp = bprobjreadsettemp(BPRObj)
% BPROBJREADSETTEMP reads the set temperature of Jasco BPRs
% setTemp = bprobjreadsettemp(BPRObj) reads the current set temperature of
% Jasco BPRs.  BPRObj is the BPR serial object (generated by bprobj). The
% temperature is returned as a scalar in C.

% e.g. bprobjreadsettemp(bprobj(5)) - returns the current set temperature
% of the BPR on COM5 e.g. 50 (C)

% Range:

% BPRObj = valid serial port object


% checks the number of arguments
error(nargchk(1, 1, nargin))
    
% requests set temperature
setTemp = bprobjcomm(BPRObj, '#0x1000 0x85');

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

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

Contact us