menu_book

Knowledge Base

Documentation, guides, and resources for Noldus products.

EthoVision XT - Optogenetics Experiments

Last updated: Jul 25, 2026

Optogenetics Experiments

Introduction

optogenetics and ethovision xt

In the last decade, a method was developed to specifically activate or even inhibit small groups of neurons with light. Today, scientists can insert light-sensitive receptor proteins (originally found in algae) into single mammalian neurons in vivo, making these neurons sensitive to activation by light of specific wavelengths. This allows scientists to control the activity of these neurons and study their downstream influence on a variety of biological processes [ref. 1, 2]. Optogenetics is an important development for behavioral research. Not only can the actual influence of specific neurons on behavior more specifically be determined, but also, with the help of an automatic video tracking system such as EthoVision XT, behavior can be manipulated via optogenetic methods in real time. With the Trial & Hardware Control module, EthoVision XT can control light pulses given by a third party device, based on the behavior of the animal (for instance, presence in a trigger zone). In this manual we focus on the optogenetics solution for rodents that combines EthoVision XT, PhenoTyper (as test environment) and the Prizmatix optogenetics devices. For how to conduct optogenetics experiments with zebrafish, see the DanioVision DVOC-0041 - Reference Manual.

examples

Place preference

The animal is placed in an arena with two distinct sides - one of which is paired with optogenetic stimulation. Depending on whether this stimulation is activating or deactivating, and which neurons are affected, this can be a rewarding or aversive stimulus for the animal. If in further sessions the animal spends more time on the stimulated sides, it is fair to conclude the stimulus had a rewarding effect. If the 14 - Optogenetics Experiments animal avoids this side, the stimulus could then be considered aversive [ref. 3,4].

Operant conditioning

In operant conditioning tests, the animal learns to perform an action in order to get a reward or avoid an aversive stimulus. The behavioral response can be recorded with EthoVision XT, either by detecting the animal (or its nose point) in a certain zone, such as the feeder, or by analyzing the external signal initiated by the nose poke or lever press. Following this action, EthoVision XT sends out the command for optogenetic stimulation [ref. 3,4].

Off-on-off stimulus test

In an off-on-off stimulus test, you can program EthoVision XT to turn optogenetic stimulation on for a period of time during the test. For example, a 15 minute test during which continuous optogenetic stimulation takes place in the middle 5 minutes.

references

  1. Guru, A., Post,R.J., Ho, Y., Warden, M. (2015). Making Sense of Optogenetics. International Journal of Neuropsychopharmacology, Aug 2015, 1 - 8.
  2. Zalocusky, K., Deisseroth, K. (2013). Optogenetics in the behaving rat: integration of diverse new technologies in a vital animal model. Optogenetics 2013: 1-17.
  3. Stamatakis, A.M., Stuber, G.D. (2012). Activation of lateral habenula inputs to the ventral midbrain promotes behavioral avoidance. Nature Neuroscience, 15(8), 1105-1107.
  4. Kravitz, A.V., Tye, L.D., Kreitzer, A.C. (2012). Distinct roles for direct and indirect pathway striatal neurons in reinforcement. Nature Neuroscience, 15, 816-818. 14 - Optogenetics Experiments

Physical setup

components (example)

Devices

PC with EthoVision XT installed. Noldus USB-IO Box. PhenoTyper with adapted Top Unit (optional). Prizmatix LED controller (for different light wavelengths).

important To control the LED through EthoVision, on the back

panel of the LED controller, near/below the TTL connector, select

Ext (but if you want to activate the LED manually using the button

located on the front panel, you should select Int). The other switch

on the LED controller, just near/above the Ain 0-5V connector,

should be in the Int position. Prizmatix Pulser (left) or PulserPlus (right) (with advanced setup).

Main cables and fiber cords

(in bold, port names; power cords and video cables not listed) 14 - Optogenetics Experiments USB cable (USB-A to USB-B). Use this cable to connect the

EthoVision XT PC to the USB-IO box [USB, type-B]. Also use this

cable to connect the Pulser to the PC.

UTP to BNC cable. To connect the USB-IO box [TTL control] to the

LED Controller [TTL] or Pulser [Trig. In].

note 1 Each TTL port of the USB-IO box has two output lines. The

white RCA jack corresponds to Output 1 and the red RCA jack to

Output 2. Take note of this when selecting the TTL commands in

EthoVision XT page 278).

note 2 If you received UTP-to-BNC cables with four BNC

connectors, only use those marked with Output to connect the LED

controller or Pulser. BNC to BNC cable. From Pulser [TTL Out] to LED Controller [TTL]. Fiber patch cord, core 1000 m. To connect the LED Controller [front panel] to the PhenoTyper Top Unit [Fiber Coupler adaptor, see Figure 14.2B-C]. Fiber patch cord, core 1000. This is located inside the PhenoTyper Top Unit. It connects the FC adaptor to the Rotary joint. 14 - Optogenetics Experiments Single fiber. To connect the Rotary joint fixed on the bottom plate of the PhenoTyper Top Unit to the implantable cannula. Available in various core diameters (e.g. 500 m).

Other components

