EthoVision XT 18 - THC - Trial and Hardware Control - Program Trial Control (Continued)
Last updated: Jul 30, 2026
Program Trial Control
The program does not ask you whether you want to re-use the Trial Control element if no element of the same type has been defined in the other Trial Control Settings. You cannot re-use a Trial Control element from the same Trial Control Settings. This is because the Trial Control elements must be unique in order for correct analysis to be done.
Frequently-Occurring Cases
Have an Action Taken When a Condition Is Met
Example: A food pellet is dropped (Action) when the mouse is detected in the zone that marks the top of the shelter (Condition).
The condition must precede the action. In the example above, the condition is based on a zone. The action is performed on the Pellet dispenser.
Have Two Actions Taken at the Same Time
Example: In a radial maze experiment, make sure that the device Door 1 opens at the same time when Door 2 closes.
Define two action boxes, one for each door device. Next, do one of the following:
- Place the two action boxes in parallel, and combine them with an All operator.
- Place the two action boxes one after the other. The time between the two actions is negligible.
Specify a Time Interval Between Actions/Conditions
Example: Wait one minute between the action Cue Light On and the action Drop one pellet.
Insert a Time condition box between the two existing boxes.
Make Multiple Instances of an Action
Example: In a conditioning experiment, drop two food pellets in sequence.
The two actions are placed in a linear sequence. If the action is performed on a hardware device, insert a Time condition between the two action boxes, for example wait 10 s before proceeding to the second action. If you do not do this, EthoVision XT interprets the twin actions as one. In the example above, it would deliver one food pellet only.
If the pellet dispenser is almost empty, it may take up to 30 seconds to deliver a pellet. Make sure that the time specified in the Time condition exceeds the time that it takes the action to be carried out.
Another possible solution is to place a condition based on hardware between the two actions, that checks that the Number of pellet drops is >=1 before taking the next Drop pellet action.
Have a Sequence of Conditions and Actions Repeated
Example: Make sure that the sequence Mouse on Shelter → Drop one pellet is repeated every time the animal is found on the shelter.
Define a Sub-rule and insert the sequence of conditions and actions in it. Next, create a Reference to that sub-rule, and specify when and how many times the sequence must be repeated.
Give a Reward After Multiple Instances of the Subject's Action
Example: In a Fixed Ratio schedule, it is required that the animal has to press the lever three times (Action) before getting a reward.
- Define a Trial Control variable C that counts the number of lever presses. The action
C=C+1is triggered every time the condition Lever pressed is met. - Define a Sub-rule that includes the sequence Condition Lever pressed → Action
C=C+1. - Define a Reference for that sub-rule, and specify that the sub-rule must be repeated until C reaches the value required (3). Place the Action box for Drop a pellet immediately after the sub-rule's Reference box.
For more information:
- Trial Control variables: See the Trial Control Variables section.
- Sub-rules and references to sub-rules: See the Sub-rules and References sections.
Have an Action Taken When a Condition Is Met Within a Specific Time
Example: Have EthoVision XT drop a food pellet when the animal visits zone A within 1 minute from the release of a light stimulus.
- Define the main condition (in the example above, animal in zone A). Specify that the Current value of In zone must be true.
- Define the action that must be taken (Drop a pellet).
- Define the accompanying Time condition (Wait one minute).
- Place the main condition followed by the action. Place those two boxes in parallel with the Time condition, using an operator of "Any" type.
With such a sequence, the food pellet is dropped as soon as the animal is found in zone A. If the animal does not go to zone A, one minute after the light was switched on the Time condition is met, and the operator becomes active. Therefore, control passes to the box following the operator, and the In zone condition is no longer evaluated.
With this solution, the action Drop a pellet is not taken when the animal enters zone A more than one minute after the light has been switched on.
Important: If you combine the two conditions above with an operator of All type, the program may wait indefinitely until both conditions are met.
Have Different Actions Taken According to Different Conditions
Example: A T-maze is provided with two doors, one in the middle of arm A and one in the middle of arm B. It is required that door A is opened when the animal enters arm A, and door B when the animal enters arm B.
- Define two conditions, one for arm A and one for arm B. For both conditions, specify that the Current value of In zone must be true.
- Define two actions, one for opening door A and one for opening door B.
- Connect each condition to the corresponding action. Next, connect the resulting sequences through an operator of the "Any" type.
Define Phases in a Trial
Example: It is required that tracking occurs in different phases of a trial, for example, Baseline, Conditioning, and Testing. In each phase, different trial control rules must be applied.
- For each phase, define a Sub-rule with its actions and conditions. Specify when the sub-rule must start.
- For each sub-rule, define a Sub-rule reference and insert it in the Start/Stop rule. Make sure that the references are in the order specified in your experimental protocol.
Test the Trial Control Sequence
It is not easy to make a complex Trial Control sequence work right the first time. To check that Trial Control works as expected, follow this procedure:
- Make sure that the Trial Control Settings that you want to test are highlighted in blue in the Experiment Explorer. Otherwise, click the Trial Control Settings you want to test.
- Open the Acquisition menu (choose
Acquisition > Open Acquisition). - Click Show/Hide and choose Show Dependent Variable. Choose Trial Control Event for simple events like Action Drop a pellet becomes active, or Condition Subject in zone A becomes true.
Source: EthoVision XT 18 - THC - Trial and Hardware Control, Noldus Information Technology