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.

bprobjstop(serialObject)
function bprobjstop(serialObject)
% BPROBJSTOP fully closes the Jasco BPR valve
% bprobjstop(serialObject) fully close the Jasco BPR valve

% e.g. bprobjstop(serialObject) closes the BPR valve fully


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

% sends command to make sure its not in manual mode
bprobjcomm(serialObject, '#23 0')

% gets the current valve status
valveStatus = bprobjreadvalvestatus(serialObject);

% if its currently open (0) and you try to close it, it will error
if ~valveStatus
    % put it into auto first...
    bprobjcomm(serialObject, '#0x24 2')
end

% now it can be closed
bprobjcomm(serialObject, '#0x24 1')

Contact us