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.

bprobjstatus(BPRObj)
function status = bprobjstatus(BPRObj)
% BPROBJREADSTATUS reads the status of Jasco BPRs
% status = bprobjstatus(BPRObj) reads the current status of
% Jasco BPRs.  BPRObj is the BPR serial object (generated by bproj). The
% status is returned as 0 (fully open, fully closed, or manual) or 1 (regulated).

% e.g. bprobjreadvalvestatus(bprobj(5)) - returns the current
% valve status of the BPR on COM5 e.g. 1 if regulated.

% Range:

% BPRObj = valid serial port object


% checks the number of arguments
error(nargchk(1, 1, nargin))

% requests valve status
status = bprobjreadvalvestatus(BPRObj);

% if the status is 2 (auto-regulated) or 3 (manual regulation), set the
% response to 1
if status == 2 || status == 3
    % its regulated
    status = true;
    
else
    % set it to 0
    status = false;
end

Contact us