Skip to main content
Skip table of contents

EnterCondition and ExitCondition

  • EnterCondition and ExitCondition provide control over whether an epoch will be displayed and the conditions under which it will terminate based on user-defined conditions. They provide functionality similar to if, while and repeat (for) programming control flow.

Thank you for your interest in LabMaestro! The page you are trying to access is under development. We are working on comprehensive documentation to help you make the most of our software. If you require any help, please feel free to contact us via email at support@vpixx.com.

By default, when implementing an experiment design, all Epochs within Timelines will be displayed and executed only once. However, some experiment designs may require more flexibility and users may wish to:

  • Display an epoch only if a condition is met based on a variable defined in a Constant Stimuli (Condition List) method,​​ and keep the rest of the timeline untouched.

  • Repeat the content of an epoch for a specific number of time;

  • Continue to show an epoch until certain conditions are met.

In LabMaestro Public Beta 1, you can edit the enter and exit conditions from the properties panel to control the experiment flow. These fields must evaluate to a true or false boolean value. Typical implementations will use simple Expressions to refer to a given object property or variable, but more complex expressions can be written using Booleans, Logical Operators, and Relational Operators, to evaluate comparisons between two values.

Expressions can be used to dynamically manipulate experiment flow, such as executing epochs if a correct response was entered or continuing to execute an epoch up to a custom duration, implementing a timeout.

Screenshot from LabMaestro Public Beta 1.6.1

Screenshot from LabMaestro Public Beta 1.6.1

EnterCondition: If the expression evaluates to true, the instructions within the epoch will be executed. If it evaluates to false, the timeline will ignore this epoch and proceed to the next one.

If EnterCondition is set to false or includes a customized expression, an arrow icon indicates that the epoch could be ignored during the experiment.

Screenshot from LabMaestro Public Beta 1.6.1

ExitCondition: If the expression evaluates to true, the timeline will continue to the next epoch.

If it evaluates to false or includes a customized expression, a loop icon indicates that the current epoch will be re-evaluated until the exit condition has been met. This will be repeated indefinitely, until the expression evaluates to true.

If the ExitCondition of Epochs always evaluates to false during runtime, it causes an infinite loop. Similar to a traditional programming language, the experiment cannot proceed further (you can refer to EnterCondition and ExitCondition for more details). However, if you hold down the Esc key, it will break out of the infinite loop and exit the previewed timeline or launched experiment. This will bring back the control to the LabMaestro editor.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.