|
ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Inputs and outputs > On/off outputs > Setting up an on/off output > Setting on/off output activation options Setting on/off output activation options
In briefYou can use the option on the on/off output's settings page to specify when the output should be activated. As well as these options, you can also control the output using a procedure, something which is described in more detail below. Specifying when the on/off output should be activatedClearly, if you've included an on/off output in your protocol it's because you want to turn something on and/or off during the tests - but when should this thing turn on? In some cases, the answer may simply be 'when the test starts'; but in other cases you may want to do more sophisticated things, perhaps turning it on and off as the animal moves into different zones. Activating the output at the start of the testFor the simple case of activating the output at the start of the test, you can use the option here (in the protocol's on/off output settings). This doesn't mean you can't also use a procedure (perhaps to switch it off again); it just means that when the test starts, the output will be activated. Activating the output based on more complex rulesIn this case, you should use a procedure to activate (and/or deactivate) the output. Full details are beyond the scope of this help topic, as it rather depends on what you want to do, but as an example, the procedure in figure 1 will wait until the animal enters the 'Target zone' and will then activate the 'Stimulus' on/off output. More details can be found in the Introduction to procedures.
Figure 1. This simple procedure will activate the 'Stimulus' on/off output when the animal enters the 'Target' zone.
Activating the output BEFORE the test starts (legacy option)In versions of ANY-maze prior to 5.20, there was an option to activate an on/off output before the test began (i.e. when the test was 'Ready'). If you used this option, and you open your experiment or protocol in version 5.20 (or later), then you will find that the option is still displayed and it will still work in the same way as it did previously. However, if you turn the option off, then it will disappear from the settings and you won't be able to turn it back on again. In version 5.20 (and later), if you want to activate a switch before the test starts then the best method is to create a procedure to do this; as can be seen in figure 2, this is very simple.
Figure 2. This one-statement procedure will activate the 'Stimulus' on/off output before the test starts (because statements in the orange-shaded area are performed as soon as the test is ready)
The key point here is that statements in the orange-shaded area at the top of the procedure editor are performed as soon as the test is ready. So, if you add an Action statement (to activate an on/off output) to this area, then the output will be activated before the test begins. Preventing the output being reset at the end of the testWhen a test ends, ANY-maze will turn the output off and reset it to the values entered on the on/off output's settings page. However, there are circumstances when you might not want this to occur, for example:
The option Don't reset the output at the end of the test would appear to be the solution to these requirements, but in fact in most case it will only actually be suitable for situation #1. For #2 and #3 selecting it probably won't have quite the effect you'd expect:
The best way to ensure that an on/off output's state is retained from one trial to the next (even if you close the experiment, exit ANY-maze and turn off your computer between tests) is to use a procedure; this is described in detail here. See also:
© Copyright 2003-2026 Stoelting Co. All rights reserved ANY-maze help topic T0193 |