2.3.1. DashBoard

Note

This module can be started from a terminal, using the command dashboard in an activated environment where PyMoDAQ is installed.

A list of accepted command-line arguments are available, you can list them using dashboard -h. For now the accepted arguments are the following:

  • -exp or --experiment followed by an existing experiment name will start the dashboard with the selected experiment loaded. For example dashboard -exp default should start the dashboard with the default experiment.

2.3.1.1. Introduction

The DashBoard is the heart of PyMoDAQ: it loads the actuators (DAQ_Move) and detectors (DAQ_Viewer) of an experiment, lets you drive them by hand, and launches the extensions (DAQ_Scan, DAQ_Logger…) that automate the experiment.

2.3.1.1.1. Typical workflow

  1. Define or load an experiment, the set of actuators and detectors to use, with the Tools > Experiment menu (see the experiment manager). Experiments are saved as files.

  2. Optionally define or load a state, a set of settings for the control modules and some special actions (Tools > State, see the state manager).

  3. Optionally configure the overshooter (actions triggered when a detected value gets out of bounds) and save the regions of interest of the viewers.

  4. Use the actuators and detectors manually to check and adjust your setup.

  5. Start an extension from Tools > Extensions: DAQ_Scan to automate a scan, DAQ_Logger to log data in time, and the other installed extensions.

2.3.1.1.2. Good to know

  • The Dashboard can be started from a terminal with the dashboard command, dashboard -exp <name> loads an experiment at startup and dashboard -h lists the other arguments.

  • Most extensions show a Dashboard toolbar to show/hide the Dashboard and to select experiments and states without leaving the extension window.

  • When the arrangement of the control modules is modified, a layout file is saved for the experiment and restored at the next loading (see the View menu).

  • Several actuators (or detectors) driven by the same hardware controller share it: one is the Master and the others are Slaves (see multiple hardware from one controller).

This module has one main window, the dashboard (Fig. 2.6) where a log and all declared actuators and detectors will be loaded as instances of DAQ_Move and DAQ_Viewer. The dashboard gives you full control for manual adjustments of each actuator, checking their impact on live data from the detectors. Once all is set, one can move on to different actions.

dashboard

Fig. 2.6 Dashboard user interface containing all declared control modules (actuators/detectors) and some initialization info.

2.3.1.3. The DashBoard toolbar in extensions

Most extensions (DAQ_Scan, DAQ_Logger, PID, DataMixer, Sequencer, Ramping, optimizers…) display a Dashboard toolbar (see Fig. 2.9) so you can interact with the Dashboard without leaving the extension window:

  • Show/Hide Dashboard: shows or hides the Dashboard window (and its control modules). Closing the Dashboard window only hides it, and it is shown again when the extension is closed

  • Experiment: a button to open the Experiment manager, a list of the available experiments and a button to apply the selected one. The list is synchronized with the one of the Dashboard

  • State: a button to open the StateManager, a list of the states defined for the current experiment and a button to apply the selected one

dashboard toolbar

Fig. 2.9 The Dashboard toolbar as displayed in an extension.

When developing an extension deriving from CustomExt, this toolbar is added by calling its create_dashboard_toolbar method, whose arguments allow to display or not each of the three groups above.

2.3.1.4. Multiple hardware from one controller

Sometimes one hardware controller can drive multiple actuators and sometimes detectors (for instance a XY translation stage). For this particular case the controller should not be initialized multiple times. One should identify one actuator referred to as Master and the other ones will be referred to as Slave. They will share the same controller address represented in the settings tree by the Controller ID entry. These settings will be activated within the plugin script where one can define a unique identifier for each actuator (U or V for the conex in Fig. 2.17). This feature can be enabled for both DAQ_Move and DAQ_Viewer modules but will be most often encountered with actuators, so see for more details: Multiaxes controller. This has to be done using the Experiment Manager