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.

tharbprobjreadcontrolstatus(serialObject)
function controlStatus = tharbprobjreadcontrolstatus(serialObject)
% BPROBJREADCONTROLSTATUS reads the control status of Thar BPRs
% controlStatus = tharbprobjreadcontrolstatus(serialObject) reads the
% current control status of Thar BPRs. serialObject is the BPR serial
% object (generated by tharbproj). The control status is either 1 (on) or 0
% (off).

% e.g. tharbprobjreadcontrolstatus(serialObject) - returns the current
% control status of the Thar BPR e.g. 'off'

% Range:

% serialObject = valid serial port object


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

% the current profile is on the 2nd line of the screen (if on the first F3
% screen)
controlStatus = onoff(strtrim(response{2}(18:20)));

Contact us