Software used for controlling and data logging lab equipment.
% FIBREOBJSTART starts data transmission from the FOR
% fibreobjstart(serialObject) starts data transmission from the FOR. If
% its already transmitting, this function will not send the command, but
% will not error either.
% checks the number of arguments
error(nargchk(1, 1, nargin))
% tries to get some data first to see if it is transmitting
% tries to fetch the data - it'll error if it isn't broadcasting
% it didn't error, so simply give a warning
warning('fibreObjBroadcast:alreadyRunning', 'FOR is already broadcasting.')
% starts the broadcast
% sends the command
fibreobjcomm('write', serialObject, 2, 1, 0)
error('FOR did not accept the command to start broadcasting data.')