Zirconia ferrules (sleeves) for 2.5 mm and 1.25 mm cannulae. Optogenetics implantable cannulae (2.5 mm, 1.25 mm).

basic setup

Aim

With a basic setup, without the Pulser, EthoVision XT controls activation of the LED directly via the Noldus USB-IO box. With this setup you can, for example, activate the LED for one second.

Functional scheme

Notes

Activation of the LED can be repeated during a trial using the Subrule function in the Trial Control Settings. For generating two pulses of different length, you must create separate Trial Control commands.

Limitations

The pulse cannot be shorter than 0.1 s. Figure 14.1 Activation of the optogenetics fiber directly from the USB-IO box. 14 - Optogenetics Experiments Accuracy of onset, offset and duration of a pulse is approximately the time taken by three samples. When tracking at 30 fps, this time is 0.1 s. The higher the sample rate, the higher the accuracy. For the advanced setup, see page 273.

Connection scheme

Figure 14.2 Cable connections for controlling the LED controller directly from

EthoVision XT and the USB-IO box. A. Back panel of the LED controller. Under the TTL connector there is a switch; set it to Ext. This way you enable external control of the LED. Note that each TTL port of the USB-IO box has two output lines. Connect the LED controller to the USB-IO box using the white RCA jack if you use Output 1, or with the red jack if you use Output 2 (see page 270). The other switch

on the LED controller, just near/above the Ain 0-5V connector, should be in the

Int position so you can manually adjust the light intensity using the knob on the front panel. B. Front panel of the LED controller with patch fiber cord connected. C. PhenoTyper Top Unit adapted for connecting the LED controller. D. Bottom plate of the PhenoTyper Top Unit with Rotary joint and optical fiber. 14 - Optogenetics Experiments

note If you received UTP-to-BNC cables with four BNC connectors, only

use those marked with Output to connect the LED controller.

advanced setup (with pulser)

Aim

With this setup, EthoVision XT controls activation of the LED via the Prizmatix Pulser and PulserPlus devices. With this setup you can send out a very specific sequences of pulses, at a frequency higher (max 0.5 kHz) than with the basic setup. The sequence is predefined in the Pulser/PulserPlus (see page 284). note PulserPlus is the device with three BNC connectors.

Functional scheme

Figure 14.3 Activation of the optogenetics fiber from EthoVision XT with a train of pulses programmed in the Prizmatix Pulser or PulserPlus. 14 - Optogenetics Experiments

note For information about how to use the Pulser with its own

software, see the Prizmatix Pulser/PulserPlus user manual which comes with the device.

Connection scheme

Figure 14.4 Cable connections for controlling the Pulser and the LED controller. For A to D, see Figure 14.2. On the LED controller, make sure that the switch near/

below the TTL connector is in the Ext position. Also keep the switch near/above

the Ain 0-5V connector in the Int position. E. Front and back panel of the Pulser/PulserPlus. Note that each TTL port of the

USB-IO box has two output lines. Connect the Trigger in / Trig. In port of the

Pulser/PulserPlus to the USB-IO box with the white RCA jack if you use Output 1, or with the red jack if you use Output 2 (see page 270). Connect the Pulser/PulserPlus to the PC with a USB cable. 14 - Optogenetics Experiments

note If you received UTP-to-BNC cables with four BNC connectors, only

use those marked with Output to connect the Trigger In/Trig. In port

on the Pulser/PulserPlus.

important If you have the PulserPlus, set the Operation mode switch

to PC. For more information on how to install the Pulser/PulserPlus, see

the user manual that comes with the device.

measure the led light output

In some circumstances you may want to measure the LED light intensity at the tip of the cannulae. For this you need a sensor and a power meter. Note that a standard power meter may not give accurate measurements. See this link for a few suggestions. https://www.prizmatix.com/blog/main/0/23/Optical-Power-Meters- for-Optogenetics An example is the Thorlabs S140C or Thorlabs S142C coupled with the Thorlabs PM100USB interface which shows the measurements on a computer screen. See also https://www.thorlabs.com/navigation.cfm?guide_id=37 14 - Optogenetics Experiments

Optogenetics experiments in EthoVision XT

Create an experiment. For details, see Chapter 1 of this manual, or in

EthoVision XT press F1 and see Setup an Experiment in the EthoVision

XT Help. If you use PhenoTyper, you can create an experiment from a

PhenoTyper template. Choose File > New from Template and in the

guided wizard, from the Arena template list, choose PhenoTyper (for

one cage) or PhenoTyper quad (for two to four cages).

experiment settings

Choose Setup > Experiment Settings.

General settings

Set Video Source to Live Tracking and select the camera image. Choose the Tracked Features that apply to your experiment.

Use of Trial Control Hardware

  1. Under Trial Control Hardware, Select Use of Trial Control Hardware.
  2. Click Settings and choose Noldus USB-IO box.
  3. In the window that appears, locate the TTL port of the USB-IO box

that is connected to the LED controller, and from the Device type list

choose Custom Hardware. Under Device ID give this device a unique

name (for example LED controller 1, or Pulser if you use the Prizmatix Pulser/PulserPlus). 4. Repeat the previous step if you have more LED controllers or Pulsers.

