Condition: Difference between revisions
Franz Hempel (talk | contribs) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 11: | Line 11: | ||
More complex conditions are possible in conjunction with the module [[Calc]] where you create first a variable that is True or False based on multiple values. Then, the module Conditions simply checks whether the return value of Calc is True or False. | More complex conditions are possible in conjunction with the module [[Calc]] where you create first a variable that is True or False based on multiple values. Then, the module Conditions simply checks whether the return value of Calc is True or False. | ||
[[File:Condition Module.png|none|right|alt=GUI of the Condition module|GUI of the Condition module]] | |||
== Operators == | == Operators == | ||
Line 49: | Line 51: | ||
The parameter 'Execution' defines when the Condition is checked: | The parameter 'Execution' defines when the Condition is checked: | ||
* '''Always:''' | * '''Always:''' At every possible step (see below). | ||
* ''' | * '''Before branch (in 'configure'):''' Before the branch is entered and before [[configure()]] of child items is called. Can be used to stop a sweep or to skip a branch at the most early possibility. | ||
* '''At the end:''' | * '''Before each point (in 'start'):''' At the beginning of a measurement point in the [[start()]] phase.<br>''In module versions before 2024-04-16 this option was called "At the beginning".'' | ||
* '''Before branch and each point (in 'configure' + in 'start'):''' Combines both of the above.<br>''In module versions before 2024-04-16 this option was called "Before point".'' | |||
* '''After each point (in 'finish'):''' After the measurement point is finished in the [[finish()]] phase.<br>''In module versions before 2024-04-16 this option was called "At the end".'' | |||
* '''Never:''' No execution will be done. Can be used to switch off this condition. | |||
== Applications == | == Applications == | ||
* | * Conditional Sweeping: Create different branches for multiple measurement modes, and choose which branches to run based on the sample. | ||
* | * Stop a Measurement: Automatically halt the entire measurement process if a predefined critical value is reached, ensuring safety and precision. | ||
* | * Pause Measurement: Temporarily pause the sequence to allow for system stabilization or manual intervention before proceeding. | ||
[[Category:Modules]] | [[Category:Modules]] | ||
[[Category:Add-On Modules]] | [[Category:Add-On Modules]] |
Latest revision as of 14:06, 8 May 2024
Condition is a Module that can perform a certain action based on a condition that must be fulfilled. For example, a measurement point can be skipped or you can leave the current branch of the sequence and proceed with the next one.
Usage
The condition must be either True or False. Every conditions consists of four parts:
- a SweepMe! value (e.g. a measurement value or a Sweep value of another module)
- an operator
- a value to be compared with
- an action that should be performed in case the condition is True
More complex conditions are possible in conjunction with the module Calc where you create first a variable that is True or False based on multiple values. Then, the module Conditions simply checks whether the return value of Calc is True or False.
Operators
The following operators can be used:
- == (equal)
- != (unequal)
- > (greater than)
- < (less than)
- >= (greater or equal)
- <= (less or equal)
Actions
SkipPoint
skips a single measurement point. Only works well if the condition is related to at least one SweepValue of a certain module in the branch, because the condition is evaluatefd before the measurement point will be measured.
SkipSweepsBelow
All variations of modules that are below the Condition module in the sequencer are skipped and the procedure continues with the next variation of a module above the Condition module.
SkipCurrentBranch
All variations that have to be done in the current branch of the sequencer are skipped and the procedure continues with the first variation of the next branch.
Stop
stops the measurement, same as pressing the button 'Stop'
Pause
pauses the measurement, same as pressing the button 'Pause'
Execution
The parameter 'Execution' defines when the Condition is checked:
- Always: At every possible step (see below).
- Before branch (in 'configure'): Before the branch is entered and before configure() of child items is called. Can be used to stop a sweep or to skip a branch at the most early possibility.
- Before each point (in 'start'): At the beginning of a measurement point in the start() phase.
In module versions before 2024-04-16 this option was called "At the beginning". - Before branch and each point (in 'configure' + in 'start'): Combines both of the above.
In module versions before 2024-04-16 this option was called "Before point". - After each point (in 'finish'): After the measurement point is finished in the finish() phase.
In module versions before 2024-04-16 this option was called "At the end". - Never: No execution will be done. Can be used to switch off this condition.
Applications
- Conditional Sweeping: Create different branches for multiple measurement modes, and choose which branches to run based on the sample.
- Stop a Measurement: Automatically halt the entire measurement process if a predefined critical value is reached, ensuring safety and precision.
- Pause Measurement: Temporarily pause the sequence to allow for system stabilization or manual intervention before proceeding.