Operating basics
There are two parts to setting this up. First you need a unique
fi
le name that can
be created automatically, second you need to design an if-statement to trigger on
the proper event.
Examples of save statements for unique
fi
le names.
The following command
saves data to
fi
les with the name test
n
.mat, where the
n
is replaced with whichever
block is being processed at the time.
This is simple but has the drawback that the
fi
les will be overwritten by future
acquisitions that happen to save on the same test name and block numbers.
%
save([‘test’,num2str(BlockNum),’.mat’],’Vblock’)
%
The following example saves the entire workspace to time-stamped
fi
lenames of
the form Test11_4_2009_12_24_53.mat., with the
fi
rst string (Test) followed by
parts of the Clk string with the month (2), day (3), year (1), hour (4), minute (5),
and second (6) the save was executed.
%
Clk = clock;
save(['Test',num2str(Clk(2)),'_',num2str(Clk(3)),'_',
num2str(Clk(1)),'_', ...
num2str(Clk(4)),'_',num2str(Clk(5)),'_',
num2str(round(Clk(6))),'.mat'])
%
Examples of if-statements and alerts to trigger a save.
The following example
(when placed after the CoreProcessing call in the MATLAB window) saves the
Vblock variables every time there is a bit error on the XRe tributary. The Vblock
variables are really all that are necessary for later analysis, but saving the whole
workspace can help be sure that the original processing information, such as
patterns and signal type, are not lost.
In the following example, using BER.NumErrs, instead of NumErrs.XRe, has the
effect of trigging on any error in any tributary, rather than just XRe.
%
if Errs.XRe.NumErrs>0
Clk = clock;
save(['HybridCal',num2str(Clk(2)),'_',num2str(Clk(3)),'_',
num2str(Clk(1)),'_', ...
54
OM4000D Series Coherent Lightwave Signal Analyzer
Summary of Contents for OM4006D
Page 2: ......
Page 6: ......
Page 22: ...Compliance information xvi OM4000D Series Coherent Lightwave Signal Analyzer...
Page 24: ...Preface xviii OM4000D Series Coherent Lightwave Signal Analyzer...
Page 100: ...Taking measurements 76 OM4000D Series Coherent Lightwave Signal Analyzer...
Page 146: ...Appendix D Automatic receiver deskew 122 OM4000D Series Coherent Lightwave Signal Analyzer...
Page 202: ...Appendix H Cleaning and maintenance 178 OM4000D Series Coherent Lightwave Signal Analyzer...
Page 205: ...Index W Waveform averaging 48 OM4000D Series Coherent Lightwave Signal Analyzer 181...