important Make sure that Custom Hardware is selected in the Device

Configuration window, not TTL Tester or others. 14 - Optogenetics Experiments

arena settings

Choose Setup > Arena Settings > Open Arena Settings 1.

We assume that you followed the procedure in arena settings on page

15.

Arena-Hardware Mapping

  1. Make sure that you have drawn all the arenas.
  2. At the bottom of the Arena Settings window, click the Arena- Hardware Mapping button.
  3. In the Arena-Hardware Mapping window, click Add device one or more times depending on how many physical devices (LED controllers or Pulsers) are connected.
  4. Assign the devices to the arenas. For setups with one cage (and one device), that is automatically assigned to Arena 1. For setups with multiple cages (and devices), assign each device to the corresponding arena.
  5. For each row, rename the Device name (for example, rename Device A to LED controller 1 or Pulser 1).

tip Give devices unique names. That is also handy when analyzing

the data and events of specific devices.

To test the LEDs

note This procedure is only valid for the Basic setup (without Pulser). 14 - Optogenetics Experiments 1. In the Arena-Hardware Mapping window, Click the row that

corresponds to the device you want to test and click the Test

button. 2. Choose Output 1 High and click Test. Check that the LED is activated. 3. Choose Output 1 Low and click Test. Check that the LED is deactivated.

trial control settings

In the Trial Control Settings you can program activation and deactivation of the LED controller during the trial. If you use the Prizmatix Pulser, see page 284. Choose Setup > Trial Control Settings.

Below you find a simple example. It shows how to switch on a LED one

minute after the start of the trial, keep the LED active for one second, and then switch it off.

To switch on the LED

  1. Under Actions, click the button next to Custom Hardware.
  2. From the Custom Hardware list select the LED controller device (this

is the name given under Device name in the Arena-Hardware

Mapping window; see page 277). 3. From the Action to perform list select Output 1 High (or Output 2

High if you connected the USB-IO box to the LED controller using the

cable with the red RCA connector - see page 270). 4. optional Rename the Action name (for example, rename Hardware act (1) to Start Pulse). 14 - Optogenetics Experiments 5. Click OK and insert the new Action box in the Trial Control sequence, usually after a condition. In the example below, the stimulation is given one minute after the

start. Therefore, a Time Condition box is inserted between the Start

track box and the Action box just made.

note With this Trial Control procedure, the stimulus does not stop

unless you insert another Action box that specifies Output 1 Low (see

below).

To switch off the LED after some time

  1. Follow the instructions on the previous page to program activation of the pulse. 14 - Optogenetics Experiments
  2. Under Conditions, click the button next to Time. Select After a time of and enter the duration of the pulse (minimum possible: 0.1 s). Next, insert the Condition box immediately after the Action box.
  3. Under Actions, click the button next to Custom Hardware.
  4. From the Custom Hardware list select the LED controller device (this

is the name given under Device name in the Arena-Hardware

Mapping window; see page 277). 5. From the Action to perform list select Output 1 Low (or Output 2 Low if you connected the USB-IO box to the LED controller using the cable with the red connector). 6. optional Rename the Action name (for example, from Hardware act (2) to Pulse Off). 7. Click OK and insert the new Action box after the second Time Condition box. The sequence can be read as follows: One minute after the start of tracking (first box), activate the LED controller (second box), then wait one second (third box) and deactivate the LED controller (fourth box). 14 - Optogenetics Experiments

To activate the LED when the animal is in a zone

It is often required to activate the LED multiple times, for example, every time the subject enters a trigger zone, or every time the subject presses a lever. In such a situations you need to create a Subrule that can be repeated indefinitely. The Subrule contains the following instructions (see the next picture, from left to right): Check that the subject is in the zone (or the lever is pressed) (a). In this example the condition is based on "Current Duration", that is, it becomes true when the subject is found in the zone for a specific time. When the previous condition is met, turn the LED on (b; for details, see page 278). Figure 14.5 Trial Control Settings for activating the LED when the subject is in a specific zone. a. Condition box that checks if the animal is in the zone. b. When the condition a becomes true, then the Action box activates the LED. c. Condition box that checks if the animal is out of the zone. d. When the condition c becomes true, then the Action box switches off the LED. Next, the Subrule starts again with

condition a being evaluated. The Reference box (at the top) specifies that the

Subrule is repeated indefinitely until the end of the trial. 14 - Optogenetics Experiments Check that the subject is out of the zone (or presses another level/ performs an action to be linked to the end of stimulation) (c). When the previous condition is met, turn off the LED (d).

note You can also base the "In Zone" conditions on the statistic

"Current". However, in such case when the subject walks along the zone border its center point will jitter between somewhere outside the zone and inside the zone. For this reason the "Current" value of the In Zone variable will rapidly change from true to false and vice versa, therefore the conditions based on this variable become true and false very often. To prevent this from happening, in the "In Zone" Condition

window click Settings and enter a Zone exit threshold. This way the

subject is still considered in the zone (Current In Zone = true) if its body point is found within the threshold distance from the zone border. The subject is only considered out of the zone (Current In Zone = false) if it crosses the threshold.

