menu_book

Knowledge Base

Documentation, guides, and resources for Noldus products.

EthoVision XT 18 - THC - Trial and Hardware Control - Program Trial Control (Continued)

Last updated: Jul 30, 2026

Program Trial Control

Actions are indicated in italics:

  • When the animal is detected in the arena, start tracking. This is an example of system actions (start tracking and stop tracking).
  • When the animal enters the maze's left arm, do C= C+1. This is an example of actions on a Trial Control variable.
  • When the animal is found on the shelter, drop a pellet. This is an example of actions on hardware devices.
  • When the animal leaves the shelter, play a sound or present a visual stimulus. Or, when you start tracking, also start ultrasound recording with UltraVox XT. Those are examples of actions based on an external command.

To Define an Action

  1. In the Components pane, under Actions, locate the type of action you want to define:
    • Trial Control variable for an action on a Trial Control variable.
    • The device type name for actions on a hardware device.
    • External command to start an external program or run a batch file.
  2. Double-click the action name or click the button next to it.
  3. 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. Choose the option you require and click OK. If this window does not appear, skip this step.
  4. Next to Action name, type in the name you want to give to the action, or accept the default name.
  5. Specify the action properties:
    • For actions on Trial Control variables, see the Trial Control Variables section.
    • For actions on External commands, see the External Commands section.
    • For actions on Hardware devices, see the Hardware Devices section.
  6. Enter a Comment (optional), then click OK.
  7. Insert the action box in the sequence.

You cannot create additional actions of type Start track and Stop track, nor can you delete the existing ones.

Trial Control Variables

You can define variables to be temporarily stored during a trial, which you can use to influence the control of the experiment.

  • Example 1 — Variable as a marker: The variable Phase has been defined to specify the various phases of a trial (Phase = 1 means Conditioning; 2 Testing, etc.). The researcher can then program EthoVision to follow specific Trial Control sequences according to the current value of Phase.
  • Example 2 — Variable as a counter: A researcher has defined the variable SR (successful response) to count the number of times the subject responds correctly to a stimulus. To increment the value of SR after a correct response, specify the formula SR= SR+1.

To Define a Trial Control Variable

  1. In the Components pane, click the button next to Trial Control variable under Conditions or Actions. Next, click the TC Variables button.
  2. The Trial Control Variables window lists the variables currently in the experiment (including those defined in other Trial Control Settings). To add a new variable, click Add variable.
  3. 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).
  4. 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 this variable at this point.
  • 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 variable name cannot contain blank spaces. The default name of a new trial control variable is VarN, where N is a progressive number.

Actions on a Trial Control Variable

To assign a new value to a variable in Trial Control, define a Variable action in your Trial Control rule.

  1. In the Components pane, under Actions, click the button next to Trial Control variable.
  2. 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. If this window does not appear, skip this step.
  3. Next to Action Name, enter the name of the action (for example, Increment Counter) or accept the default name.
  4. Under Action to perform, select the variable from the list. You can also create the variable by clicking the TC Variables button if you have not yet done so.
  5. 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 enter the Minimum and Maximum limits (integer numbers 1 up to 999) within which the random value must fall. When you select Random, the Permutation option also appears.
  6. Enter a Comment (optional), then click OK.
  7. Insert the resulting action box in the Trial Control rule.

Random Values and the Permutation Option

When programming variable ratio schedules, it is a good idea to use the Random option. Define a random variable R that specifies the number of rewards to be provided. Insert the resulting box in a sub-rule. Every time the sub-rule is repeated, the variable R gets a new value. Make sure that the food dispenser is activated as many times as specified by R during that repeat. You can do this by calling a second sub-rule that activates the food dispenser (action drop pellet followed by a time condition that waits for a short time interval). This second sub-rule is repeated as many times as specified by the value of R.

You cannot combine Random with a formula (for example, to compute A= Random+1). The equivalent solution is to define first an action B= Random, and then one more action A= B+1. Place the two boxes in sequence.

Select the Permutation option to generate a value such that all n values within the specified range occur once before a value is generated again. For example, if you specify 1 as Minimum and 5 as Maximum (n = 5), the value 1 will be generated only when all five values in the range have been generated in previous repeats of the action.

Source: EthoVision XT 18 - THC - Trial and Hardware Control, Noldus Information Technology

Upgrade your research setup

Discover how the latest version can accelerate your behavioral research. Talk to our team.

Noldus is here to assist you throughout the whole process.

shopping_bag
check_circle

Thank you!

We'll get back to you shortly.

error

Please correct the following errors:

error

error

error

error

By clicking Submit, you consent to Noldus processing your data as described in our privacy policy.