Sequencer: Difference between revisions

From SweepMe! Wiki
Jump to navigation Jump to search
mNo edit summary
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The sequencer is the heart of SweepMe!. Use it to create tree-like measurement sequences. Items can be placed by drag&drop from a list of all available [[Modules]].
The sequencer serves as the core functionality in SweepMe!, allowing users to create tree-like measurement sequences. Items can be easily placed using the drag-and-drop feature from a list of all available [[Modules]].
There exists basic examples (''Settings'' -> ''Load Example'') that demonstrate the creation of measurement procedures.
 
To get started, there are basic examples available under ''Settings'' -> ''Load Example.'' that demonstrate the creation of measurement procedures.




== Procedures ==
== Procedures ==
The sequencer presents a measurement in a tree-like hierarchy of modules. Each module can be understood as a for-loop over its sweep values. These sweep values can be seen as set values that have to be applied and reached to perform a measurement point. Whenever modules are nested into each other, it automatically means that nested for-loops are created. As for any tree, there exist branches. If you have a single branch, all items are nested into each other. This is the most simple and basic configuration you can realize. In this case, SweepMe! will perform a variation across all combinations of set values of each module in the branch. Each combination can be seen as a measurement point for which all modules of the sequencer are asked for their measurment values. These measurement values are typically different from the set values. For example, a source measuring unit could have a set value of 5 Volt but the meausurement value might be 4.99 Volt.


The order of the modules directly influences the measurement procedure: It makes a difference whether you want to measure at all defined voltages for each temperature or if you want to measure at all defined temperatures for each voltage. In contrast, taking measurement values only slightly depends on the order of the modules in one branch as all modules of a branch are read out at each measurement point.
The Sequencer organizes measurements in a hierarchical tree structure of modules. Each module can be thought of as a for-loop over its sweep values, representing specific set values that are applied to reach a measurement point. Additionally, at each of these measurement points, a measurement value is retrieved. These measurement values are typically different from the set values. For example, a source measuring unit could have a set value of 5 Volt but the measurement value might be 4.99 Volt.
 
Nesting modules in the tree structure creates nested for-loops, called branches. In a single-branch scenario, all items are nested, forming the most straightforward configuration. SweepMe! then performs a variation across all combinations of set values for each module in the branch, treating each combination as a unique measurement point.
Placing items on the same level of hierarchy (creating siblings) automatically generates a second branch in the tree. SweepMe! sequentially processes the first branch, followed by the second. During processing, only the modules in the current branch are used to apply sweep values and read out measurement values. Common modules between the branches contribute to the measurement in both branches.


The order of modules directly influences the set values and measurement procedure. For instance, deciding whether to measure at all defined voltages for each temperature or vice versa makes a significant difference.
For the measurement values, however, the order of modules within a branch has minimal impact. At each measurement point, all modules in a branch are read out.


If you put items on the same level of hierarchy (i.e. creating siblings), you will automatically create a second branch of the tree. Now, SweepMe! will run through the first branch, followed by the second branch. Only the modules of the current branch are used to apply the sweep values and readout the measurement values. Of course, these two branches might have some modules in common and these modules will take part at the measurement of both branches.  
When a module becomes active by being part of an active branch, it gets configured. This configuration remains as long as the module remains part of an active branch, even if the branch changes. A module is considered unconfigured when it is no longer part of any active branch.


Whenever a module gets active by being part of an active branch, it gets configured. It stays configure as long as it is part of an active branch, even if the branch changes. A Module is unconfigured whenever it is no more part of an active branch.


Please see the example below:
=== Example ===


[[File:Sequencer_example_visualization.gif|480px|thumb|Visualization of the traversing of the sequencer which has a device with two consecutive children.]]
[[File:Sequencer_example_visualization.gif|480px|thumb|Visualization of the sequencer procedeu which has an SMU1 module with two consecutive children being SMU2 and SMU3.]]
Let's consider a sequencer arrangement with three [[SMU|SMUs]] where SMU 1 has two direct subelements, SMU 2 and SMU 3. SMU 2 and SMU 3 shall be at the same hierachy of the sequencer tree, i.e. they will be swept consecutively.
Let's consider a sequencer arrangement with three [[SMU|SMUs]] where SMU 1 has two direct subelements, SMU 2 and SMU 3. SMU 2 and SMU 3 shall be at the same hierachy of the sequencer tree, i.e. they will be swept consecutively.


Line 38: Line 42:
These rules are probably not easy to understand for newcomers but exactly define the behavior of the sequencer and thus should help experienced SweepMe! users to get to the bottom of the sequencer.
These rules are probably not easy to understand for newcomers but exactly define the behavior of the sequencer and thus should help experienced SweepMe! users to get to the bottom of the sequencer.


