ANY-maze Help > The ANY-maze reference > The I/O page > An introduction to I/O in ANY-maze

An introduction to I/O in ANY-maze

Introduction

ANY-maze is primarily a video tracking system, but there are clearly benefits to incorporating other inputs with the tracking data. For example, a set of photobeams positioned part way up the sides of an open-field could be used to automatically count rearing. And better still, as the tracking tells ANY-maze where the animal is, the results can tell you not just how often the animal reared, but where it reared - in the centre, near the walls, etc.

Giving ANY-maze the ability to output signals can also be very useful. For example, an output might control a shocker, giving ANY-maze the ability to switch it on and off depending on conditions in the experiment - perhaps if the animal enters a certain zone, a shock should be administered.

The point is, that by using the input and output (I/O) facilities of ANY-maze, you can get new information about how animals are behaving, and you can create experimental designs that would otherwise have been difficult, or impossible to achieve.

Getting connected

Let's imagine you have a lever in a cage - the animal can press the lever and this will cause a switch to close... but how do you connect this equipment to your computer? The answer is that you will need some type of I/O device that will act as an interface between your computer and the switch - see figure 1.

  

  

Figure 1. The I/O device acts as an interface between the switch and your computer.

ANY-maze supports a range of such I/O devices, some of which have been designed specifically for use with the system.

So you need an I/O device to connect anything to your computer - but how does it actually connect to the switch, shocker, photobeam or whatever? The answer, as you might expect, is 'it depends', but in many cases it's very simple, for example you can connect a simple push button switch to two of the pins on one of the I/O ports of an ANY-maze Digital interface and ANY-maze will be able to tell when the switch is pressed and when it's released. There's an entire section in this help dedicated to this subject of making I/O connections.

Configuring I/O devices and testing things out

Okay, let's assume you've now connected the switch in figure 1 to your computer via some kind of I/O device. The first thing you'll probably want to know is, does it work?

To find out you can use the I/O page. Here you can select the I/O device (and port) you connected the switch to, and see the state of the inputs - see figure 2.

  

  

Figure 2. The I/O page showing the state of the Input switches on an ANY-maze Digital interface - the 'Input switch on port 1' is active.

When you press the lever down you should find that the relevant input is shown active. So you try it and find that it works "backwards" - when the lever is not pressed the switch shows as active and when it is pressed it shows as inactive, what's happening? Well, you've encountered one of the vagaries of I/O interfacing - specifically, what counts as 'active'.

In fact this is easy to resolve using a second function of the I/O page, which is to configure your I/O devices. In this particular case you will need to alter the state that the device considers to be active so that it agrees with you - i.e. when the lever is pressed the switch is active and not vice versa.

Using I/O devices in an experiment

Finally your lever is working, when it's pressed it's 'active' and ANY-maze can detect this. At this point you'll want to actually include the lever in your protocol so that ANY-maze will score the lever presses during a test and report them in your results.

In this particular case, you would do this by adding an On/off input element to your protocol. I don't intend to go into all the details about this here, as full details can be found in the An introduction to on/off inputs topic.

But what about outputs, let's say we wanted to dispense a pellet each time the animal pressed the lever, how would that be done? In this case we would obviously need to connect the pellet dispenser via an I/O device to the computer and configure and test it using the I/O page. Then, to include the pellet dispenser in an experiment, we would need to add an On/off output into the protocol and finally add a Procedure to actually react to level press by switching the pellet dispenser on.

The different types of I/O supported by ANY-maze

As well as On/off inputs and Output switches, ANY-maze supports several other types of I/O; you'll find information about them all in these topics:

 An introduction to on/off inputs 
 An introduction to rotary encoders 
 An introduction to signals 
 An introduction to sensors 
 An introduction to movement detectors 
 An introduction to on/off outputs 
 An introduction to speakers 
 An introduction to shockers 
 An introduction to pellet dispensers 
 An introduction to laser controllers 
 An introduction to syringe pumps 
 An introduction to analogue outputs 
 An introduction to temperature controllers 
 An introduction to light controllers 
 An introduction to selectors  

Wrapping things up

In summary, ANY-maze's I/O facilities allow you to connect other equipment to your computer and score and/or control it from within the program. An I/O device is required to make the physical connection and the I/O page can be used to configure and test things. To actually use the equipment in an experiment, you need to add elements to the protocol, such as On/off inputs, Output switches and Procedures.

See also:

 Making I/O connections 
 Working with the I/O page 
 I/O devices supported by ANY-maze 
 An introduction to procedures 

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0896