tip Reduce the zone by a distance half of the exit threshold; for

example if the exit threshold is 4 cm, reduce the zone border by 2 cm. This way you do not overestimate the size of the zone when using the

exit threshold. For details, in the EthoVision XT Help see Dependent

Variables in Detail > In zone. 14 - Optogenetics Experiments

detection settings

Choose Setup > Detection Settings.

We assume that you followed the procedure in detection settings on

page 17.

Set the sample rate

In the Video section, check that the sample rate is set to:

Rats. 5 samples/second. Mice. 12.5 samples/second. However, when tracking the nose-point, center-point and tail-base point of the rodents, always choose the highest possible sample rate, for example 25 or 30 samples/s, depending on your camera.

Remove the effect of cables and fibers

When working with physiology and optogenetics setups, the cables and fibers often make detection of the subject impossible with the default settings (see the figure below, left).

To filter fibers out of the video image (right), use the Subject Contour

options. If the fiber is the same color as the subject, like in the figure

below (left), then increase the value in the first Erosion filter until the

fiber is no longer detected (figure below, right). Increase Dilation to

make the entire body fully detected. Leave the second Erosion filter to

zero. If the fiber has a different color and "cuts" the yellow blob in two, try first Dilation, and then increase the second Erosion filter. 14 - Optogenetics Experiments

Using the Pulser

pulse sequences

Aim

To specify a train of pulses of frequency up to 0.5 kHz.

The Pulser software

The Pulser/PulserPlus can send out a very specific modulated pulse sequence. You can program the Pulser by specifying a number of parameters in a command line (string command; see below). This command line is sent out from EthoVision XT to the Pulser.

Structure of the pulse sequence

Pulse train. Two pulses (1 and 2) are organized in a Pulse train. This is described by (see Figure 14.6): The duration of pulse 1 (P1D). The interval between pulse 1 and pulse 2 (P1I). The duration of pulse 2 (P2D). The interval between pulse 2 and the end of the train (P2I). The interval between trains (BI). Figure 14.6 Parameters describing a train of pulses 1 and 2. 14 - Optogenetics Experiments Number of trains. A pulse train can be repeated a number of times specified by the parameter TNT (see below). The total duration of the signal is given by TNT times the total duration of the other five parameters. Group of pulse trains. A number of trains defined as above can be seen as a group. The duration of the group is defined automatically by the parameters above. Multiple groups of pulse trains are therefore defined by the interval between groups (GI) and the total number of groups (TNG).

Structure of the string command

echo MTNT,BI,P1D,P1I,P2D,P2I,TNG,GI,OM,NoT,ToDy,ToDu,ToIt,ToNu@ > [COM port number] Where Figure 14.7 Parameters describing groups of pulse trains.

echo

DOS command that sends the string. Command prefix. Do not put commas between this and the next parameter.

TNT

Total number of trains.

BI

Interval between trains (msec).

P1D

Duration of pulse 1 (msec).

P1I

Interval between pulse 1 and 2.

P2D

Duration of pulse 2 (msec). 14 - Optogenetics Experiments

Example

In an optogenetics protocol we want to stimulate the animal with light bouts of 20 ms separated by 20 ms off. This would result in 25Hz stimulation. P1D = P2D = P1I = P2I = 20 ms. The resulting string command we need to send to the Pulser would be (Note: OM = 3 for Pulser, 103 for PulserPlus):

P2I

Interval between pulse 2 and end of train (ms).

TNG

Total number of groups of pulse trains.

GI

Interval between groups (sec).

OM

Operational mode. For Pulser [0,1,2,3], for PulserPlus [100 to 103] where 0 (100) = Do not use the trigger input 1 (101) = Use the trigger for single sequence 2 (102)= Use the trigger. Perform the and when finished wait for the next trigger. 3 (103) = Use the trigger. Perform the sequence as long as the trigger is "high". This is the recommended option. See also the Pulser/PulserPlus User Manual.

NoT

Number of Triggers [1, 2,...].

ToDy

Delay of TrigOut from last train finish (not used by EthoVision XT).

ToDu

Duration of TrigOut (not used by EthoVision XT).

ToIt

TrigOut interval (not used by EthoVision XT).

ToNu

Total number of TrigOut (not used by EthoVision XT). End of command (no comma before it) MTNT BI P1D P1I P2D P2I TNG GI OM NoT

echo

M1,

0,

20,

20,

20,

20,

1,

0,

(103),

1,

Notes

Although the total number of trains TNT is set to 1, the pulses are sent out continuously because the Operation mode is set to 3. In this case the pulse trains are generated as long as EthoVision XT sends the TTL signal "high". When EthoVision XT sends the TTL signal "low", the sequence stops. If one wants to stimulate the animal as long as the animal is in a specific zone, in the Trial Control Settings the TTL signal "high" must be associated with a condition based on the variable In zone (see an example on page 293). With Operation mode 3, during generation of the pulse sequence the LED is lit on continuously. If you have the Pulser and the older Pulser software (version 2.1) the command above would be: C echo 1,0,20,20,20,20,1,0,3,1@ .

