Configure()

From SweepMe! Wiki
Jump to navigation Jump to search

The function 'configure' is called whenever a module gets active, i.e. it becomes part of an active branch. It is not called again if the branch changes, but the module remains active.

In 'configure' the entire configuration as specified by the user in the module should be sent to the instrument. It is important that the configuration is not sent in initialize() because it might change later again, for example if a second module connects to the same instrument in another branch where a completely new configuration is needed.

Before 'configure' is called, the GUI parameters of the module are evaluated again. Thus, values given with the parameter syntax {...} already contain the current sweep values of modules higher up in the sequencer. Right after 'configure', the module hands over its own sweep value, so that modules further down in the sequencer can use it in their 'configure'.

When the module is no longer part of the next branch, unconfigure() is called. If the module becomes active again later in the run, 'configure' is called again.