ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Testing > Procedures > Elements of a procedure > Actions available to procedures

Actions available to procedures

Introduction

There are a great many actions available in the ANY-maze procedure system, and the best way to see what is available is to expand all the action groups in the Actions tab of the procedure editor.

Hovering over the relevant action will show a tool tip giving you more information on that action.

Contents

Actions are grouped into the following categories. Click the links to see a description of the actions in each category.

 Test control 
 Zones 
 Output switches 
 Speakers 
 Shockers 
 Pellet dispensers 
 Laser controllers 
 Syringe pumps 
 Analogue outputs 
 Temperature controllers 
 Light controllers 
 Selectors 
 Video recorder control 
 Messages & Text 
 Analysis 
 Plug-ins 
 Run a sub-procedure 
 Run a program  

Test control

This group contains actions that affect the running of a test.

End the testThis will simply end the test, using the procedure's name as the test end reason.
 The test end reason can be used as an independent variable in the analysis of results.  
  
End the test (specifying reason)This will simply end the test, allowing you to specify the reason (if it is different to the name of the procedure).
 The test end reason can be used as an independent variable in the analysis of results.  
  
End the test, but allow continuationThis will end the test, using the name of the procedure as the test end reason, but allows the test to continue if the user restarts it using the Start test button.
 The test end reason can be used as an independent variable in the analysis of results.  
  
End the test (specifying reason), but allow continuationThis will end the test, allowing you to specify the reason (if it is different to the name of the procedure), and will allow the test to continue if the user restarts it using the Start test button.
 The test end reason can be used as an independent variable in the analysis of results.  
  
Pause the testThis will pause the test. Note that no events will be detected by the procedure until the test is resumed!
 There is no way to re-start a paused test from within a procedure - this must be done manually. This is because once paused, a procedure never gets any events - so you can't use a test event to trigger the un-pausing of a test! However, it is sometimes useful to pause the test using a procedure - for example, if the animal falls off an open arm of a Plusmaze, you could use a procedure to notify you via SMS message and then pause the test - then once you've put the animal back in the maze, you would re-start the test manually.  
  
Prevent test startPrevents the test from starting. The procedure can use this action to prevent the user from starting the test, if some condition has not been met. For example, a procedure could be used to monitor the temperature of the water in a water-maze, and prevent the test from being started until the temperature is between a range of 20 - 24°C. The parameter to this action is a piece of text that will be displayed above the apparatus image on the Tests page, and should explain to the experimenter why the test cannot be started. This text must be specified. For more details, see Preventing a test from starting until an I/O device is ready.

This action can only be used before a test starts, i.e. it is only valid to drag it into the shaded area at the top of the procedure editor.

  
Allow test startAllows the test to start again, after starting has been prevented by the Prevent test start action. For more details, see Preventing a test from starting until an I/O device is ready.

This action can only be used before a test starts, i.e. it is only valid to drag it into the shaded area at the top of the procedure editor.

  
Schedule another test for this animalSchedules another test for this animal, at the end of the test schedule. This can be useful if your test schedule is determined by what actually happens in the test.

Note that this action is only available if the protocol is set to Manually schedule tests, and will only work if there are further trials available to this animal (determined by the maximum number of trials specified for the current stage).

  
Set timer resolutionThis will set the resolution of the internal timer for the procedure to a value between 1ms and 60s. This affects the frequency at which ANY-maze will attempt to process the events that happen during a test (animal movement, I/O inputs, etc.).