configure the com port for each pulser

Aim

To configure the COM port in such a way the Pulser/PulserPlus accepts commands from EthoVision XT.

Procedure

  1. Connect the Pulser/PulserPlus to the PC using the USB cable (type- A to type-B connectors).
  2. In the Control Panel, open the Device Manager.
  3. Under Ports (COM & LPT), right-click USB Serial Port and select Properties. ToDy ToDu ToIt ToNu

0,

0,

0,

Notes

The COM port number is retained in the Pulser, so if you disconnect the Pulsers and reconnect them, you do not have to assign the COM ports again.

tip To know which COM port is assigned to a Pulser/PulserPlus

device, disconnect the USB cable from the Pulser/Pulser Plus. Then,

re-connect it. The item that appears under Ports (COM & LPT)

indicates the COM port.

tip To change the COM port for a specific Pulser, in the Control

Panel, open the Device Manager. Under Ports (COM & LPT), right-

click the COM port, select Properties, Port Settings, then Advanced.

From the COM Port Number list select the COM port among those

available.

program the prizmatix pulser/pulserplus within ethovision xt

Aim

To program the pulse sequence.

Prerequisites

The Pulser driver is installed. If not, see page 313. The COM port is configured as described on page 287.

important Make sure that Custom Hardware is selected in the

EthoVision XT Device Configuration window, not TTL Tester or others. See page 276.

Procedure 1 - Initialize the COM port

In EthoVision XT, open the experiment and choose Setup > Trial Control

Settings > New. Follow all instructions below. 1. Under Actions choose External command. 2. Next to Select program to run browse to 14 - Optogenetics Experiments C:\Windows\System32\cmd.exe 3. Add the Command line options as follows. /C mode COMn BAUD=57600 PARITY=N DATA=8 STOP=1 DTR=off RTS=off

important In place of "n", enter the number of the COM port for

that Pulser.

note 1 The command /C closes the window after sending the

command line.

note 2 If you have the Pulser and the older Pulser software (version

2.1) the command above would be: /C mode COMn BAUD=57600 PARITY=N DATA=8 STOP=1 DTR=on. 4. Click OK and insert the resulting box after the Start Trial box. 14 - Optogenetics Experiments 5. Under Conditions choose Time. 6. In the Time Condition window, select After a time of 2 secs. 7. Insert the Time Condition box after the Action box. Why this Time condition? A Time condition is placed to allow the instructions in the external command to be processed, before the next external command (that is, the one defining the pulse sequence; see below) is received by the Pulser. Because the two external commands act on the same

program cmd.exe, if this Time condition is absent the second

command may not be executed by the Pulser which is still busy with the first command.

important If you use multiple Pulsers, there may be more time

needed to initialize the ports. If the Pulser does not respond it could be due that the 2 s waiting time is not enough. Set a longer time, like 5 seconds or the like. 14 - Optogenetics Experiments

Procedure 2 - Define the pulse sequence

The aim of this procedure is to have EthoVision XT send the command that specifies the sequence parameters. 1. Under Actions choose External command. 2. Select the Program to run and the Command line options as follows (remember to enter the number of your port instead of [n]): /C echo MTNT,BI,P1D,P1I,P2D,P2I,TNG,GI,OM,NoT,ToDy,ToDu,ToIt, ToNu@ > com[n] (see page 285 for an explanation of the parameters). For example, for a continuous pulse sequence 20 ms on and 20 ms off, and with COM port 3: /C echo M1,0,20,20,20,20,1,0,103,1,0,0,0,0@ > com3

note 1 The Operation mode 103 (for PulserPlus, or 3 for Pulser)

means that the pulse sequence is generated as long as EthoVision XT sends the TTL command to the Pulser. 14 - Optogenetics Experiments

note 2 If you have the Pulser and the older Pulser software (version

2.1) the command above would be: /C echo 1,0,20,20,20,20,1,0,3,1@

com3. 3. Click OK and insert the resulting box after the Time Condition box created in the previous procedure. When this procedure is carried out, the Pulser "knows" what sequence to send out to the LED Controller when it is triggered. The last piece is to program one or more actions in the Trial Control procedure that activate the Pulser at the right time. See the next section.

Procedure 3 - Program activation of the pulser

In general activating the Pulser requires four elements: 1. Trigger condition (wait that the condition is met). 2. Action that triggers the pulser. 3. Stop condition (wait that the condition is met). 4. Action that stops the pulser. In this example, stimulation is set to start one minute after the start of tracking, and last 1 second. For more examples see page 295 and 296. 1. Under Conditions choose Time and set it to 1 minute. 2. Under Actions choose Custom Hardware. Choose the Pulser device.

This device must be defined in experiment settings (page 276) and

arena settings (page 277). Under Action to perform, select Output 1

High. 3. Under Conditions choose Time and set it to 1 second. 14 - Optogenetics Experiments 4. Under Actions choose Custom Hardware. Choose the Pulser device

as in step 2. However, under Action to perform, select Output 1 Low

for deactivating the Pulser. 5. Place the four boxes one after the other.