# Modules can be added to the sequencer to represent measurements.
# Modules can be added to the sequencer to represent a measurement.
# Many modules can be set up to perform a parameter iteration.
# Many modules can be set up to perform a parameter iteration.
# Modules without a parameter iteration still represent a one-step iteration.
# Modules without a parameter iteration still represent a one-step iteration.
Line 50: Line 54:
# Each combination of the iteration step of the modules in the active branch represents a measurement point.
# Each combination of the iteration step of the modules in the active branch represents a measurement point.
# Each measurement point triggers the readout of the values of all modules in the active branch.
# Each measurement point triggers the readout of the values of all modules in the active branch.
# Each module can run a series of functions that are described here: [[Sequencer procedure | Function calls]].


==Module categories==
==Module categories==
Line 136: Line 141:


Procedures, as defined by modules in the sequencer, can be saved and restored via a setting.
Procedures, as defined by modules in the sequencer, can be saved and restored via a setting.
== FAQ ==
'''What is the sequencer?'''<br>
The sequencer determines the course of your measurement. The measurement procedures are defined by the arrangement of modules in a tree structure.
'''What is a module?'''<br>
The different modules offer ready-to-use interfaces for various types of devices and operations. You can add devices and functions to the sequencer via drag&drop of the according module. Afterwards, you can setup your device or operation in the dialog of the module.
'''How does the alignment of the modules affect the course of the measurement?'''<br>
The sequencer interprets each module as a variation of setpoints. Each module can have an individual iteration range. Modules without a distinct parameter iteration such as “Hold” or “Logger” still have a one-step iteration.
Indented modules create nested iterations. That means, the child module performs its entire iteration for each step of the parent module.
Modules on the same indentation level are processed consecutive: The next module starts its iteration after the iteration of the first module has ended.
'''What is a branch?'''<br>
A root-to-leaf path of nested modules is called a branch. The root module of all branches is an invisible Time module that logs the elapsed time. Each branch represents a measurement. The total number of branches equals the number of leaf modules that have no further indented modules.
'''When is a module active?'''<br>
At the beginning of the run, all devices are initialized. When entering a branch, all devices in the branch are configured and get active. When leaving a branch, all devices which are not needed in the next branch are unconfigured so that no setpoints are applied. The modules that remain active stay configured.
'''Can a module be part of multiple branches?'''<br>
Yes, a module with multiple children is part of multiple branches. In contrast, sibling modules can never be part of the same branch.
''' Can be more than one branch active?<br>
Only one branch can be active at the same time. The modules in this branch are the active modules that participate at the measurement until the branch changes.
'''What happens when the branch changes?'''<br>
A branch gets active when its leaf module gets active. Then, all modules of the branch that have not been active before are configured and modules of the previous branch that are no more are unconfigured.
'''What is a measurement point?'''<br>
Each setpoint combination of the modules in a branch defines a measurement point. At each measurement point, the measurement values of all modules in the branch are acquired.
'''When are the setpoints applied?'''<br>
At each measurement point, the setpoints of all active modules are applied and reached if their values have changed since the last measurement point. The setpoints are applied one after another starting from the top root module.
'''When are the modules read values?'''<br>
When all setpoints are applied and reached, the measurement is triggered first for all modules and read out afterwards. This way it is possible to acquire data from multiple instruments at the same time.




[[Category:Manual]]
[[Category:Manual]]

Latest revision as of 19:18, 13 February 2024

The sequencer serves as the core functionality in SweepMe!, allowing users to create tree-like measurement sequences. Items can be easily placed using the drag-and-drop feature from a list of all available Modules.

To get started, there are basic examples available under Settings -> Load Example. that demonstrate the creation of measurement procedures.


Procedures

The Sequencer organizes measurements in a hierarchical tree structure of modules. Each module can be thought of as a for-loop over its sweep values, representing specific set values that are applied to reach a measurement point. Additionally, at each of these measurement points, a measurement value is retrieved. These measurement values are typically different from the set values. For example, a source measuring unit could have a set value of 5 Volt but the measurement value might be 4.99 Volt.

Nesting modules in the tree structure creates nested for-loops, called branches. In a single-branch scenario, all items are nested, forming the most straightforward configuration. SweepMe! then performs a variation across all combinations of set values for each module in the branch, treating each combination as a unique measurement point. Placing items on the same level of hierarchy (creating siblings) automatically generates a second branch in the tree. SweepMe! sequentially processes the first branch, followed by the second. During processing, only the modules in the current branch are used to apply sweep values and read out measurement values. Common modules between the branches contribute to the measurement in both branches.

The order of modules directly influences the set values and measurement procedure. For instance, deciding whether to measure at all defined voltages for each temperature or vice versa makes a significant difference. For the measurement values, however, the order of modules within a branch has minimal impact. At each measurement point, all modules in a branch are read out.

When a module becomes active by being part of an active branch, it gets configured. This configuration remains as long as the module remains part of an active branch, even if the branch changes. A module is considered unconfigured when it is no longer part of any active branch.


Example

Visualization of the sequencer procedeu which has an SMU1 module with two consecutive children being SMU2 and SMU3.

Let's consider a sequencer arrangement with three SMUs where SMU 1 has two direct subelements, SMU 2 and SMU 3. SMU 2 and SMU 3 shall be at the same hierachy of the sequencer tree, i.e. they will be swept consecutively.

The measurement will then have the following sequence:

  1. SMU1 applies the first sweep value of the sweep.
  2. SMU2 will run its full sweep and SMU1 and SMU2 are measured (while SMU3 is still off).
  3. SMU2 is switched off and now SMU3 runs its full sweep and SMU1 and SMU3 are measured (while SMU2 is off).
  4. SMU3 is switched off.
  5. SMU1 applies the next sweep value of its sweep (or the measurement is finished, if no further values shall be swept).

This measurement process is shown schematically in the animation on the right.

This example has two branches:

  1. Time -> SMU1 -> SMU2
  2. Time -> SMU1 -> SMU3

As SMU1 is part of both branches, it is always active and only configure once at the beginning and unconfigured when the measurement ends. However, SMU2 is only part of the first branch. It is configured at the beginning, but get unconfigure when the SMU2 variation has been finished and the second branch get active.

Golden rules

These rules are probably not easy to understand for newcomers but exactly define the behavior of the sequencer and thus should help experienced SweepMe! users to get to the bottom of the sequencer.

  1. Modules can be added to the sequencer to represent a measurement.
  2. Many modules can be set up to perform a parameter iteration.
  3. Modules without a parameter iteration still represent a one-step iteration.
  4. Indented/nested modules perform their iteration for each iteration step of the module above.
  5. The module „Time“ is the invisible root module of all modules in the sequencer.
  6. Each module that has no nested modules is a leaf module that defines a new branch.
  7. Each branch contains all modules from root module “Time” to the respective leaf module.
  8. Only one branch can be active at the same time.
  9. A module is active if it is part of an active branch.
  10. Modules are configured if they get active and unconfigured if they are no more active.
  11. Each combination of the iteration step of the modules in the active branch represents a measurement point.
  12. Each measurement point triggers the readout of the values of all modules in the active branch.
  13. Each module can run a series of functions that are described here: Function calls.

Module categories

The invisible root module 'Time'

The sequencer has an invisible root item called 'Time' being part of any procedure. It measures the elapsed time and generates a time stamp. You will find it for example in your saved data as well as if you configure a widget such as Plot. Because it it is part of each run, elapsed time and a timestamp are always automatically recorded.

Basic modules

There are basic modules that are used in almost any type of measurement, e.g. Loop, Hold, or MakeFile. Have a look at the examples to understand their meaning. We also recommend to play around with these modules to understand how they work and interact. For example, try to combine multiple Loop or MakeFile to see the sequence of the measurement and the generated data files.

Device modules

Some modules can be used to implement measurement equipment via a Device Class. These modules have a user interface field 'Device' that allows to select the Device Class.

SMU, Signal, Spectrometer, Scope, LCRmeter, LockIn, Monochromator

Add-on modules

SweepMe! can be extended into any direction to implement individual setups, devices and tasks. Contact us to discuss your specific needs.


Handling

Adding modules

Modules are added by drag&drop from the right sided list of all available Modules. Some modules generate a new tab, other modules have a hidden dialog. In both cases, the module can be configured, by double-clicking on it.

Moving modules

Just drag&drop a module including all child items to a new position in the sequencer. If you like to insert the item between two other items at the same hierarchy, a thin black line must appear between the two items.

Removing modules

You can remove a module from the sequencer by selecting it and pressing 'Del(ete)'. An alternative would be to right-click on a module and click 'Delete selected item(s)'

Tree terminology

The following figure highlights the branches of an example as needed to understand the operation of the sequencer.

Visualization of branches in the sequencer

The measurement would basically perform a temperature variation. For each temperature, a Hold ensures to wait a certain time before taking the current-voltage characteristic by the SMU module. A module Loop is a child of SMU and thus repeats the measurement of each voltage as defined by the number of repetitions. In a last step a Logger module is used, e.g. to read out a temperature sensor to do a control measurement. Then, the procedure goes ahead with the next defined temperature. Files will be created for the second and third branch for which MakeFile is in. For each temperature a new file is created as the module Temperature is above MakeFile. Furthermore, the data of SMU and Logger will go into individual files as they are in different branches.

Root module

The root module of the sequencer is always an invisible module called "Time". It is part of any measurement and is part of any branch that you add to the sequencer. Thus, you will always have a timestamp in your measurement data.

Child module

A child module is the module that is inserted into a another module. We also say it is "nested" into the above module. For example, the module 'MakeFile' is a child of the module 'Temperature' in the example shown in the figure.

Parent module

The parent module is the module into which a module is inserted in. For example, the module 'MakeFile' is a parent of the module 'Logger' in the example shown in the figure.

Leaf module

A leaf module of the sequencer is always a module that has no child items, i.e. no module is inserted into it. The modules that are leaves have colored CheckBoxes in the figure. Each leaf module defines a new branch.

Branches

Each module that is a leaf defines a new branch (see colored lines). A branch is therefore definedy by all modules from the invisible root module Time and the respective leaf module. Modules can be part of several branches simultaneously. In the example, the module 'Temperature' is part of all three branches. Such Modules that are part in multiple branches perform the measurements that are defined in each branch. The number of leaf modules is always the number of branches.

Here are the branches as defined by the example:

  1. Time -> Temperature -> Hold
  2. Time -> Temperature -> MakeFile -> SMU -> Loop
  3. Time -> Temperature -> MakeFile -> Logger

For each branch, its modules are readout for each measurement point.

Siblings

Modules that have exactly the same parent module are siblings. If you have siblings in your sequencer, you automatically have multiple branches. For example, the module SMU and Logger are siblings. Also the modules Hold and MakeFile are siblings in the example of the figure.

Setting and reading values

All modules have iteration steps (sweep values) that are defined at the beginning of the measurment. The combination of these iterations defines the number of measurement points in each branch. While some modules have a list of several sweep values, e.g. several voltages to be applied, some modules have apparently no sweep value. For example, the module Logger does not perform a sweep. Still it has a single pseudo sweep value that makes sure that the concept of nested for-loops does work in any sequence of modules.

There is a crucial difference between setting a sweep value (also called set value) and reading a measurement value:

Setting a sweep value: The sequence of modules has a crucial impact on the measurement procedure, i.e. in which order parameters are applied to your devices. This is due to the fact that each module presents a for-loop over its sweep values and strongly depends whether a module is above or below another module. For example, it makes a big difference if one applies voltages for each temperature, or whether one does temperature sweeps for each voltage.

Reading a Measurement value: The combination of all sweep values defines the number of measurement points in a branch at which measurement values are acquired. A measurement point can be seen as a unique combination of the iteration steps of each module that is present in the current branch. At each measurement point, all modules that are part of the current active branch are read out. The order of modules in the current branch only determines in which order the modules are read out and in which order the measured data appears in the data files. As the invisible root module 'Time' is always the first module in each branch, it is also the module that is read out first and the columns of the data files always start with the measurement values of the 'Time' module.

Settings

Procedures, as defined by modules in the sequencer, can be saved and restored via a setting.

FAQ

What is the sequencer?
The sequencer determines the course of your measurement. The measurement procedures are defined by the arrangement of modules in a tree structure.

What is a module?
The different modules offer ready-to-use interfaces for various types of devices and operations. You can add devices and functions to the sequencer via drag&drop of the according module. Afterwards, you can setup your device or operation in the dialog of the module.

How does the alignment of the modules affect the course of the measurement?
The sequencer interprets each module as a variation of setpoints. Each module can have an individual iteration range. Modules without a distinct parameter iteration such as “Hold” or “Logger” still have a one-step iteration. Indented modules create nested iterations. That means, the child module performs its entire iteration for each step of the parent module. Modules on the same indentation level are processed consecutive: The next module starts its iteration after the iteration of the first module has ended.

What is a branch?
A root-to-leaf path of nested modules is called a branch. The root module of all branches is an invisible Time module that logs the elapsed time. Each branch represents a measurement. The total number of branches equals the number of leaf modules that have no further indented modules.

When is a module active?
At the beginning of the run, all devices are initialized. When entering a branch, all devices in the branch are configured and get active. When leaving a branch, all devices which are not needed in the next branch are unconfigured so that no setpoints are applied. The modules that remain active stay configured.

Can a module be part of multiple branches?
Yes, a module with multiple children is part of multiple branches. In contrast, sibling modules can never be part of the same branch.

Can be more than one branch active?
Only one branch can be active at the same time. The modules in this branch are the active modules that participate at the measurement until the branch changes.

What happens when the branch changes?
A branch gets active when its leaf module gets active. Then, all modules of the branch that have not been active before are configured and modules of the previous branch that are no more are unconfigured.

What is a measurement point?
Each setpoint combination of the modules in a branch defines a measurement point. At each measurement point, the measurement values of all modules in the branch are acquired.

When are the setpoints applied?
At each measurement point, the setpoints of all active modules are applied and reached if their values have changed since the last measurement point. The setpoints are applied one after another starting from the top root module.

When are the modules read values?
When all setpoints are applied and reached, the measurement is triggered first for all modules and read out afterwards. This way it is possible to acquire data from multiple instruments at the same time.