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.

bprobjreadmaxpress(BPRObj)
function maxPress = bprobjreadmaxpress(BPRObj)
% BPROBJREADMAXPRESS reads the maximum pressure of Jasco BPRs
% maxPress = bprobjreadmaxpress(BPRObj) reads the current maximum pressure
% of Jasco BPRs. BPRObj is the BPR serial object (generated by bproj). The
% pressure is returned in bar.

% e.g. bprobjreadmaxpress(bprobj(5)) - returns the current maximum pressure
% of the BPR on COM5 e.g. 300 (bar)

% Range:

% BPRObj = valid serial port object


% checks the number of arguments
error(nargchk(1, 1, nargin))
    
% requests set pressure
maxPress = bprobjcomm(BPRObj, '#0x1000 0x82');

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

% selects out the pressure and converts it into bar
maxPress = hex2dec(maxPress{1}{3}) / 10;

Contact us