tip Add a condition after the last box, otherwise tracking stops

immediately after stimulation stops. If you want these actions to be repeated, insert them in a Subrule. In

the settings of this box, under Stop conditions specify Repeat

indefinitely (or as long as required).

Note

Consider the following sequence: /C echo M1,0,500,500,0,0,1,0,103,1,0,0,0,0 This means that the LED is switched on for 0.5 s, then is switched off for the next 0.5 s. If the Time condition between the trigger actions is set to 1 second, at the end of that time the TTL output sent to the Pulser is still high; this triggers another pulse. As a result, the LED switches on two times (On, Off, On, Off), for a total of 2 seconds. 14 - Optogenetics Experiments To have just one sequence, set the Time condition to a time slightly less than one second, for example 0.9. If, on the other hand, you want to have a sequence like in the figure above, we recommend to set 1.1 s.

Procedure 3b - Program activation based on zone visit

In this example stimulation is given every time the subject visits a zone named A. The Trial Control procedure is as follows 1. Trigger condition: Is the subject in zone A? 2. Action that triggers the pulser. 3. Stop condition: Is the subject not in the zone? 4. Action that stops the pulser. The sequence must be placed in a Subrule, and the Subrule reference is

set to Repeat indefinitely, so the Pulser is triggered again at the next

zone visit. See a similar Subrule on page 281; set the Action boxes based on the Pulser, not the LED controller.

For more information

For more information on Subrules, see the EthoVision XT 17 - Trial and Hardware Control - Reference Manual. To open this manual, choose

Apps > Noldus > EthoVision XT 17 Other Documentation. For more

information on the Pulser, see the Prizmatix Pulser/PulserPlus User Manual.

program the prizmatix pulser/pulserplus with the prizmatix software

It is also possible to define a LED activation sequence with the software that comes with the Pulser/PulserPlus. EthoVision triggers the Pulser with a TTL signal, as shown above. The advantage is that the Prizmatix graphical interface makes the definition simple. However, you cannot change the sequence definition during a trial. 14 - Optogenetics Experiments

Advanced applications

differential stimulation depending on zone

Aim

To give a pulse sequence with frequency fA when the subject is in zone A, and a pulse sequence with a frequency fB when the subject is in zone B.

Prerequisites

In the Arena Settings, you have defined two non-adjacent zones, A and B.

Procedure

  1. Create new Trial Control Settings.
  2. In the main Trial Control procedure, right after the Start Trial box, define an External command box to initialize the port for the Pulser. For details, see page 289.
  3. Add a Time condition and set it to 2 seconds. 14 - Optogenetics Experiments
  4. Add one External command, to the program C:\Windows\System32\cmd.exe with the line options:

/C echo S>com[port number]

In this example /C echo S>com3. This instructions cancels the current pulse sequence definition stored in the Pulser in case you have used other definitions in a previous trial. 5. Add one Hardware command, to set the Output 1 to Low. Result: 6. Create two Subrules, one for zone A and the other for zone B. In the

main Trial Control sequence, after the Start track box, insert the two

reference boxes. For both Reference boxes, select Repeat

indefinitely. 14 - Optogenetics Experiments 7. In each Subrule, define the following instructions; see the next picture.

Notes

important Do not use zones that are adjacent; always make some

space between the two.

The 1-second Time condition (boxes b) has been inserted in both

Subrules to ensure that there is enough time between the reset of

the Pulser port at the end of one Subrule (box g) and the new pulse

sequence definition in the other Subrule (box c) when the animal

switches from one zone to the other. 14 - Optogenetics Experiments Box c: See Procedure 2 - Define the pulse sequence on page 292.

Boxes d-e-f: See Procedure 3 - Program activation of the pulser on

page 293.

Box g is an External command to C:\Windows\Systrem32\cmd.exe

with line option \C echo S>com[port number]. See also step 4. This

command stops the pulse sequence definition and makes sure that the Pulser listens to the next definition in case the subject enters the other zone. You need as many Subrules as trigger zones.

note See a remark under To activate the LED when the animal is in a

zone (page 281) for more options about the statistic to be used for

the "In zone" condition. Figure 14.8 a. In zone Condition: Is the animal in the zone A (or B) (Current = true)?. b. Time Condition: Wait 1 second. c. External command: Define the pulse sequence (for details, see page 292). d. Custom hardware Action: Output 1 High. e. In zone Condition: Is the animal NOT in zone (Current=true)? f. Custom hardware Action: Output 1 Low. g. External command: Stop the last sequence definition. These instructions check that the animal is in a particular zone (a). If it is, after one second (b; see below for why this 1-s has been added) the corresponding pulse sequence is defined (c) and the Pulser is triggered (d). When the animal leaves the zone (e), stimulation stops (f) and the sequence definition is canceled (g). - If the animal enters the other zone, the instructions in the other Subrule after (b) will be executed; the corresponding stimulation starts. 14 - Optogenetics Experiments

multiple simultaneous stimulations in one arena

Aim

To generate different pulse sequences and send them simultaneously to different subjects in one arena.

note Using multiple Pulsers is necessary when stimulation in two or

more subjects can occur at the same time.

