Skip to content

MyDaqMenu

SAFedorov edited this page Feb 4, 2020 · 3 revisions

MyDaqMenu is a root GUI that provides interface to start new and manage existing instrument control objects, start MyDaq and change local settings.

Session tab

This is the main tab of MyDaqMenu. On the left, it shows the list of measurement routines and instruments, which is local for each computer. This list is composed from two sources

  1. "run" files located in the measurement base directory
  2. The entries of InstrumentList in which control classes are indicated

A program from the list can be started by pushing the "Run" button. In the case of instruments it creates an instance of the instrument class with its GUI. "Run in background", does not start the GUI, but only creates an instrument object. The list of active instrument objects is shown in the right tab.

"Start new DAQ" creates a new MyDaq object which is ready to receive and/or analyze data traces.

"Instrument manager" button opens InstrumentManager that can be used to add/remove instruments to the local configuration.

"run" files

Users can add entries to the list, displayed in MyDaqMenu and in the drop-down menu of the GUI of MyDaq by adding "run". Run files are MATLAB functions which have no input arguments, located in the local base directory and have names starting with "run". In general there are no further restrictions on the content of run files and operations it performs. MyDaqMenu displays the comment headers of these files in the File header field.

Run files can carry additional information specified in their comment headers as %property=value. This information is processed by the utility function menuFromRunFiles that MyDaqMenu and MyDaq use to compose the displayed lists. For example the statement

%show_in_daq=false

results in that the run file is shown in MyDaqMenu by not in the dropdown of MyDaq GUI.

Example of a "run" file:

%data_source=true
%title=Ecdl850Scan

function runEcdl850Scan()

    % Get the unique instance of MyCollector
    C = MyCollector.instance();

    name = 'Ecdl850Scan';
    if ~ismember(name, C.running_instruments)

        % Create an instrument instance
        App = NewportTlbScan( ...
            'scope_name', 'Dpo4034nano2', ...
            'laser_name', 'ECDL850He3');

        % Add instrument to Collector
        addInstrument(C, name, App);

        % Display the instrument's name
        Fig = findFigure(App);
        if ~isempty(Fig)
           Fig.Name = char(name);
        else
           warning('No UIFigure found to assign the name')
        end

        % Apply color scheme
        applyLocalColorScheme(Fig);

        % Move the app figure to the center of the screen
        centerFigure(Fig);
    else
        disp([name ' is already running'])
        App = getInstrument(C, name);

        setFocus(App);
    end
end

Settings tab

This tab controls local settings. Entries in the "analysis routines" table are used to initialize the analysis routine menu of MyDaq.

Clone this wiki locally