Updated code. Methods are different for Instrument.m and LockIn.m. collectData.m almost works.