|
ANY-maze Help > I/O devices supported by ANY-maze > The ANY-maze Operant interfaces > A tutorial on the ANY-maze Operant interface > Operant interface tutorial : Setting up your protocol Operant interface tutorial : Setting up your protocol
IntroductionBefore creating an Operant protocol, you need to make sure that you have successfully connected the ANY-maze Operant interface to your computer. The steps required to do this can be found under Setting up the ANY-maze Operant interface for the first time. This section provides an overview of the steps required to create a protocol and set up the parts of it that you'll need to work with an ANY-maze Operant interface - if you need a fuller description, you can find this under Creating an Operant protocol. Creating an Operant protocolOnce you have your ANY-maze Operant interface connected, follow these steps to create a new protocol to use it:
To do this, navigate to the File page and select New empty experiment, then select 'New empty experiment' from the right-hand side of the page.
This protocol mode acts as a short-cut to building a protocol for the ANY-maze Operant interface. Adding and configuring your ANY-maze Operant interfaceNow that we've selected the correct protocol mode, we can add the ANY-maze Operant interface into the protocol, and configure it the way that we want it. To do this, follow these steps:
Firstly, we'll set up a lever by clicking the Add button.
That's the first component set up; follow the same sequence of steps to add the following components to your interface:
You'll obviously need to select a different Output port for each component.
Figure 1. The Configure Operant interfaces window, showing the four components that have been added.
More details on adding one or more operant cages to your protocol can be found here. For a full description of adding components to your ANY-maze Operant interface, see Configuring the ports of an ANY-maze Operant interface The Operant interface inputs and outputsBecause ANY-maze already knows you are setting up a protocol for an Operant interface (since that's the mode we put it into), then it will automatically have added various I/O elements to the protocol when we added the Operant cage. These elements are:
Figure 2. The protocol showing the I/O ports that have been added for each of the components you set up on your ANY-maze Operant interfaces.
You'll notice that there is a
Figure 3. The default settings for the shocker element
There are plenty of other parts to the protocol, but for the purposes of this tutorial we'll only worry about a few of them in the sections below. Setting up stages and specifying the test durationAnother element of the protocol that is automatically included in am Operant protocol is a Stage. This is because ANY-maze requires that all protocols always include at least one stage, and the Operant protocol is no exception. A stage is simply a test (or a group of tests) that you perform on your animals. In many cases, an experiment will simply have one stage consisting of one test (for each animal), and that's the default setting for an Operant protocol. Of course, you can change this if you wish. For example, you might have two stages in your experiment; in the first stage you test the animals without any treatment, while in the second stage you treat them and then test them again. In this case, you would simply need to add a second stage to the protocol. To see the stage, select Stages > First stage in the protocol list; the Settings pane will then show the stage's settings.
Figure 4. The default settings for the first stage in an Operant protocol.
Full details about stages can be found here, but suffice to say that it is in the stage's settings that you specify the duration of your tests. As can be seen in figure 4, ANY-maze does not include a default duration, so you will need to set this value before you can actually perform any tests - For now, we'll just enter a test length of 1 minute. You can do this by typing '1 min' or '60s' into the Test duration field.
Setting up fields to record additional information about your animals or tests
If you wish, you can set up 'fields' in your protocol to record additional information about your animals or tests. For example, you may be keen to differentiate between how male and female animals respond, in which case you will presumably want to record their Sex somewhere. Of course, you could just note this on a piece of paper, but instead you could set up a 'Sex' field and record the data within ANY-maze. Not only would this mean that all the data relating to the experiment would all be in one place, but you could also then use ANY-maze's analysis features to analyse the animals' sex - perhaps to check that there is no significant difference between male and female animals. You can create any number of fields, and they can be used as either independent or dependent variables in analysis. Full details about fields and how to set them up can be found here. Specifying if/how you will assign animals to treatment groupsANY-maze generally expects your animals to be divided into different groups (they're called Treatment groups, since this is the most likely way that they will be grouped). You'll need to tell ANY-maze how to assign the animals between groups, so select the Treatment groups item in the protocol list now. (You'll notice that it has a More details can be found under Treatment groups, but for now, let's just select Randomly assign the animals amongst the groups.
Figure 5. The protocol's Treatment groups page.
Setting up proceduresWhen we run a test in our experiment, we have two things that need to happen:
To implement this kind of functionality, ANY-maze uses procedures. A procedure is a simple 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. We'll write two different procedures, to perform each of these tasks. We'll outline the steps you need to take to create these procedures here, but if you want more information about procedures (including a couple of tutorials) you can refer to An introduction to procedures. Procedure 1: Activating the house lightThe first procedure we'll write will simply wait for a random time between 10 and 15 seconds, then activate the house light for 5 seconds at a time. Create the procedure by clicking the We'll come to the procedure editor in a moment, but first of all let's enter the name of the procedure - call it something like 'Activate light'. The name isn't particularly important in this case, but it can be important for some experiments - for example, if you were to set up a procedure that could end the test, then the 'Reason for test end' measure for the test would be the name of the procedure. For now, we can ignore the rest of the procedure's settings, except just to make sure that the first Stage is selected in the box titled Select the stages in which this procedure should be processed. Now we're ready to actually create the procedure. This process is fairly simple - you basically drag-and-drop the procedure's statements from the tabbed section to the left of the procedure editor, into the representation of the procedure itself which is on the right. Before we do this, we need to make sure that all the statements are available to us - if you've never used the procedure editor before, it will be in 'Simple' view, which only shows a subset of the functionality available. We need to change to 'Full' view - which you can do using the
To actually start 'writing' the procedure, click the mouse on the Repeat ... while element under the Statements tab, and while holding the mouse down, drag it to the right hand side of the procedure editor (over the text which says 'Statements dropped in this area will start to run when the test starts'). Let go of the mouse and the statement will get 'dropped' into the procedure. The procedure editor should now look like this:
Figure 6. The procedure, after dragging in the first statement.
Click on the drop-arrow next to the word 'Repeat' and select 'Forever' from the menu that appears (this just means that the statement will repeat as long as the test is running). Next, we need to insert the set of statements that we want repeated. In this case we want to wait for a random time to elapse, so select the Events tab and drag the Time elapsed event from the 'Timers' section into the procedure, in the space inside the Repeat statement (see figure 7).
Figure 7. The procedure, after dragging the 'Time elapsed' event. ANY-maze has automatically inserted this event inside a 'Wait until' statement.
The Time elapsed event has a 'parameter' which is the amount of time that we want the procedure to wait for. This can be any numerical value, and ANY-maze will treat this value as being the number of seconds to wait. Currently, this isn't specified - it's denoted as '...'. We want to wait for a random time, so select the Statements tab again, click on 'Maths functions & operators' to expand it, and then drag the Random (... to ...) element over the top of this '...' parameter (you should find that as you drag over the parameter, the border of the parameter changes to green - indicating that this is a valid place to drop whatever you're dragging). Drop it here, and you'll see that this Random... element has its own parameters, indicating the range of random numbers that will be generated. Type in 10 over the '...' of the first parameter, and 15 over the top of the second parameter, and your procedure should now look like the one in figure 8:
Figure 8. The procedure, including the wait for a random period of time.
Hopefully, you've now got the hang of dragging elements into the procedure, so I'll just describe each of the steps required to complete the procedure rather than showing you what it should look like each time:
That's it! Your finished procedure should look like this:
Figure 9. The finished procedure to activate the light at random intervals.
Procedure 2: Responding to a lever pressThe second procedure needs to wait until the lever is pressed, and then either activate the pellet dispenser (if the light is on) or the shocker (if the light is off). Create the procedure (again using the I won't go into too much detail in this section - hopefully you've got the hang of adding statements to a procedure from the one we've just created. Just follow these steps:
Your finished procedure should now look like this:
Figure 10. The finished procedure to respond to the lever press.
That's our two procedures written. Hopefully you've got an idea of how powerful and flexible procedures can be - there's a whole Procedures section in the help dedicated to them where you can find out more about their capabilities. Save the protocolWe've now altered the settings of the Shocker, entered a test duration, and added a couple of procedures. You might also have entered one or more Fields, or altered some of the default settings - this being the case, you will usually want to save the protocol so you can use it again in other experiments. To do this, you need to click the What next?Now that you've set up your protocol, you're ready to use it in an experiment. See also:
© Copyright 2003-2026 Stoelting Co. All rights reserved ANY-maze help topic T1099 |