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.

bprobjwritethermocouplestatus(serialObject, status)
function bprobjwritethermocouplestatus(serialObject, status)
% BPROBJWRITETHERMOCOUPLESTATUS sets the thermocouple status of Jasco BPRs
% bprobjwritethermocouplestatus(serialObject, status) sets the thermocouple
% 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. bprobjwritethermocouplestatus(serialObject, 1) - enables the
% thermocouple of the BPR on COM5.

% 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)
    % errprs
    error('Thermocouple status must be a logical number (0 or 1)')

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

Contact us