EthoVision XT 18 - Application Manual - Advanced Applications (Continued)
Last updated: Jul 30, 2026
Simultaneous Stimulations in Two or More Arenas
When you run a trial with multiple arenas, EthoVision XT controls multiple pulsers, each assigned to a specific arena. This is only possible with the aid of batch files (see below).
Why Are Batch Files Needed?
A batch file is necessary to send commands for initializing the COM port and define the pulse sequence for a specific arena. The reason for this is that the Trial Control rules are applied to each arena independently, but the External commands specified in those boxes are not arena-specific. You can imagine two identical copies of the picture of the previous page, one for each arena. This means that an external command would be sent twice to the same COM port, which may result in unexpected behavior. To prevent this from happening, a batch file is needed that sends the command lines based on the name of the arena.
You need two batch files, one (Initialize COM ports.cmd) for initializing the COM port, and one for defining the pulse sequences (Define sequences.cmd). The two batch files are activated one after the other, with a time interval in between. A third batch file (Stop sequences.cmd) stops the definition of sequences previously used, and is handy when you use different sequences in the same trial or between subsequent trials.
Note: If you do not have those batch files, please contact Noldus IT, or follow the instructions below.
To Create the Batch File "Initialize COM Ports"
-
Open the Windows Notepad and enter the following (here we assume that four arenas are used, with COM ports 3, 4, 5 and 6):
@echo off
set arena=%1
set arena=%arena:~2,-2%
If "%arena%"=="Arena 1" C:\Windows\System32\cmd.exe /C mode COM3 BAUD=57600 PARITY=N DATA=8 STOP=1 DTR=off RTS=off
If "%arena%"=="Arena 2" C:\Windows\System32\cmd.exe /C mode COM4 BAUD=57600 PARITY=N DATA=8 STOP=1 DTR=off RTS=off
If "%arena%"=="Arena 3" C:\Windows\System32\cmd.exe /C mode COM5 BAUD=57600 PARITY=N DATA=8 STOP=1 DTR=off RTS=off
If "%arena%"=="Arena 4" C:\Windows\System32\cmd.exe /C mode COM6 BAUD=57600 PARITY=N DATA=8 STOP=1 DTR=off RTS=off - Save the file, and give it the extension
.cmd. -
Open the Windows Notepad and enter the following:
@echo off
set arena=%1
set arena=%arena:~2,-2%
If "%arena%"=="Arena 1" C:\Windows\System32\cmd.exe /C echo M1,0,500,500,0,0,1,1,103,1,0,0,0,0@>com3
If "%arena%"=="Arena 2" C:\Windows\System32\cmd.exe /C echo M1,0,500,500,0,0,1,1,103,1,0,0,0,0@>com4
If "%arena%"=="Arena 3" C:\Windows\System32\cmd.exe /C echo M1,0,500,500,0,0,1,1,103,1,0,0,0,0@>com5
If "%arena%"=="Arena 4" C:\Windows\System32\cmd.exe /C echo M1,0,500,500,0,0,1,1,103,1,0,0,0,0@>com6The example above would produce a sequence of 500 ms pulses (frequency 1 Hz). Replace the
500with the pulse durations and intervals you require. - Save the file, and give it the extension
.cmd. -
Open the Windows Notepad and enter the following:
echo S>com3
echo S>com4
echo S>com6
echo S>com7Replace the port number with those assigned to your Pulsers.
- Save the file, and give it the extension
.cmd. -
Follow steps 1 to 4 as described in the initial setup procedure.
Tip: Rename the Device IDs to, for example, Pulser 1 and Pulser 2.
-
Important: In EthoVision XT (Arena Settings), make sure that the name of the arenas is Arena 1, Arena 2, etc.
-
In EthoVision XT (Arena Settings), click the Arena-Hardware Mapping button. Add two devices, and assign each pulser to only one arena.
Important: Make sure that <No device allocated> is selected in the remaining cells under Arena 1, Arena 2, etc.
-
In the Trial Control Settings, define the following boxes and insert them between the Start Trial and the Start Track box:
- An External command for the first batch file,
Initialize.cmd. Enter%an%in the Command line options. - A time condition, set to two seconds.
- An External command for the batch file
Stop sequences.cmd. Command line options are not necessary. - A time condition, set to two seconds.
- An External command for the second batch file,
Sequence.cmd. Enter%an%in the Command line options.
- An External command for the first batch file,
-
Complete your Trial Control procedure to the right of the Start Track box. Different protocols must be defined with different Subrules. For example, create a Subrule 1 for controlling Pulser 1, and a Subrule 2 for controlling Pulser 2.
Important: Make sure that "Arena 1", "Arena 2" etc. are the exact name of the arenas in the Arena Settings. Make sure to avoid leading or trailing spaces in the names. Note that this differs from that in EthoVision XT 17 and earlier versions. Also, make sure to enter the correct COM port number of your Pulsers.
To Create the Batch File "Define Sequences"
To Create the Batch File "Stop Sequences"
Basic Steps
Source: EthoVision XT 18 - Application Manual, Noldus Information Technology