This article applies to:
E-Prime 3.0
E-Prime 2.0
Detail
NOTE: This article contains information specific to step #2 of INFO: How do I send a marker to an external device? [42521].
Determining what marker values can and should be sent to an external piece of equipment depends on several factors: the number of unique conditions that need to be identified, the capabilities of the transmitting and receiving devices, and how the transmitting device (e.g., Chronos or a parallel port) connects to the receiving device (e.g., Chronos Custom Adapter for BIOPAC STP100C, standard parallel port DB25 cable). PST recommends consulting the user manual and/or the manufacturer of the receiving device and the software for important details on the receiving system's capabilities.
Markers are transmitted as individual bits in a binary (base 2) number. Markers can be specified as integer, long, or byte values (base 10 numbers). They can also be defined in terms of which specific bit to set high. When designing experiments that send markers, researchers must understand the relationship between base 10 and base 2 numbers. A simple example is shown below: the integer value 4 is represented as an 8 bit (1 byte) binary number.
Each bit in a binary number is expressed in powers of 2, that is 2^bit number. Bits are zero-based (the first bit is bit #0) and are typically numbered from right to left with the least significant bit (LSB) on the right. In the image above, bit #2 is set high (1) while all other bits are set low (0).
In the example shown above, the specified base 10 value of 4 results in a single bit being set high (bit #2). It is also possible to set multiple bits high. For example, the integer value of 129 corresponds to a binary number with bits 0 and 7 set high and bits 1 through 6 set low. The number of available bits determines the maximum value and number of unique marker values that can be sent. For example, an 8 bit value enables a total of 255 distinct marker values to be sent: the binary value 1111 1111 equals the integer value 255.
NOTE: To see all of the bits low, specify a base 10 value of 0.
NOTE: Your computer's calculator app provides a convenient way to translate between base 10 and base 2 values when run in Programmer mode. Similar to the display shown above, it identifies which bits are set high (1) or low (0) for a given base 10 value.
The devices used to send and receive markers from the E-Prime computer determine how many unique values can be sent. A standard parallel port provides access to 8 digital outputs, and as noted above, this enables a maximum of 255 unique values to be sent. The Chronos I/O Expander and some of the Chronos Custom Adapters support 16 bits (2 bytes): the maximum base 10 value that can be sent with 16 bits is 65,535. The receiving device may or may not support the full set of available digital outputs that are accessible from the transmitting device.
Most experiments send a small number of unique values. Some experiments only require a single marker value to designate when the stimulus was presented on screen; other experiments require one value to designate the onset of a stimulus and a different value to designate when the participant made a response. In such cases, the specific marker value that is sent is arbitrary and the only criterion is that two different values among the set of supported marker values are specified. For example, the parallel port provides 8 digital outputs. A common design is to use each individual bit to identify a stimulus condition. For example, an experiment that presents four different stimulus categories would send marker values of 1, 2, 4, and 8 (in base 10) for each category, which would set either bit 0 (0000 0001), 1 (0000 0010), 2 (0000 0100), and 3 (0000 1000) high. The researcher could then choose to send any of the following values to manipulate a single bit (not yet designated to a specific condition) high when a response is made: integer value 16 (bit 4 high), integer value 32 (bit 5 high), and so on.
Another common design is to use a specific range of values for each condition in contrast to manipulating specific bits per condition. For example, an experiment that presents four different stimulus categories would send marker values of 11 (0000 1011), 12 (0000 1100), 13 (0000 1101), and 14 (0000 1110) (in base 10) for each category. This example illustrates the use of values in the tens for different stimuli conditions. Then, different values in the twenties can be used to denote response conditions. For example, 21 (0001 0101) for a correct response and 22 (0001 0110) for an incorrect response.
In some cases, the receiving devices configuration determines which marker values need to be sent. For example, some olfactory stimulus presentation devices require that the device receives a specific value in order to open a particular chamber to present its odor.
The receiving device's configuration can also determine the notation of the marker value that needs to be set. For example, the majority of this article focuses on base 10 (decimal) values. Some devices may require marker values to be specified in hexadecimal (base 16) or ASCII notation or to use an equivalent value for the desired value to be sent and received in another format. For example, if you wanted to send the ASCII character "#", but the method of transmitting the marker only supported integer values, the value "35" (decimal) or "23" (hexadecimal) may be specified depending on what notation the device requires. Please refer to https://www.asciitable.com/ for a table of equivalencies.
The marker value sent from E-Prime may not be represented 1:1 in the receiving software. The value may be translated or represented differently. For example, some EEG software displays a square wave without any value to denote when a marker was received. It is important to consult with the receiving device/software's user manual and/or the manufacturer to see if this may be the case with your receiving device.
See Also:
DEVICE: How To Send Markers Through a Parallel Port [25286]DEVICE: How To Send Markers Through a Serial Port [25287]
Comments
0 comments
Please sign in to leave a comment.