Introduction

E-Prime is a software suite featuring different applications used for creating and running behavioral experiments. Its main application, E-Studio, is used for building tasks and has a graphical user interface to facilitate easy task building. Advanced task structures and options are available through scripts (Inlines) which use a Visual Basic based language called E-Basic. E-Prime can be used in combination with physiology and eye tracking recordings with, amongst others, Biopac, Biosemi, Tobii, and EyeLink.

Availability, support and advice

E-Prime 3 and E-Prime E-Prime 2 are available for researchers at FSW Leiden and are preinstalled on all lab computers. The software can be installed on work computers through the Software Center. E-Prime 3 is also available for usage at home for researchers of FSW Leiden. If you have a university laptop and E-prime has been installed via the Software Center, the license works outside the university if you have an active EduVPN session. For E-prime on non-university computers or laptops, please contact labsupport@fsw.leidenuniv.nl for more information.

SOLO provides full support for E-Prime and recommends its usage in particular when accurate and precise timing needs to be achieved.

Tips & Tricks

Terminating an Experiment

To close the experiment in a safe way while it is running, press ctrl + alt + shift. The data is not saved in an edat file, but in a text file only. This text file can be converted to an edat file with E-Recovery. To close the experiment and save the data in an edat file, press ctrl + alt + backspace. Note that saving the data this way is more time consuming and not recommended when the experiment has been running for a long time, as E-Prime may crash.

Getting a back-up

A back-up of the E-Studio file can be obtained by going to Tools  Options  and clicking Copy backup experiments to the desktop…. The 25 most recent .es3 files are then copied to a folder on your Desktop. At the start of building an experiment, make sure that the Automatically backup most recently saved copies of my experiment.. option in the Options window is checked. Getting a back-up may be useful when E-Studio crashes and you did not save for a while, or when the .es3 file is deleted by the crash, or when the .es3 file is corrupted. 

Data saving after E-Run Crashes

When E-Run crashes while administering a task, an Edat data file is not created. The data is however not lost, it is saved in a text file with the same name as the Edat file. This text file can be converted to an edat file using E-Recovery. When a crash happens and a rerun of the task with the same participant is necessary, always use different Startup Info (e.g. a different Session number or Subject number). When using the same Startup Info, the text file is overwritten and the data of the first run is lost.

Default E-Object settings

Before starting to build an experiment, it is advised to change some of the default settings of the E-Objects. This way, every object will conform to your chosen settings instead of the E-Prime default settings. To change the settings, right click in the Toolbox window, where all the objects are listed, and choose Toolbox Defaults. Here, you can change the default settings of each E-Object as well as each Slide sub-object. Some settings you might want to consider changing:

  • PreRelease
  • Generate PreRun
  • FontName and FontSize
  • Back- and ForeColor
  • Frame (default in E-Prime 2 is 75%, usually 100% is preferred)

PreRelease

The PreRelease of an object is the amount of time in ms that E-Prime will take during the execution of the object, to setup or preload the next object. The PreRelease property can be found when going to the Duration/Input tab of an object. It is important to understand what effect the PreRelease has for your experiment. For example, you have a Text object with a duration of 3000 ms and a PreRelease of 500 ms. This means that E-Prime will load the object that comes right after this Text object 500 ms before the end of the Text object, thus at 2500 ms. The PreRelease is set by default to Same as duration, which means that from the start of the object, E-Prime will start setting up the next object. This default setting can be very useful, for example when the next object is an object that needs some time to load, such as a large image, sound, or movie. However, setting up the next object while the current object is still running can also have negative consequences. For example, a stimulus object on which participants need to respond is followed by an InLine object in which the response of the participant on the stimulus object is used to set a certain property of an object further down the procedure. When the stimulus object has a PreRelease of Same as duration, E-Prime will attempt to preload the InLine at the start of the stimulus. However, because at this point no response has been given to the stimulus yet, the response is processed incorrectly in the InLine.

Important:

  • The use of PreRelease should be avoided when the next object is a Feedback object, an InLine, a Package Call, or when the object is the last object in the procedure.
  • When timing in your experiment is not critical, it is advised to set the PreRelease of all objects to 0.
  • When timing is critical, use PreRelease with caution.

Generate PreRun

The Generate PreRun property allows you to choose when object resources are loaded. The Generate PreRun property can be found in the Common tab of an object. This property can be set to Inherit, TopOfProcedure, or BeforeObjectRun. Objects are set by default to Inherit, which means that the Generate PreRun setting of the procedure on which the object is located are inherited. Procedures are set by default to BeforeObjectRun in E-Prime 3 and TopOfProcedure in E-Prime 2. When set to BeforeObjectRun, the object is loaded right before its execution. When set to TopOfProcedure, the object is loaded at the start of the procedure, before the execution of any of the objects on the procedure.  

