EthoVision XT 19 - Trial Control Settings - Hardware
Last updated: Jul 28, 2026
Hardware
To define a condition based on the signal given by a hardware device. To use hardware-based conditions, you must have the Trial and Hardware Control Module. See the EthoVision XT 19 - Trial and Hardware Control - Reference Manual.
Notes
- If the Add a Condition window appears, it means that there is at least one condition with the same name in your experiment. Create a new condition, or re-use the existing condition. See Re-use Trial Control Elements.
- For a complex condition like "stop the trial when the rat reaches the platform or it has been swimming for 60 seconds", see an example for the Start/Stop the Trial in the Morris Water Maze Test.
- Trial Control conditions cannot be defined based on behaviors scored automatically with Rat or Mouse Behavior Recognition. This is because the detection of behavior also depends on video frames that come after the time that the condition is evaluated.
- If you insert a Condition box based on Activity, and then deselect Activity Analysis in the Experiment Settings, your rule becomes invalid. The Condition boxes based on Activity are removed from your sequence and the connecting arrows are removed. Re-connect the boxes.
- See also Overview of Conditions in the EthoVision XT 19 - Trial and Hardware Control - Reference Manual.
Actions
Aim
An Action is a command that EthoVision XT carries out during acquisition.
Examples
- Start Tracking and Stop Tracking (see The Start-Stop Trial Rule).
- Do C = C+1. This is an example of an action on a Trial Control variable. See Using Trial Control Variables.
- Start video recording with MediaRecorder. This is an example of an External Command. See External Commands.
- Open the door of LeftArm or Drop a pellet. These are actions on hardware devices (only with the Trial and Hardware Control Module).
Procedure
- Open or create new Trial Control Settings.
- In the Components pane under Actions, locate the type of action you want to define and click the button next to it.
- Next to Action Name, type in the name you want to give to the action, or accept the default name.
- Specify the action.
- Enter a Comment (optional), then click OK.
- Insert the action box in the Trial Control rule.
Using Trial Control Variables
Aim
Trial Control variables help you keep track of events that occur during the trial. An example of a Trial Control variable is a counter.
To Define a Trial Control Variable
- Open or create new Trial Control Settings.
- In the Components pane, under Conditions or Actions, click the button next to Trial Control Variable.
- Next, click the Variables button. The Trial Control Variables window lists the variables currently in the experiment (also those defined in other Trial Control Settings). To add a new variable, click Add Variable.
- A new row is appended to the table. Under Name, type in the name you want to give to the variable. Under Initial Value, enter the value of this variable at the start of the trial (default: 0).
- Click OK. In the TC-Variable Action/Condition window, define the action or condition you require. Click Cancel if you do not want to create a condition or action based on that variable at that point.
Notes
- To delete a variable, click the variable name in the Trial Control Variables window and click the Delete Variable button.
- To rename a variable, click the variable name in the Trial Control Variables window and edit the name.
- The default name of a new Trial Control variable is VarN, where N is a progressive number.
- The variable name cannot contain blank spaces.
To Define an Action on a Trial Control Variable
- In the Components pane, under Actions, click the button next to Trial Control Variable. If you do not see this action, under Actions click the More button.
- If the Add an Action window appears, it means that there is at least one action of the same type in your experiment. You are asked to choose between creating a new action or re-using an existing one. See Re-use Trial Control Elements.
- In the TC-Variable Action window, next to Action Name, enter the name of the action (for example, Increment Counter) or accept the default name.
- Under Action to Perform, select the variable from the list. You can also create the variable by clicking Variables if you have not yet done so.
- Next to the = symbol, do one of the following:
- To assign the same value of another variable (for example A = B), select the other variable (B) from the second list.
- To enter a formula, click the double-arrow button. Select the operator from the list and specify the formula in the second and third lists. For example, A = A + 1.
- To assign a random value, select Random from the second list, and select the Minimum and Maximum limits (only integer values, 0 up to 999) for the random value.
- Click OK. Insert the resulting Action box in the Trial Control rule.
Notes
- If your setup includes multiple arenas, each arena receives an instance of the variable. Thus, a variable can have different values in different arenas.
- You cannot combine Random with a formula (for example, to compute A = Random+1). The equivalent solution is the following: define first an action B = Random, and then one more action A = B+1. Place the two resulting Action boxes in sequence.
- For a random variable, select the Permutation option to generate a random value that is unique in the sequence of all values in the specified range. For example, if the Minimum is 1 and the Maximum is 5, any value will be generated only after all the other possible values have been generated in previous repeats of the action. That is, a new value 1 can only occur after all the other possible numbers are generated during previous repeats of the action: 3, 2, 4, 1, 5, 1. Use the Permutation option to create sequences of unique numbers, for example to activate routines in a pseudo-random order but without the repetitions that would occur if you generate fully random numbers (for example, 2, 4, 1, 1, 5).
See Also
- The EthoVision XT - Trial and Hardware Control - Reference Manual. See Manuals.