EthoVision XT 18 - THC - Trial and Hardware Control - Program Trial Control (Continued)
Last updated: Jul 30, 2026
Program Trial Control
Network Configuration Example
Example network configuration:
- Network Switch: 192.168.0.239 (Netgear GS310TP)
- EthoVision XT PC: 192.168.0.201
- UltraVox XT PC: 192.168.0.202
Batch File Configuration
The available batch files are located in C:\ProgramData\Noldus\Common\Tools\UltraVox XT 3 Control.
When working with one arena, use the file SUV - 2 PCs.bat:
@if exist "\\IP address of UltraVox XT PC\Synch\start.txt" del "\\IP address of UltraVox XT PC\Synch\start.txt"
@copy "C:\ProgramData\Noldus\Common\Tools\UltraVox XT 3 Control\start.txt" "\\IP address of UltraVox XT PC\Synch" > nul
Open the file with Notepad and enter the actual IP address of the UltraVox XT PC. Alternatively, you can enter the name of the PC as found in Windows (e.g. DESKTOP-123ABC) instead of the IP address.
The batch file copies the start.txt file to the trigger folder of UltraVox XT. This starts and stops sound recording.
- Action 1: Calls the batch file to start recording in UltraVox XT.
- Condition 2: Determines the duration of the recording.
- Action 3: Calls the same batch file again and stops recording in UltraVox XT.
In UltraVox XT, open the Trial Control Settings and choose External program trigger for both Start acquisition and Stop acquisition. For more information, see Control UltraVox XT from other software in the EthoVision XT Help.
If you work with multiple arenas, use the batch file SUV - 2 PC multiple arenas.bat. This sends the start.txt file just one time, for Arena 1. If the arena has a different name, open the file with Notepad and edit the name between the quotes:
@if exist "\\IP address of UltraVox XT PC\Synch\start.txt" del "\\IP address of UltraVox XT PC\Synch\start.txt"
@echo off
echo %1
IF %1=="Arena 1" (
@copy "C:\ProgramData\Noldus\Common\Tools\UltraVox XT 3 Control\start.txt" "\\IP address of UltraVox XT PC\Synch" > nul
)
In both Action boxes in the Trial Control Settings, specify the following Command line options (quotes included):
"%an%"
It is also possible to run EthoVision XT and UltraVox XT on the same PC. In this case, use the batch file SUV - 1 PC.bat. However, this may cause high workload on memory and the processor. Test this solution thoroughly and ensure the proportion of missing samples in your tracks is acceptable.
Examples
Example 3 - Present an Acoustic Stimulus
You can use an EthoVision XT external command to run a batch file that plays a sound during your trials. Define an action using the batch file Play sound.bat.
The batch file Play sound.bat starts Windows Media Player and plays the sound file Stimulus_sound.wav. Its content is:
start wmplayer D:\Temp\Stimulus_sound.wav
A similar solution utilizes Windows PowerShell:
powershell -c (New-Object Media.SoundPlayer "D:\temp\Stimulus_sound.wav").PlaySync();
Example 4 - Present a Visual Stimulus
With the free tool Frameless you can easily display images on a separate monitor based on subject behavior or at a specific time.
- Download Frameless and copy the executable to the EthoVision XT PC.
- In the Trial Control Settings, create an external command action and specify Frameless along with the required parameters. In this example, the stimulus
S1.jpgis presented 10 seconds after the start of the trial, displayed full screen on monitor 2 for two seconds.
Tip: Create a subrule to present multiple stimuli during a trial.
Tip: If you work with multiple arenas, see Example 2 below.
External Commands: Arena- and Trial-Specific
Command Line Options: Arena and Trial Name
Use the Command line options %an% and %tn% in the External Command window to send information about the Arena and Trial name in command lines from the Trial Control rule. This is especially useful for controlling events based on specific arenas or trials.
Example 1 - Display Arena and Trial Name
A batch file can be created to display the current Trial name and Arena name in the DOS window (one for each arena, in the case of multiple arenas). The instructions echo %1 and echo %2 listen to the values of the parameters in the Command line options, %an% and %tn%, in the order specified. The DOS window closes 5 seconds later:
echo %1
echo %2
timeout /t 5 /nobreak > NUL
In the External Command Action window, specify the name and location of the batch file and enter the command line options "%an%" "%tn%" including the quotes.
Note:
- All characters must be lower case.
- The parameters must be on the same line, separated by one space.
- The line
echo %1reads the first parameter specified in the command line options (the arena name). - The line
echo %2reads the second parameter specified (the trial name).
Example 2 - Present a Stimulus to Multiple Arenas
A researcher wants to present a visual stimulus to fish larvae swimming in six wells (six arenas). Using the procedure described in Example 4 alone would send the command six times simultaneously, which is not desirable. Using Command line options, the image can be associated with one specific arena, for example Arena 3. Because the monitor is placed under the wells, all subjects still receive the stimulus.
First, create a batch file with the following content:
@echo off
echo %1
IF %1=="Arena 3" (
[path]\Frameless.exe "[path]\Stimulus.jpg" mon=2 fullscreen=yes duration=00:00:02
)
Where mon=2 specifies the second monitor. The image is displayed in full-screen mode for two seconds. For additional adjustable parameters, see the Frameless documentation.
Note: The arena name may differ in your experiment (e.g. "A1", "Maze 1"). Save the file with the extension .bat, for example ShowImage.bat.
Next, in the Trial Control Settings, create an External Command, specify the path to the batch file, and enter the following in the Command line options (quotes included):
"%an%"
Source: EthoVision XT 18 - THC - Trial and Hardware Control, Noldus Information Technology