ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Inputs and outputs > Sensors > Setting up a sensor > Specifying when to read a sensor

Specifying when to read a sensor

In brief

Use the options on the sensor's settings page to choose when a sensor should be read: at the start of a test, continuously throughout the test, and/or once at the end of the test.

These options, together with those described in the Specifying the sensor value recorded in results topic, influence the measures that will be reported for the sensor.

Details

Sensors can be read at the start of the test, continuously throughout the test and/or at the end of the test.

Reading the sensor's value at the start of tests

There are three options for reading a sensor at the start of a test

 Read before the test starts, when the sensor's key is pressed 
 Read before the animal is placed in the apparatus 
 Read at the start of the test  

The first option is only available if ALL the sensor's ports you have selected include a sensor key. Selecting this option will cause ANY-maze to show a status of 'Waiting for pre-test reading' before every test. When the sensor key is pressed the status will change to 'Ready'. The sensor's reading will be included in the test results as if it was read at the very start of the test (i.e. at test time 0).

The second option is only available if you are tracking the animals, and the sensor can be read automatically (i.e. you don't have to press a key on the sensor to read it). In this case ANY-maze will automatically read the sensor continuously before the test begins and will record the last reading before the animal was placed in the apparatus. It will appear in the test's result as if it was read at the very start of the test (i.e. at test time 0).

The third option is only available if the sensor can be read automatically (i.e. you don't have to press a key on the sensor to read it). It will read the sensor once at the very start of the test. Note that if you choose to read the sensor continuously during the test (see next section) then this option will be disabled because the sensor value at the start of the test will necessarily be recorded (as all data provided by the sensor during the test will be recorded).

Selecting any of the above options will cause ANY-maze to report the sensor's initial value in the test's results.

Reading a sensor continuously during the test

This option is only available if the sensor can be read automatically (i.e. you don't have to press a key on the sensor to read it).

Selecting it will cause the sensor's value to be recorded in the test's results each time it's reported by the sensor hardware. This frequency varies depending on the sensors being used, but is typically somewhere between 0.2Hz and 10Hz.

ANY-maze will include various measures for the sensor such as its average, maximum and minimum values.

Reading a sensor at the end of a test when the sensor's key is pressed

This option is only available if ALL the sensor's ports you have selected include a sensor key.

In some circumstances you may want to read a sensor after a test has ended. For example, if you use a weight sensor to determine how much food the animal consumes during a test, then you will probably find that while the animal is eating, the sensor's value doesn't change. This is because the animal will be causing the weight to fluctuate, but as soon as the animal stops eating the weight will stabilize and the sensor will report the new value. But what happens if the animal is eating at the very end of a test? In this case, the test will end before the sensor sends a final 'stable' reading. To address this, you could specify that the sensor should be read at the end of the test when its key is pressed. So, at the end of the test, you would remove the animal from the apparatus and then press the sensor's key; as the animal would no longer be eating, the sensor would have a stable value, and this would be the value recorded.

See also:

 Specifying the sensor value recorded in results 
 Sensor measures 
 Configuring AMi sensors 

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0174