Code covered by the BSD License  

Highlights from
Jasco BPR RS232 communication

Jasco BPR RS232 communication

by

 

20 May 2013 (Updated )

Drivers and higher level commands for controlling Jasco BPRs via RS232.

bprobjreadthermocouplestatus(serialObject)
function status = bprobjreadthermocouplestatus(serialObject)
% BPROBJREADTHERMOCOUPLESTATUS reads the thermocouple status of Jasco BPRs
% status = bprobjreadthermocouplestatus(serialObject) reads the current
% thermocouple status of Jasco BPRs.  serialObject is the BPR serial object
% (generated by bproj). The status is returned as a logical value (1 or 0).

% e.g. bprobjreadthermocouplestatus(serialObject) - returns the current
% thermocouple status of the BPR e.g. 1.

% Range:

% serialObject = valid serial port object


% checks the number of arguments
error(nargchk(1, 1, nargin))
    
% requests thermocouple status
status = bprobjcomm(serialObject, '#0x1000 0x87');

% splits response into a cell array - the response should be "#0 0
% status"
status = textscan(status, '%s');

% selects out the status and converts it into a number
status = logical(str2double(status{1}{3}));

Contact us