EthoVision XT 18 - THC - Trial and Hardware Control - Program Trial Control
Last updated: Jul 30, 2026
Program Trial Control
If you just want to record data for a specific time, you can do so by setting the maximum trial duration.
If you want to start and stop data recording in relation to a few simple conditions (for example, start recording when the animal is detected in the water maze, and stop when the animal reaches the platform), define the Start/Stop trial rule.
In other cases, see below.
Procedure
- Before defining Trial Control in the program, it is helpful to draw your experimental procedure as a flow diagram, where each block represents an action or a condition which, when met, triggers other actions or conditions. The logical order in the example below reads from left to right.
- From the Setup menu, select Trial Control Settings, select New, enter a name of the new Trial Control Settings or accept the suggested one, and click OK. The default Start/Stop trial rule appears on the screen.
-
Build the Trial Control sequence outlined in step 1, using the components available.
- To define a Condition or an Action, click one of the buttons under Conditions or Actions. Insert the box in the appropriate place in the sequence.
- For conditions: See the Conditions section and detailed overview.
- For actions on hardware devices: See the hardware devices section.
- For actions on Trial Control variables: See the Trial Control variables section.
- To define a set of actions and conditions to be repeated (Sub-rule), under Structures, click the button next to Sub-rule.
- To define the command that calls a sub-rule, under Structures, click the button next to Reference. Insert the box in the appropriate place in the sequence.
- Test the Trial Control sequence.
- To apply Trial Control to your trials, before starting data acquisition make sure that the Trial Control Settings are highlighted in blue in the Experiment Explorer.
Notes
- When you create a new Trial Control element (action, condition, sub-rule or reference) and another of the same type has already been defined in this or other Trial Control Settings, a message appears asking you whether you want to create a new element or make a copy of the existing control.
- A Trial Control variable is a variable that you can define to control your trials. For example, a counter variable that is incremented every time a specific event occurs. You can then define conditions and actions based on this variable.
- If the experimental protocol is very complex, like in the case of a multiple-day recording session, it is handy to split the procedure into main blocks; then, for each block specify the basic actions and conditions, and whether the logical sequence should be repeated. This helps you identify the main building blocks of your Trial Control logic, which will translate into Sub-rules.
- If you have inserted Condition boxes based on Activity in your Trial Control rule and then deselect Activity analysis in the Experiment settings, the Condition boxes based on Activity are removed from your sequence and the connecting arrows are removed. This makes the rule invalid. Redesign your Trial Control rule and connect the arrows between the boxes.
- If you choose to record video with EthoVision XT by selecting the option Save video only, track later in the Acquisition screen, Trial Control is applied when you do tracking, not when you record video. To start and stop video recording, do so manually.
- Procedures that must be repeated or represent a specific task must be defined as Sub-rules. Sub-rules can be called at specific times or under specific conditions. In the main Start-Stop diagram, draw a block that calls each sub-rule.
Conditions
A Condition is a statement that EthoVision checks during the trial. When the Condition is met (True), the program evaluates the next Trial Control element (another condition, an action, or a reference to a sub-rule).
Example — Conditions are indicated in italics:
- When the rat reaches the platform, stop tracking.
- When the mouse is around the novel object, switch on the light.
- When the animal presses the lever, drop a pellet.
To Define a Condition
- In the Components pane, under Conditions, locate the type of condition you want to define.
- Double-click the condition name or click the button next to it.
- If the Add a condition window appears, it means that there is at least one condition of the same type in your experiment. You are asked to choose between creating a new condition or re-using an existing one. Choose the option you require and click OK. If this window does not appear, skip this step.
- Next to Condition name, type in the name you want to give to the condition, or accept the default name.
- Specify the condition properties.
- Enter a Comment (optional), then click OK.
- Insert the condition box in the sequence.
If the condition is complex (for example, Stop the trial either if the rat has reached the platform or it has been swimming for 60 seconds), then you must define separate conditions and combine them.
Important: If you have inserted Condition boxes based on Activity in your Trial Control rule and then deselect Activity analysis in the Experiment settings, the Condition boxes based on Activity are removed from your sequence and the connecting arrows are removed. This makes the rule invalid. Redesign your Trial Control rule and connect the arrows between the boxes.
Actions
An Action is a command that EthoVision carries out during acquisition and that influences the trial.
Source: EthoVision XT 18 - THC - Trial and Hardware Control, Noldus Information Technology