Code covered by the BSD License  

Highlights from
Thar ABPR-20 RS232 communication via handheld emulation

Thar ABPR-20 RS232 communication via handheld emulation

by

 

20 May 2013 (Updated )

Controls and reads from a Thar ABPR-20, by emulating the handheld controller.

tharbprobjcurrentpress(serialObject)
function currentPress = tharbprobjcurrentpress(serialObject)
% BPROBJCURRENTPRESS reads the current pressure of Thar BPRs
% currentPress = tharbprobjreadcurrentpress(serialObject) reads the current
% pressure of Thar BPRs. serialObject is the BPR serial object (generated
% by tharbproj). The pressure is returned in bar.

% e.g. tharbprobjcurrentpress(serialObject) - returns the current pressure
% of the thar BPR e.g. 100 (bar)

% Range:

% serialObject = valid serial port object


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

% the current pressure is the second number on the 4th line of the screen
% (if on the first F3 screen)
currentPress = str2double(response{4}(17:19));

Contact us