Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How to read and write DOOCS properties with Matlab


Contents




Quick Start

The manual of the DOOCS Matlab client interface can be found on the DOOCS web pages. Examples showing how to read train ID synchronous values using doocsread are maintained on Bitbucket.

...

Please do not use doocs_read or ttfr et al..

top


DOOCS ADQ412 ADC Access

To read sample spectra from the SP Devices ADQ412 ADCs there are two servers which could be accessed. The server SPDEVDMA should only be used for debugging purposes. Don't touch it during data acquisition for an experiment with beamtime. The ADQ scope servers (ADC.ADQ.FL2EXP1, ADC.ADQ.BL1 to ADC.ADQ.BL3, ADC.ADQ.PG, ADC.ADQ) are recommended to use for live data access.

...

%% ADQ Scope Server MTCA FL2-EXP1
% Note CH00.INCR_LOGIC does not do anything
%      CH00.RAW_COPY must be '1' in order to receive more than 800 values
location= 'FLASH.FEL/ADC.ADQ.FL2EXP1/FL2EXP1.CH01/'; 
errorMsg= doocswrite([location, 'CH00.RAW_COPY'], 1);
assert(isempty(errorMsg), 'doocsread error: %s', errorMsg);
% read
mtcaSpectrumNestedStruct= doocsread([location, 'CH00.RAW_COPYDAQ.TD']);
assert(isempty(mtcaSpectrumNestedStruct.('error')), ...
        'Error: doocsread: ''%s''', mtcaSpectrumNestedStruct.('error'));
% unwrap
mtcaSpectrumStruct= mtcaSpectrumNestedStruct.('data');
mtcaSpectrum= mtcaSpectrumStruct.('d_spect_array_val');
% create time axis and plot
start= mtcaSpectrumStruct.('s_start');
increment= mtcaSpectrumStruct.('s_inc');
sLength= mtcaSpectrumStruct.('d_spect_array_len');
assert(sLength == length(mtcaSpectrum));
spectrumTimeAxis= start : increment : start + increment*(sLength - 1);
plot(spectrumTimeAxis, mtcaSpectrum);

top


Example Matlab scripts


top


jdoocs_call (deprecated, unmaintained)

...

  • in the jDOOCS zip:
    • the *.jar files for the Java DOOCS implementation and its dependencies
    • the jdoocs_call.m function which eases the jDOOCS handling and can be used to read numbers and Vectors (spectra ... 1D data)
    • a sample program to read 0D (numbers) and 1D (spectra) data with jdoocs_call (jDOOCS_read_sample_0D_and_1D.m)
    • a sample program to read 2D (images) (jDOOCS_read_sample_2D.m)

top