Code covered by the BSD License  

Highlights from
Jasco BPR RS232 communication

Jasco BPR RS232 communication



20 May 2013 (Updated )

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

function status = bprobjreadheatercontrolstatus(serialObject)
% BPROBJREADHEATERCONTROLSTATUS reads the heater status of Jasco BPRs
% status = bprobjreadheatercontrolstatus(serialObject) reads the current
% heater control 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. bprobjreadheatercontrolstatus(serialObject) - returns the current
% heater control 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 0x86');

% 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