Basic steps

  1. Follow the instructions on page 313 to install the driver for the Pulser on the EthoVision XT computer.
  2. Follow the instructions on page 287 to configure the driver for a specific Pulser (COM port). When connecting multiple Pulsers to the EthoVision XT computer, the Device Manager shows multiple instances of Prizmatix DVR (COM[n]) or USB Serial Port (COM[n]). Repeat that procedure for each instance. 14 - Optogenetics Experiments
  3. Connect the Trig. In port of each Pulser/PulserPlus devices to a TTL port of the USB-IO box.
  4. In EthoVision XT (Experiment Settings; see page 276), assign a TTL port to Pulser 1, and another TTL port to Pulser 2, etc. tip Rename the Device IDs to something like Pulser 1 and Pulser 2.
  5. In EthoVision XT (Arena Settings), click the Arena-Hardware Mapping button. Add two devices and assign them to the arena.
  6. In EthoVision XT (Trial Control Settings), for each pulser, initialize the COM port and define the pulse sequence. Follow the instructions from page 289 and repeat that procedure for each Pulser.

Details

For each Pulser, define three external command Action boxes, and

place them in a linear sequence before the Start track box: one for

initializing the port (Procedure 1 - Initialize the COM port, page 289), one

for stopping previous definitions (for example from a previous trial; see

page page 297), and one for defining the pulse sequence (Procedure 2 -

Define the pulse sequence, page 292). In this example, Pulser 1 is set to a pulse sequence of 20 ms on and 20 ms off (25 Hz stimulation; boxes A for initialization and C for pulse definition; see the following picture); Pulser 2 is set to a pulse sequence of 10 ms on and 10 ms off (50 Hz stimulation; boxes D,E). First, for Pulser 1 (com 3): Then for Pulser 2 (com 5): Note that actions are separated by Time conditions (1-2 s). For the reason why that is done, see page 291. Complete your Trial Control procedure (to the right of the Start track box). In this example, the Subrule for triggering the Pulser for 1 second stimulation, and with an interval of 5 seconds, looks like this: 14 - Optogenetics Experiments

Notes

Different protocols must be defined with different Subrules. For

example, create a Subrule 1 for controlling Pulser 1, and Subrule 2

for controlling Pulser 2.

tip When using multiple Pulsers, it is handy to use batch files. For

example, the instructions for stopping sequence definitions for com3 and com5 would look like: echo S>com3 echo S>com5

Enter these instructions in a text file, and rename it with extension

.cmd. Then instead of the single instructions, create an External

command to this cmd file.

important Test the system thoroughly before the real

experiments. When using multiple Pulsers, there may be more time needed to initialize the ports. If the Pulser does not respond it could be due that the 2 s waiting time is not enough. Set a longer time, like 5 seconds or the like. 14 - Optogenetics Experiments

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 a 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"). The two batch files are activated one after the other, with a time interval in between. A third batch file ("Stop sequences") stops the definition of sequences previously used, and is handy when you use different sequences in the same trial or between subsequent trials. 14 - Optogenetics Experiments

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"

  1. 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
  2. Save the file, and give it the extension .cmd.

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. Also, make sure to enter the correct COM port number of your Pulsers (see page 288).

To create the batch file "Define sequences"

  1. 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 14 - Optogenetics Experiments 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@ >com6 The example above would produce a sequence of 500 ms pulses (frequency 1 Hz). Replace the "500" with the pulse durations and intervals you require.
  2. Save the file, and give it the extension .cmd.

To create the batch file "Stop sequences"

  1. Open the Windows Notepad and enter the following: echo S>com3 echo S>com4 echo S>com6 echo S>com7 Replace the port number with those assigned to your Pulsers.
  2. Save the file, and give it the extension .cmd.

Basic steps

  1. Follow the steps 1 to 4 on page 300. tip Rename the Device IDs to for example Pulser 1 and Pulser 2.
  2. important In EthoVision XT (Arena Settings), make sure that the name of the arenas is Arena 1, Arena 2, etc.
  3. 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 is selected in the

remaining cells under Arena 1, Arena 2, etc. 14 - Optogenetics Experiments 4. In the Trial Control Settings, define the following boxes, and insert

them between the Start trial and the Start track box (see the

following picture). An External command for the first batch file, "Initialize.cmd". Enter

"[space]%an%[space]" in the command line options. important

Enter a space between the quotes and %. A time condition, set to two seconds. An External command for the first 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 "[space]%an%[space]" in the command line options. important Enter the space between the quotes and %. 5. 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 Subrule 2 for

controlling Pulser 2. 14 - Optogenetics Experiments

Data Analysis

simple data selection

Choose Analysis > Data Profile > New.

To select the track segments when the LED was activated

  1. Under Nesting choose Hardware state.
  2. From the Device type list, choose Custom Hardware.
  3. Choose the Device, the Signal (Is output 1 High), Value (true).
  4. Click OK and insert the Nest box in the Data profile sequence.
  5. Choose Analysis > Analysis Profile > New and define the variables you want to calculate for when the animal was stimulated (for example, the distance moved). 14 - Optogenetics Experiments

