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 currentProfile = tharbprobjreadcurrentprofile(tharBPRObj)
% THARBPROBJREADCURRENTPROFILE reads the current profile of Thar BPRs
% currentProfile = tharbprobjreadcurrentprofile(tharBPRObj) reads the
% current profile of Thar BPRs. tharBPRObj is the BPR serial object
% (generated by tharbproj). The profile is either 'A' or 'B'.

% e.g. currentProfile = tharbprobjreadcurrentprofile(tharbprobj(5)) -
% returns the current profile of the Thar BPR on COM5 e.g. 'A'.

% Range:

% tharBPRObj = valid serial port object

% check the number of arguments
error(nargchk(1, 1, nargin))
% navigates to main display menu and fetches contents of screen
response = tharbprobjdisplaymenu(tharBPRObj);

% the current profile is on the 2nd line of the screen (if on the first F3
% screen)
currentProfile = response{2}(9);

% checks the profile and error it it isn't valid
if ~istharbprobjprofile(currentProfile)
    % error
    error('Unexpected profile returned.')

Contact us