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.

bprobjwriteheatercontrolstatus(serialObject, status)
function bprobjwriteheatercontrolstatus(serialObject, status)
% BPROBJWRITEHEATERCONTROLSTATUS sets the heater status of Jasco BPRs
% bprobjwritethermocouplestatus(serialObject, status) sets the heater
% control status of Jasco back-pressure regulators, where serialObject is a
% valid serial port object (generated by bprobj) and status is a logical
% number.

% e.g. bprobjwriteheatercontrolstatus(serialObject, 1) - enables heater
% control on the BPR.

% Range:

% serialObject = valid serial port object

% status = 0 or 1

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

% error handling
if ~isnumeric(status) || ~isscalar(status) || ~ismember(status, 0:1)
    % errors
    error('Heater control status must be a logical number (0 or 1)')

% sends command
bprobjcomm(serialObject, sprintf('#0x25 %d', status))

Contact us