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
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;
error('Could not read the delay time.')