Depending on the size of the resources, a certain amount of time is necessary to load an object. The Generate PreRun property allows you to choose when this loading will occur. When objects have large resources, such as audio or video, it can be useful to move the loading of these resources to a non-critical point in the trial, that is, the start of the procedure. However, setting the Generate PreRun to TopOfProcedure should be done with caution. When an object references an attribute that is set in the same procedure with c.SetAttrib, one cannot use the TopOfProcedure setting. This is because the object already loaded its resources before the attribute was set. To update properties during a procedure using attribute references, set the Generate PreRun to BeforeObjectRun.

For more information, see: TIMING: Pre-Run and Post-Run Generation [22854].

Important:

  • Objects can be loaded at a non-critical point in the trial (the start of the trial) when setting Generate PreRun to TopOfProcedure. This will cause minimal delay between objects.
  • When an object is adjusted in the same procedure as it is located on, it cannot be loaded at the start of the trial and the Generate PreRun setting should be set to BeforeObjectRun.

Inlines

When using InLines, be cautious of the following:

  • When an object is modified by an InLine in the same procedure, the Generate PreRun setting of that object should be set to BeforeObjectRun (see also Generate PreRun).
  • The PreRelease of an object right before an InLine should be set to 0 (see also PreRelease). An InLine does not require any setup time.
  • Debug statements should be disabled when optimal timing is required. With Debug.Enabled = False, all calls to Debug.Print or Debug.Assert are ignored.
  • When you create a list (fill attributes) in an InLine, do not forget to reset the list at the end of the InLine (ListName.Reset)! Otherwise, the list will not be updated. When filling a list by InLine, the trial IDs of the list will be ‘used’. By resetting the list, all IDs become available again. The reset function can also be used when you want to reset a list and thus make all trials available again after a part of the list has run.
  • For more information about InLines, see: E-STUDIO: InLine Object [22710].

Data Logging

The Data Logging property lets you choose which variables of an object are logged in the edat file. The Data Logging property can be found in the Duration/Input tab of an object. Note that this property is set by default to (none), meaning that no data of that object is saved. Other options are Standard (both response and timing variables are saved), Response Only (only response variables are saved), and Time Audit Only (only timing variables are saved). Finally, one can choose for Custom and go to the Logging tab to set the variables to save manually. Note that a MovieDisplay object features some extra frame information related variables.

It is advised to set objects that collect responses to Standard logging, and other objects in the trial procedure to Time Audit Only. This way, it is always possible to infer the timing of your experiment. When it is not necessary to log any data, it is still advised to set logging to Time Audit only. When no data is logged at all, no edat file will be created, and E-Prime will give an error at the end of the task. For more information on data logging in E-Prime, see: OVERVIEW: Logging and Data Collection [23283].

Markers

More elaborate information on sending markers can be found in Sending markers from E-Prime to the LPT port and Sending markers from E-Prime to the serial port (USBParMarker). In general, when sending markers to the LPT port, please note the following:

  • When the marker is linked to the onset and offset of an object, it is very important to set the PreRelease of that object to 0. When the PreRelease is left to its default of (same as duration), the marker will not be sent.
  • Define the LPT port address in the User Script and make sure to check whether the right port address is set before testing.
  • Some issues have been encountered when sending markers with E-Prime in windowed mode, so make sure when testing participants to not use windowed mode (for task building debugging purposes it is fine). 

Test the whole task a few times and check if all markers are present in the physiological data!

Multiple Input Responses

When you want to allow multiple responses to one object, click on the Advanced.. button in the Duration/Input tab. Here, you can enter the max count (maximum number of responses). After the number of responses entered here (or after the Duration has passed) the End Action as specified in the Duration/Input tab will be triggered. Alternatively, it is possible to enter a specific response key in Termination Response. When doing so, the key entered here will trigger the End Action in the Duration/Input tab. Note that when you enter a Termination Response key in the advanced menu, this key should also be included in the Allowable keys in the Duration/Input tab.

Using Two Screens

It is possible to use two screens in your E-Prime experiment and to have each screen present different stimuli. To use two screens, first a second Display needs to be added to the experiment by going to: Edit ⇒ ExperimentDevicesAddDisplay. For each visual stimulus you can now choose on which display it is presented in the dropdown menu under Display Name in the General tab. Note that when you work with two screens, E-Prime will add up the pixels of the screens. Thus, when using one screen, you would for example have a screen resolution of 1920 x 1080, but with two screens, you would have a combined screen resolution of 3840 x 1080, assuming that both screens have the same resolution. When presenting stimuli, you should thus avoid using pixels to set the Position of certain sub-object.


FAQ

TopicQuestionAnswer
E-Prime crashes: DisplayPort1 does not respond 
  • When using a laptop, make sure the adapter is plugged in.
  • It is possible that the ebs3 file is not configured yet for the PC that you are running it on. Hit generate in the es3 file to generate a new ebs3 file.
  • Make sure the resolution set in the task is the same as the resolution of the monitor (Edit ⇒ Experiment ⇒ Devices ⇒ Display).
