Condition: Difference between revisions

From SweepMe! Wiki
Jump to navigation Jump to search
 
Line 35: Line 35:
=== SkipCurrentBranch ===
=== 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  
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 ===
=== Stop ===

Latest revision as of 12:48, 23 January 2020

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:

  1. a SweepMe! value (e.g. a measurement value or a Sweep value of another module)
  2. an operator
  3. a value to be compared with
  4. 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: 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