To select the track segments when the LED was not activated

  1. Under Nesting choose Hardware state.
  2. From the Device type list, choose Custom Hardware.
  3. Choose the Device, the Signal (Is output 1 High), Value (false).
  4. Click OK and insert the Nest box in the Data profile sequence.
  5. Choose Analysis > Analysis Profile > New and define the variables you want to calculate for when the animal was not stimulated.

advanced data selection

To compare two sets of track segments (LED activated vs LED not

activated)

Create the two Nest boxes as described above. Place each box in a

separate branch ending with a Result box. To create another Result

box, under Common Elements choose Result. Note that if you use the Pulser to generate high frequency optical pulses, the individual pulses are not "seen" by EthoVision XT. Because EthoVision XT controls the Pulser via the single TTL start/stop commands ("Output 1 High/Low"), it only "sees" the time that the 14 - Optogenetics Experiments command was sent out (Output 1 High/Low). Therefore, the pulse sequence is seen as a one time segment. For more information on data selection, see the EthoVision XT Help.

To select the track segments when a particular frequency was

generated (setup with pulser)

Prerequisite: your Trial Control procedure includes control of frequency of stimulation, like that described on page 296. Here, two Subrules were defined, one for zone A (stimulation at 25 Hz) and one for zone B (stimulation at 50 Hz). Within a Subrule, Hardware actions "Activate Pulser" and "Deactivate Pulser" can be used to mark the time that a particular frequency was used. 1. In the Data Profile, under Nesting choose Trial Control State. 2. Choose the name of the actions that refer to a particular frequency.

From Element Action: [action that triggers the Pulser]

To Element Action: [action that stops the trigger]

From the Event lists, select becomes active for both elements. 3. Click OK and insert the Nest box in the Data profile sequence. 4. Choose Analysis > Analysis Profile > New and define the variables you want to calculate. 14 - Optogenetics Experiments

calculating statistics

Once you have selected the track segments you are interested in, choose the variables you want to calculate. Choose Analysis > Analysis Profile > New. To calculate the number of times that the optical stimulation was activated, in the Analysis profile choose Hardware command. Choose the following: - Device type = Custom Hardware. - Device = the LED controller (or Pulser). - Command = Output 1 High. - Under Trial Statistics choose Frequency. To calculate the total time that stimulation was activated, in the

Analysis profile choose Hardware state. Choose the following:

  • Device type = Custom Hardware.
  • Device = the LED controller (or Pulser).
  • Signal = Is Output 1 High.
  • Value = true.
  • Under Trial Statistics choose Cumulative Duration.

To calculate the statistics, choose Analysis > Results > Statistics and

Charts.

integrated visualization

Choose Analysis > Results > Integrated Visualization. The following picture shows the integrated visualization for a few dependent variables defined in the Analysis profile. The Trial Control protocol is the same as that explained from page 296: a stimulation of 25 Hz is given when the animal is in zone A; a stimulation of 50 Hz is given when the animal is in zone B.

In zone. Shows when the animal was in zones A and B. To show this

variable, you must define it in the Analysis profile (choose In zone

under Location). 14 - Optogenetics Experiments

Hardware command. Marks the time when the Output 1 High was

sent out from EthoVision XT. This happened 1 s after the animal was detected in a zone (see page 299).

Hardware state. Marks the time interval when Output 1 stayed

High.

Trial Control state - Pulser 25 / Trial Control state - Pulser 50. Marks

the time that the Hardware command within one of the Subrules was High. That command triggered the pulser for a specific

simulation (25 or 50 Hz). This way instances of Hardware state can

be split according to the frequency of the stimulation. 14 - Optogenetics Experiments

Installing the Prizmatix Pulser

Follow this section if the Prizmatix Pulser/PulserPlus is not properly installed on the EthoVision XT computer.

software installation

Insert the Prizmatix Pulser software CD in the EthoVision XT computer's CD/DVD ROM drive, or download the most recent version

from www.prizmatix.com/software.htm under Pulser/PulserPlus

Software.

Double-click setup.exe. Follow the instructions on the screen and at

the end of installation restart the computer. Follow the instructions below to update the driver.

note The installation procedure differs depending on whether you

have the Pulser or PulserPlus. For more information, see the Prizmatix Pulser/PulserPlus User Manual.

driver update

Do this for each Pulser you use, when they are not recognized. 1. Connect the Pulser to the computer with the supplied USB cable. 2. In the Control Panel, open the Device Manager. 3. Under Other Devices, right-click Unknown device and select Update driver. 4. Choose Browse my computer for driver software. 5. Click Browse and select the following folder C:\Program Files (x86)\Prizmatix Pulser [version number]\Drivers Then click Next. 14 - Optogenetics Experiments

note This location may differ on your PC if you downloaded the

drivers and saved them on another location. 6. In the Windows Security dialog click Install. 7. At the end of the update process click Close. 8. In the Device Manager, under Ports, you should see Prizmatix DRV. To configure the Pulser driver for EthoVision XT, see page 289. 14 - Optogenetics Experiments


Source: EthoVision XT 17.5 Application Manual, Optogenetics Experiments

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.