The default timer resolution is 50ms, but it may be that the procedure requires a finer resolution (for example, if you're toggling an output switch on and off for a duration less than 50ms). Setting this timer resolution to a lower value means that the procedure will be checking for new events much more often, thus making the computer work harder and giving less time for it to process other things (for example, analysing video frames).

The new timer value will only apply to the current procedure, and won't affect any other procedures.

 Since it has the potential to slow down tracking, we advise that you don't change this resolution unless you've been asked to by ANY-maze Support.

Note that there are some subtleties with ending the test, if you want a procedure to respond to the Test ends event. For more details, see Procedures and the end of a test.

Zones

The following actions are available for zones:

Set zone labelSets a piece of text on the screen over this zone. If the zone consists of more than one non-contiguous area, the label will appear over the largest of these areas.

This text can be displayed using some basic formatting which is described under Formatting of text in procedures.

  
Remove zone labelRemoves the label previously set using the 'Set zone label' action.
  
Set location of movable zoneSets the position of the zone. This action can only be used before the test starts, i.e. it is only valid to drag it into the shaded area at the top of the procedure editor, and not into the white area at the bottom. Using this action after the test starts will result in an error.

If this action changes the position of a movable zone, then all procedures will be restarted to ensure that the new zone position is taken into account.

 This action is only listed if the zone has been set up as a movable zone, and the zone can have its position set by a procedure.  

Video recorder control

These actions control the recording of the test to an ANY-maze video (.szv) file. For full details of what is recorded and where these video files will be stored, see What to record while testing.

The available actions are:

Start the video recorderStarts recording to the video file.
  
Stop the video recorderStops recording to the video file and closes the file.
  
Pause the video recorderPauses recording.
  
Unpause the video recorderUn-pauses a previously-paused recording.
  
Label the video with textInserts a 'label' in the video. This is just a marker which you can use when replaying the video to get to a specific point. On ANY-maze's Video page, for example, when the video is opened, clicking the Jump to label button will show a list of all the markers that have been added to the video.

Labelling the video with a specific marker can be useful in a presentation - if you label certain key points in the experiment, you can then quickly and easily jump to that point in the video using these labels.

 This action has no effect after a test has finished (i.e. after a procedure has waited for a Test ends event), because the ending of the test will already have stopped the video recorder.  

Messages & Text

The actions in this group are all to do with displaying text, sending messages, or noting debugging information to aid in fixing problems in a procedure.

Display a pop-up message windowThis will show a pop-up message on the computer screen.

Messages are limited to 256 characters.

  
Send an SMS messageThis will send an SMS (text) message to a given cell phone number.  The cell phone number should include the international dialling code and excluding any leading zeros. For example, if you are in the UK (international code 44) and your number is 0777-1234-567, then you would enter 447771234567.

In order to send SMS messages, your computer must be connected to the internet.

Messages are limited to 256 characters.

  
Send an e-mailThis will send a short e-mail message to a specific e-mail address.

Messages are limited to 256 characters.

  
Output text on displayThis will show the text on the apparatus display as the test is running. The text will continue to be displayed until either it is changed again by this action, or removed using the Remove text from display or Clear all procedure text from display action. The text displayed in this way will also be included in any video of the test that you are recording to a standard format (i.e. as a movie for a presentation).

This text can be displayed using some basic formatting which is described under Formatting of text in procedures.

  
Remove text from displayThis will remove any text previously added to the display using the Output text on display action (for this procedure only).
  
Clear all procedure text from displayThis will clear any text previously added to the display for all procedures, i.e. it will clear text from any procedure which has used the Output text on display action.
  
Write text to Session logThis will show a line of text on the test window's Session log for this test.

For full details of the use of the session log to help you with your procedures, see the Debugging procedures topic.

  
Generate an errorThis will generate an error with specific user-defined text, which will appear on the Errors & Warnings panel and will be noted in the test's results, so they will appear on reports for that test such as the Test details report.
  
Generate a warningThis will generate a warning with specific user-defined text, which will appear on the Errors & Warnings panel and will be noted in the test's results, so they will appear on reports for that test such as the Test details report.

Analysis

These actions allow your procedures to link up to the ANY-maze analysis system.

Set a time markerThis notes a specific marker point in the results of the test.

As a test is performed, ANY-maze tracks the animal and also monitors the I/O ports set up in the protocol. Whenever anything changes (for example the animal's position, or the state of an I/O port), then this is stored in the test's results. Internally to ANY-maze, a 'test event' will be generated. These 'test events' are loosely (but not exactly) what you'll see on the Test data report.

Setting a time marker allows the procedure to insert its own specific labelled marker at any point in this stream of test results, and this marker can then be used in one of the following ways:

 As a reference point for a time period - see Analysis across time.
 As a point for measurement of the baseline for a signal input - see Setting up a signal's baseline.

For full details, see the Time markers topic.

 This action has no effect after a test has finished (i.e. after a procedure has waited for a Test ends event), because the test has ended and no further information can be added to the test's results.  
  
Set variable as a test resultThis action is used in conjunction with a Result variable, to set a value which can be used in analysis.

To set a variable as a test result, you must specify in the variable's settings window that it is to be used as a result variable, and that its value will be noted 'only when explicitly set'. Once you've done this, the value will be noted by the procedure whenever this action is used, and this will allow a number of procedure measures to be calculated by ANY-maze results analysis (e.g. minimum value, maximum value, sum of values or count of the number of times it was set).

 This action has no effect after a test has finished (i.e. after a procedure has waited for a Test ends event), because the test has ended and no further information can be added to the test's results.  

Plug-ins

This group contains a single action to trigger an Action plug-in.

Trigger Action plug-inThis action is used to trigger an Action plug-in. An ANY-maze plug-in is a third-party piece of code that can be written to perform any task that you like - for example, to log some information, or to trigger some external hardware that can't be controlled using the I/O devices available to ANY-maze.
 This action has no effect after a test has finished (i.e. after a procedure has waited for a Test ends event). If you need a plug-in to respond to the end of a test, then you can use the AME_TESTEND message, which ANY-maze will send to the plug-in when the test finishes.  

Run program

This group contains a single action to allow an external program to be run.

Run a programThis action is used to run a separate Microsoft Windows executable or batch file.

When you drag this action into a procedure, the Run program window will open, allowing you to define the command-line for the program.

You might use an external program, for example, to run a program that can control some external I/O that is not directly controllable from ANY-maze.

For more details, see The 'Run a Program' action.

Run sub-procedure

This group contains a single action to allow this procedure to run another procedure (called a 'sub-procedure').

Run sub-procedureThis action is used to run a different procedure.

To run another procedure in this way, you must use the Procedure's Settings page to specify that this procedure is a sub-procedure.

See also:

 The Action statement 

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0489