Thus switchtype timing has two functions: it tells Timing programs about the type of response device available, and it allows the user to select one device if several are available and the program is able to use different devices. Most programs are able to use any of the three devices possible. In these cases the variable switchtype may be used to tell the respective program which type of switch should be used. Note that the command line option may also be used to set the default input device. This mechanism is described in detail. An assignment in a program's parameter file overrides the defaults. In some cases it is not sufficient to set the input device.
It may also be necessary to tell a program the exact input codes in order to decide what are correct and false responses. An example is the program rtm. Figure sboard gives the input codes for the switches of switch boards. The input codes for keyboard input are the corresponding ASCII values or the keyboard scan codes.
It must be clear, however, that not every timing program allows input from every arbitrary device. There may be programs that definitely require a certain device in order to work properly. Suppose you want to measure response times. Using the keyboard as a response device will be a bad idea in this case, since there will be a considerable delay between the subject's response and the software interrupt that is needed to detect it. A program to measure response time may require a switchboard. In this case the program will check the current value of switchtype before it starts. If the switchtype value is not appropriate, the program will issue a fatal error message and stop execution.
Thus switchtype timing has two functions: it tells Timing programs about the type of response device available, and it allows the user to select one device if several are available and the program is able to use different devices.
Most programs are able to use any of the three devices possible. In these cases the variable switchtype may be used to tell the respective program which type of switch should be used. Note that the command line option may also be used to set the default input device.
As described in other chapters, an assignment in a program's parameter file overrides the defaults. In some cases it is not sufficient to set the input device. It may also be necessary to tell a program the exact input codes in order to decide what are correct and false responses. An example is the program rtm. Figure sboard gives the input codes for the switches of switch boards. The input codes for keyboard input are the corresponding ASCII values or the keyboard scan codes.
Thus switchtype timing has two functions: it tells Timing programs about the type of response device available, and it allows the user to select one device if several are available and the program is able to use different devices. Most programs are able to use any of the three devices possible. In these cases the variable switchtype may be used to tell the respective program which type of switch should be used. Note that the command line option may also be used to set the default input device.