E-Prime crashes: Error 11102 - Display too busy 
  • Another program might be competing with E-Prime for the screen. Make sure that every other program is completely switched off when running the task.
  • Make sure that when using E-Prime 2, you use version 2.0.10.356.
  • Make sure the task is ran locally (from the C: drive).
  • Make sure the resolution set in the task is the same as the resolution of the monitor (Edit ⇒ Experiment ⇒ Devices ⇒ Display).
  • Update the video card driver (Device Manager ⇒ Display adapters), and restart the computer (requires admin rights, for lab computers please contact labsupport).
E-Prime crashes: Error 11011 - Drawing error 

This issue can be caused by using the “old” dialog boxes under Windows 10 (e.g. MsgBox(statement)). The new method is <DisplayDevice.DialogueBox(statement)> (e.g. Display1.MsgBox("hello")), which can only be used in E-Prime 3 (see also: INFO: Display.MsgBox usage in E-Prime 3.0 [23633]). Note that not all dialog boxes can be used in Windows 10, only the following can be used:

  • MsgBox
  • AskBox
  • AnswerBox
  • InputBox
E-Prime crashes: task freezesThe task "freezes" and cannot be exited normally (using ctrl + alt + shift)This can happen right after an “old” dialog box (e.g. MsgBox(statement), see above). Make sure you use E-Prime 3 and the new dialogue boxes (e.g. DisplayDevice.MsgBox(statement), see also: INFO: Display.MsgBox usage in E-Prime 3.0 [23633]).
Runtime error - Unable to obtain a valid refresh rateWhen I want to run my task I get a Runtime error: Unable to obtain a valid refresh rate.This can happen when running an E-Prime 2 task in Windows 10 with a refresh rate of 60 Hz. On some screens (such as AOC) and with an HDMI or DisplayPort connection E-Prime 2 cannot run in 60 Hz. Switching to E-Prime 3, using a different screen, or switching to VGA or DVI connection all seem to solve this issue. Also, always set the screen resolution to not match desktop resolution, and set a specific refresh rate (do not leave it to unspecified).
When using two screens, one screens seems to "fall behind"I use two screens in duplicate mode, but one screen seems to "fall behind" (stimuli are drawn on that screen later than on the other screen), or shows a black screen.It is possible that not the most optimal Display Driver is installed. Install a different Display Driver (admin rights are required, for lab computers please contact labsupport).
Clicking on the slider sub-object is processed by E-Prime as pressing a button.I have a slider and button sub-object on a slide. I want the slide to continue when the button is clicked. Even though the Input Mask is set to 'Button', the slide advances when the slider is clicked on.Clicking on the slider or on the indicator of the slider is processed by E-Prime as pressing a Button. Clicking on the axis is processed as clicking a button called {[sliderName]Axis} (e.g. {Slider1Axis}) and clicking on the indicator is processed as clicking a button called {[sliderName]Indicator} (e.g. {Slider1Indicator}). When you want a slide with a slider and for example a ‘continue’ button, make sure that you specify the allowable response (e.g. {Continue}) in the Duration/Input tab of the Properties of the slide, and not leave it to {*}.]
Flickering screen (Windows 10)When I run my E-Prime task, the screen flickers. This seems to happen sometimes in Windows 10, but only on certain screens and only under a resolution of 1920 x 1080. It is unclear why this happens. Changing the resolution in the E-Prime task to any lower resolution fixes the issue (Edit ⇒ Experiment ⇒ Devices ⇒ Display).

When opening an es3 file, E-Prime gives the Error:

"Error Loading: <filename>

Please ensure the file exists, is not write protected or read only, and is a valid E-Studio experiment file."

 Check whether the file exists, and is not read-only. Otherwise, the file is probably corrupted and cannot be opened. Try getting a back-up (see chapter Getting a back-up).
Marker issuesI am sending markers through parallel port, but not all of them seem to arrive.

Make sure to not run E-Prime in windowed mode, as we have encountered issues with markers and windowed mode before. 

When using WritePort to send a marker, make sure the time between WritePort <PortAddress>, <MarkerValue>
and WritePort <PortAddress>, 0
is more than one sample.

 

Resources

  • Getting Started Guide. The Getting Started Guide contains a tutorial to build a simple reaction time task and an introduction to E-Merge and E-DataAid. On any computer on which E-Prime is installed you can find the Getting Started Guide under Start ⇒ E-Prime 3.
  • PST official sample ExperimentsSome basic sample experiments are also included as part of the E-Prime installation and can be found in Documents\My Experiments\3.0\. These sample experiments illustrate key concepts within E-Prime.
     
  • SOLO sample experiments. SOLO created some useful sample experiments which can be found on the solo-fsw Github organization.
  • E-Prime Command Reference. The Command Reference can be launched from the Help menu within E-Studio and comprises of the complete documentation of commands in the E-Basic scripting language.

[1] Spapé, M., Verdonschot, R., & van Steenbergen, H. (2019). The E-Primer. Leiden: Leiden University Press