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 (Continued)

Permutation

To explain how Permutation works, consider a variable action within a sub-rule that is repeated a number of times with an interval of 1 second. In the first five repeats, the action generates random numbers in the following sequence: 5, 4, 2, 3, 1. Because Permutation is selected, a new value can only occur at the 6th repeat (indicated with the arrow) or later, after all the numbers within the range 1–5 have been generated.

Use the Permutation option to create sequences of unique numbers that control which events will be carried out. For example, which door of a maze must be opened in a pseudorandom sequence, or which stimuli should be administered in a conditioning experiment.

In the following example, the researcher wants to carry out 10 presentations of each of two stimuli, CS+ and CS-. The stimuli should alternate in a pseudorandom fashion, that is, at the end of the trial a mix of 10 instances of CS+ and 10 instances of CS- has occurred.

  1. Define a main sub-rule that will be repeated 20 times. In this sub-rule, insert a Variable action that defines the variable Var1 with Random integer values chosen between 1 and 20, and with the Permutation option selected.
  2. Next, two conditions determine which way is taken at each repeat of the main sub-rule:
    • If the value is between 1 and 10, a sub-rule for the stimulus type CS+ will be activated.
    • If the value is between 11 and 20, a sub-rule for the stimulus type CS- will be activated.
  3. Because each stimulus type is nested in a sub-rule, define two sub-rules: Subrule CS+, which contains the actions for the stimulus CS+, and Subrule CS-, which contains the actions for the stimulus CS-.
  4. Next to the conditions outlined above, the sub-rule reference boxes Reference CS+ and Reference CS- call the corresponding sub-rules. The two branches must be combined with an OR operator.

Each stimulus-specific sub-rule is set to Repeat once. However, each stimulus type is presented 10 times in total, because the main sub-rule creates 10 values of Var1 that activate that sub-rule 10 times, while leaving the other inactive.

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 can define several instances of variable-based actions and conditions in the same Trial Control profile. Such instances may well become active at the same time. Make sure that they do not interfere with each other. For example, two actions on the same variable are carried out in two different sub-rules:
    • If the actions A=1 and A=2 are evaluated at the same sample time, the value of the variable A after the actions are executed depends on the order of the Reference boxes those sub-rules refer to.
    • If the reference to Sub-rule 1 comes first, A=1 is executed first.
    • If references are placed in parallel, the order is undefined. In the Visualization, you can check which action is executed first.
  • To analyze the values of a Trial Control variable, or visualize its values plotted against time (also for testing purposes), in the Analysis profile choose Trial Control variable.

External Commands

Actions Based on an External Command

  1. In the Components pane, under Actions, click the button next to External command.
  2. Next to Action Name, enter a name for the action (for example, Play sound) or accept the default name. Click the Information button to get additional information about defining an External command.
  3. Under Actions to perform, select which file you want to run by clicking the ellipsis button.
  4. Select one of the file types from the list:
    • Executables (*.exe)
    • Batch Files (*.bat, *.cmd)
    • All Files (*.*)
  5. Locate the file and click Open.
  6. Optionally, enter a Command line option.
  7. To test the command, click the Test button.

Example 1 - Trigger Media Recorder to Record Video

You carry out live tracking during a 24-hour period and you want to record video with Media Recorder, but only when the animal is not in the shelter (defined as a Hidden Zone, where it spends most of its time).

Note: For this configuration you need an analog camera. You must split the video signal from the cameras (using a BNC T-splitter connector) and send it to two BNC connectors of the Picolo Alert encoder board: one for tracking in EthoVision XT and the other for Media Recorder. In order for the board to receive the two signals correctly, you need to adjust the dip switches on the encoder board: usually On for the first input and Off for the second input.

  1. Create an External command box to start Media Recorder. Choose Executables (*.exe) and select MRCmd.exe as the application to run. As a Command line option, enter /E to specify that the external command launches Media Recorder.
  2. Insert a Condition Out of shelter and combine this with a Time condition to make sure that Media Recorder is launched before recording starts.
  3. At the right of the Operator box, insert a second External command box to start video recording: select MRCmd.exe as the executable to run and enter /R as a Command line option to start recording.
  4. Similarly, you can have EthoVision XT stop recording (Command line option: /S) when the subject enters the shelter again.

Note: There may be a delay between the command Start Recording and the moment Media Recorder actually starts recording. Run a test recording to measure that delay.

Example 2 - Trigger UltraVox XT to Record Ultrasound

In this scenario, you plan to video-track mice with EthoVision XT and, at the same time, record their ultrasonic vocalizations with UltraVox XT. For ease of use, you want to start and stop recording from one place — EthoVision XT. Define an External command action based on one of the batch files SUV.bat.

Computer Setup: It is recommended to use one PC for EthoVision XT and one PC for UltraVox XT. Connect the two computers through a network switch and assign the IP addresses to enable communication. See the EthoVision XT Help for more information.

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

Multi-site deployment?

We offer volume licensing and centralized management for labs with multiple locations.

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.