Sequencer
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.
Core concept
Before diving into the details, there are three rules that explain almost everything about how the sequencer works:
- Every module is a for-loop over its sweep values.
- A child module (nested below) loops inside its parent's loop - it runs its complete sweep for every single step of the parent.
- Sibling modules (at the same level) run sequentially - first one finishes completely, then the next one starts. Each sibling creates a separate branch with its own output file.
Everything else follows from these three rules.
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. At each measurement point, a measurement value is also 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: nested loops and 2D data
Placing one module inside another (parent–child) creates nested for-loops. The child module runs its complete sweep for every single step of the parent.
MakeFile
└── Temperature (outer loop: 10 steps)
└── SMU (inner loop: 20 steps per temperature)
→ 200 measurement points, 1 output file
Here, SweepMe! measures at all voltages for each temperature — or alternatively, at all temperatures for each voltage, depending on which module is the parent. The order of nesting is therefore a key design decision.
Sibling modules: sequential branches and multiple files
Placing modules at the same level of hierarchy (siblings) creates multiple branches that run one after the other. Each sibling is a separate branch with its own output file.
MakeFile ├── SMU (branch 1: runs first, produces file 1) └── Logger (branch 2: runs after SMU finishes, produces file 2)
This is fundamentally different from nesting. Sibling modules never run at the same time and never share a measurement point. Their data always ends up in separate files.
During each branch, only the modules in that branch apply sweep values and read out measurement values. Modules shared between branches (i.e. common ancestors) remain active and contribute to all branches they are part of.
How many output files will I get?
One output file is created per leaf node (per branch) that has a MakeFile module as an ancestor. The rule is simple: count the leaf modules — that is the number of branches and output files.
MakeFile → SMU → 1 file (SMU is the only leaf)
MakeFile → SMU → Logger → 1 file (Logger is the only leaf)
MakeFile → SMU → 2 files (SMU and Logger are both leaves)
→ Logger
If MakeFile is above the branching point, all branches share one file naming scheme but each branch appends its own data. If MakeFile is below the branching point, each branch gets a completely independent file.
Configure and unconfigure
When a module becomes part of the active branch, it is configured (e.g., device connected, settings applied). It stays configured as long as it remains part of any active branch — even if the branch changes to a sibling. A module is unconfigured only when it is no longer needed by any upcoming branch.
In practice, this means:
- A module that is a common ancestor (parent of siblings) stays configured for the entire duration and is only unconfigured once all branches are finished.
- A sibling module is configured when its branch becomes active and unconfigured as soon as that branch ends and the next sibling starts.
Example
Consider a sequencer with three SMUs where SMU1 has two direct children, SMU2 and SMU3, at the same level (siblings). The measurement proceeds as follows:
- SMU1 applies its first sweep value.
- Branch 1 (SMU1 → SMU2): SMU2 runs its full sweep. SMU1 and SMU2 are measured at each point. SMU3 is off.
- SMU2 is unconfigured.
- Branch 2 (SMU1 → SMU3): SMU3 runs its full sweep. SMU1 and SMU3 are measured. SMU2 remains off.
- SMU3 is unconfigured.
- SMU1 advances to its next sweep value, and the process repeats from step 2.
This example has two branches:
- Time → SMU1 → SMU2
- Time → SMU1 → SMU3
Since SMU1 is part of both branches, it is configured once at the start and unconfigured only at the very end. SMU2 and SMU3 are each configured and unconfigured as their respective branches become active and inactive.
Golden rules
These rules precisely define sequencer behavior and are a useful reference for experienced users. New users may find it easier to start with the core concept above and return to these rules later.
- Modules can be added to the sequencer to represent a measurement.
- Many modules can be set up to perform a parameter iteration.
- Modules without a parameter iteration still represent a one-step iteration.
- Indented/nested modules perform their iteration for each iteration step of the module above.
- The module "Time" is the invisible root module of all modules in the sequencer.
- Each module that has no nested modules is a leaf module that defines a new branch.
- Each branch contains all modules from root module "Time" to the respective leaf module.
- Only one branch can be active at the same time.
- A module is active if it is part of an active branch.
- Modules are configured when they become active and unconfigured when they are no longer active.
- Each combination of the iteration steps of the modules in the active branch represents a measurement point.
- Each measurement point triggers the readout of all modules in the active branch.
- Each module can run a series of functions described here: Function calls.
Module categories
The invisible root module 'Time'
The sequencer has an invisible root item called 'Time' that is part of every branch and every measurement. It measures elapsed time and generates a time stamp. Because it is part of every run, elapsed time and a timestamp are always automatically recorded and appear as the first columns in every data file.
Basic modules
There are basic modules used in almost any measurement, e.g. Loop, Hold, or MakeFile. We recommend playing around with these modules to understand how they work and interact. Try combining multiple Loop or MakeFile modules to observe the sequence of the measurement and the generated data files.
Instrument modules
Some modules implement measurement equipment via a Driver. These modules have a user interface field 'Driver' that allows selecting options according to your hardware.
Examples: SMU, Signal, Spectrometer, Scope, LCRmeter, LockIn, Monochromator
Pro and Special 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-hand list of all available modules. Some modules open a new tab; others have a hidden dialog. In both cases, the module can be configured by double-clicking on it.
Moving modules
Drag&drop a module including all its child items to a new position in the sequencer. To insert an item between two existing items at the same hierarchy level, a thin black line must appear between them before releasing.
Holding Ctrl while dropping copies the modules instead of moving them.
Removing modules
Select a module and press 'Del(ete)', or right-click and select 'Delete selected item(s)'.
Copy&Paste modules
Copy selected modules via Copy in the right-click menu or Ctrl+C. Paste via Paste or Ctrl+V.
Remarks:
- Copied modules in the clipboard are JSON-formatted text and can be pasted into a text document or shared via chat or email.
- When a single module was copied, its configuration can be applied to an existing module of the same type by selecting Apply copied configuration in the right-click menu.
- Some configuration options of advanced modules (like WaferProber or ControlWidgets) cannot be copied yet.
Tree terminology
The following figure highlights the branches of an example needed to understand sequencer operation.
The measurement performs a temperature variation. For each temperature, a Hold waits a set time before the SMU takes a current-voltage characteristic. A Loop module under SMU repeats each voltage measurement a number of times. A Logger module reads out a temperature sensor for a control measurement. Files are created for the second and third branch (those that have a MakeFile ancestor). For each temperature a new file is created because the Temperature module is above MakeFile. The data from SMU and Logger go into separate files because they are in different branches.
Root module
The root module is always the invisible "Time" module. It is part of every branch and every measurement, so elapsed time and a timestamp are always recorded.
Child module
A child module is inserted into (nested below) another module. For example, 'MakeFile' is a child of 'Temperature' in the example figure.
Parent module
The parent module is the one into which another module is inserted. For example, 'MakeFile' is the parent of 'Logger' in the example figure.
Leaf module
A leaf module has no child items — no module is inserted into it. Leaves are shown with colored checkboxes in the figure. Each leaf module defines exactly one branch.
Branches
A branch is the complete path from the root module "Time" down to one specific leaf module. The number of branches always equals the number of leaf modules.
Modules can be part of several branches simultaneously. In the example, 'Temperature' is part of all three branches.
The three branches in the example:
- Time → Temperature → Hold
- Time → Temperature → MakeFile → SMU → Loop
- Time → Temperature → MakeFile → Logger
Siblings
Modules that share the same parent are siblings. Sibling modules always create multiple branches — they run sequentially, never simultaneously, and can never be part of the same branch.
Setting and reading values
All modules have iteration steps (sweep value) defined at the start of the measurement. The combination of these iterations defines the number of measurement points (measurement value) in each branch.
Setting a sweep value: The order of modules has a crucial impact on the measurement procedure — specifically, in which order set values are applied to devices. Each module is a for-loop over its sweep values, and whether a module is above or below another determines the nesting order. For example, it makes a significant difference whether voltages are applied for each temperature step, or whether temperatures are stepped for each voltage.
Reading a measurement value: At each measurement point, all modules in the active branch are read out simultaneously. The order of modules only determines the order in which values appear in the data file. Since 'Time' is always the root module, its values always appear first.
Settings
Procedures defined in the sequencer can be saved and restored via a setting file.
Common mistakes
- Expecting two sibling modules to measure simultaneously — sibling modules always run one after the other, never at the same time. If you need synchronized data from two instruments, nest both under a common parent rather than making them siblings.
- Expecting a disabled (unchecked) module's children to still run — unchecking a module removes it and its entire subtree from the measurement. No data is collected from those modules.
- Expecting sibling modules to produce data in the same file — each branch (each sibling subtree) produces its own output file. To combine data from two instruments into one file, they must be in the same branch, i.e. one nested inside the other or both nested inside a shared parent below MakeFile.
FAQ
What is the sequencer?
The sequencer determines the course of a measurement. Procedures are defined by the arrangement of modules in a tree structure.
What is a module?
Modules are ready-to-use interfaces for devices and operations. Add them to the sequencer via drag&drop and configure them by double-clicking.
How does the alignment of modules affect the measurement?
Each module is a for-loop over its set values. Nested (indented) modules loop inside their parent's loop — the child performs its complete iteration for each step of the parent. Modules at the same level (siblings) run consecutively: the next module starts only after the previous one has fully completed.
What is a branch?
A branch is the complete path from the invisible root "Time" module to one specific leaf module (a module with no children). Each leaf defines exactly one branch. The total number of branches equals the number of leaf modules.
When is a module active?
At the start of the run, all devices are initialized. When a branch becomes active, all modules in that branch are configured. When leaving a branch, modules that are not needed in the next branch are unconfigured. Modules shared across multiple branches remain configured throughout.
Can a module be part of multiple branches?
Yes. A module with multiple children (siblings below it) is part of all of those children's branches. Sibling modules, however, can never be part of the same branch.
Can more than one branch be active at the same time?
No. Only one branch is active at a time.
What happens when the branch changes?
When a new branch becomes active, all modules in that branch that were not previously active are configured. Modules from the previous branch that are not part of the new branch are unconfigured.
What is a measurement point?
Each unique combination of iteration steps of the modules in the active branch is a measurement point. At each measurement point, the measurement values of all modules in the branch are acquired.
When are set values applied?
At each measurement point, the set values of all active modules are applied sequentially from top (root) to bottom (leaf), but only if their values have changed since the last measurement point.
When are measurement values read?
Once all set values are applied and reached, measurement is triggered simultaneously for all modules in the branch, and values are then read out. This allows data from multiple instruments to be acquired at the same point in time.