Condition: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
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. | 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: | |||
* == | |||
* != | |||
* > | |||
* < | |||
* >= | |||
* <? | |||
== Actions == | == Actions == | ||
Line 22: | Line 44: | ||
pauses the measurement, same as pressing the button 'Pause' | pauses the measurement, same as pressing the button 'Pause' | ||
== Execution == | |||
The parameter 'Execution' defines when the Condition is checked: | |||
* Always: Use it if you do not care of if your Condition has to be checked all the time | |||
* At the beginning: Use it if the condition should be checked before a measurement point is executed, e.g to prevent measuring the next point of a condition | |||
* At the end: Use it if the condition should be checked after the measurement of a point, e.g. to abort the measurement based on the last measurement point | |||
== Applications == | |||
* Stop a measurement after a certain time | |||
* Skip a measurement point for certain Sweep values which can be helpful to do conditional sweeps | |||
* Skip the operation of the current branch which can be helpful to reach a certain condition and proceed with the next measurement | |||
[[Category:Modules]] | [[Category:Modules]] | ||
[[Category:Add-O nModules]] | [[Category:Add-O nModules]] |
Revision as of 21:59, 11 July 2019
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:
- ==
- !=
- >
- <
- >=
- <?
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
in planning: The idea is that all variations of modules below the Condition module are skipped and the procedure continues with the next variation of a module above the Condition module
SkipCurrentBranch
skips all variations that have to be done in the current branch of the sequencer and 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: Use it if you do not care of if your Condition has to be checked all the time
- At the beginning: Use it if the condition should be checked before a measurement point is executed, e.g to prevent measuring the next point of a condition
- At the end: Use it if the condition should be checked after the measurement of a point, e.g. to abort the measurement based on the last measurement point
Applications
- Stop a measurement after a certain time
- Skip a measurement point for certain Sweep values which can be helpful to do conditional sweeps
- Skip the operation of the current branch which can be helpful to reach a certain condition and proceed with the next measurement