ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Testing > Procedures > An introduction to procedures

An introduction to procedures

Introduction

Procedures essentially consist of a list of 'statements' that are run in sequence during a test. They can be used to wait for specific events to occur, to perform actions, or to execute complex logical operations to aid in the running of a test.

Procedures can be simple – for example, just executing a single action in response to an event occurring - or can be designed with complex logic that can respond to animal movement, I/O states, time, or any combination of these.

For example, a procedure in a water-maze could simply wait for the animal to enter the platform zone, then end the test. Or in a radial arm maze, a procedure could be used to open a series of doors based on the last zone entered in the animal's previous trial, and to respond to the animal's subsequent movement by stimulating other I/O outputs.

Some basic concepts

Here are a few general concepts that you need to know before creating procedures in ANY-maze:

 Any number of different procedures can run during a single test. 
 A procedure consists of a number of 'statements' that are run successively.  
 A procedure will run through its statements from start to finish (this may involve the procedure looping back to repeat a series of statements). Once the last statement has been executed, the procedure will stop running (the test itself will continue).  
 If the procedure encounters a statement that causes it to wait (for example, waiting for a specific event to occur such as the animal entering a zone), the running of that procedure will pause until that condition is met. Once the condition is met, the procedure will continue executing.  
 Procedures are set up using a graphical editor, which involves dragging statements and their parameters from a list of available items into the procedure. 
 Procedures are split into two sections – 'before the test starts' and 'after the test starts'. Statements in the first section will run as soon as the test is ready, and then the procedure will wait for the test to start. Once the test starts (either because you have clicked the Start button, or the test is set to start automatically and ANY-maze has detected the animal in the apparatus) then the statements in the second section will run.  

A simple example

The following procedure will wait for the animal to become immobile for 5s, and will administer a shock. This process will be repeated throughout the test.

  

  

Figure 1. An example of a procedure that uses a number of statements to control a shocker, based on the movement of the animal.

See also:

 Setting up a procedure 
 Editing a procedure 
 Deleting a procedure 
 Writing a procedure using the procedure editor 
 Hints and tips for writing procedures 
 Re-using parts of procedures 
 Running procedures 
 Debugging procedures 
 Procedure measures 
 The changeover from Events and Actions to Procedures 

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0452