Code covered by the BSD License  

Highlights from
Thar ABPR-20 RS232 communication via handheld emulation

Thar ABPR-20 RS232 communication via handheld emulation


Geoffrey Akien


20 May 2013 (Updated )

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

function currentExtTemp = tharbprobjcurrentexttemp(serialObject)
% THARBPROBJCURRENTEXTTEMP reads the current external temp of Thar BPRs
% currentExtTemp = tharbprobjcurrentexttemp(serialObject) reads the current
% external temperature of Thar BPRs. serialObject is the BPR serial object
% (generated by tharbprobj). The temperature is returned as a double
% precision scalar number in C.

% e.g. currentExtTemp = tharbprobjcurrentexttemp(serialObject) - returns
% the current external temperature of the BPR e.g. 50 C.

% Range:

% serialObject = valid serial port object

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

% navigates to second display menu and fetches contents of screen
response = tharbprobjdisplaymenu2(serialObject);

% the set pressure is the first number on the 3rd line of the screen (if on
% the second F3 screen)
currentExtTemp = str2double(response{3}(18:20));

% presses F3 again to go back to the first display menu
tharbprobjcomm('write', serialObject, 19)

Contact us