Wait for Condition¶
Description¶
Wait until a condition becomes true or a timeout occurs. If the wait times out before the condition becomes true, issue an error message and (optionally) stop the experiment.
Signature¶
action/wait_for_condition
Required Parameters¶
condition¶
Condition expression
timeout¶
Timeout duration (microseconds)
Optional Parameters¶
timeout_message¶
Error message to report if the wait times out. If omitted, a default message is used.
To include the values of variables or arbitrary expressions in the
message, you can use variable and expression interpolation (e.g. x = $x, y = ${y}, x+y = $(x+y)
).
stop_on_timeout¶
- Default
YES
If true, stop the experiment if the wait times out
Placement¶
Allowed at top level: |
No |
---|---|
Allowed parent: |
Block, Conditionally Execute Actions (if), List, Protocol, Render Actions, Repeat Actions (while), Schedule Actions, Task System State, Trial, Unconditionally Execute Actions (else), Variable |