Code covered by the BSD License  

Highlights from
CO2gui - lab control and automation

CO2gui - lab control and automation



06 Jan 2010 (Updated )

Software used for controlling and data logging lab equipment.

function delayTime = fibreobjreaddelaytime(serialObject)
% FIBREOBJREADDELAYTIME reads the time between broadcasts from the FOR
% delayTime = fibreobjreaddelaytime(serialObject) reads the time between
% each broadcast from the FOR in ms.

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

% checks its not broadcasting
if fibreobjstatus(serialObject)
    % error
    error('FOR must not be broadcasting to read the delay time.')

% sends it, along with the calculated checksum
    % sends the command (note that the delay time is actually double what
    % gets written to the device
    delayTime = fibreobjcomm('read', serialObject, 10, 2) * 2;
    % if it got this far, store it
    serialObject.UserData.delayTime = delayTime;
    % errors
    error('Could not read the delay time.')

Contact us