Timing in E-Prime

Last modified by Iris Spruit on 2023/07/14 10:40

 

Introduction

When setup properly, E-Prime can achieve great timing with minimal delays.

Tips & Tricks

  • Check the timing.
    It is always recommended to check the general timing of your experiment, also when timing is not very critical:
    • Set the Data Logging option of all objects in the trial procedure to Timing Audit Only or Standard (to set this property, go to the Duration/Input tab). With this setting, variables such as the OnsetTime and OnsetDelay of objects are saved. See also: TIMING: Time Audit [22865].
    • Check the OnsetTimes of the objects in your trial procedure in the Edat file. By subtracting the OnsetTimes of different objects, you receive information about the duration of each object, or the duration of each trial.
    • Check the OnsetDelay for timing critical objects in the Edat file. This variable shows the time between when the object should have appeared and when the object actually appeared. See also TIMING: Onset Delay [25779].
       
  • Delay first object.
    The first object in the structure usually has a delay that is greater than other objects. Always start the task with an object that does not require accurate timing, such as a welcome screen or instructions screen.
     
  • Refresh Alignment.
    Check the refresh alignment (default = 25%). Go to Edit Experiment Devices Display. E-Prime checks the refresh rate of the screen. With refresh alignment, E-Prime permits objects to be drawn on the screen early and ‘hop on’ to an earlier refresh. This way, more accurate timing can be achieved compared to when E-Prime always waits for the next refresh. See also: TIMING: RefreshAlignment locks into nearest refresh vertical blank to promote timing accuracy [18035].
     
  • Refresh rate.
    Set a specific refresh rate that the monitor can handle (usually 60 Hz) and make the duration of timing critical objects divisible by the refresh rate. This way, the Refresh Alignment will be used most optimally. The refresh rate can be set in EditExperiment Devices Display.
     
  • PreRelease.
    Make use of the PreRelease to preload objects (see PreRelease). However, be cautious of using PreRelease when also using InLines. Also, when sending a marker at the onset and offset of an object, always set the PreRelease of the concerning object to 0 (more info on markers in E-Prime). See also: TIMING: Using PreRelease to Maintain Millisecond Timing [17760].
     
  • Generate PreRun.
    Check the Generate PreRun setting to decide what the best time is to load an object. The object can either be prerun at the start of the procedure (TopOfProcedure), or just before its execution (BeforeObjectRun). It might be better to prerun objects at a non-critical time point, such as the start of the procedure, instead of just before the object executes. Note however that all properties of the object should be known at the start of the procedure when using the TopOfProcedure setting (see Generate PreRun). See also: TIMING: Pre-Run and Post-Run Generation [22854].
     
  • Unreferenced E-Objects.
    Delete all unused objects in the Unreferenced E-Objects. See also: E-STUDIO: Unreferenced E-Objects [27730].
     
  • Debug statements.
    Remove all debug statements in InLines. Each Debug.Print statement can take milliseconds. Only use these statement during design time, not data collection. An easy way to disable the debug commands is by setting the Debug object’s Enabled property to “false”: Debug.Enabled = false. See also: SCRIPTING: Debug [22886].
     
  • Loops. 
    Loops can also take quite some time. Try to reduce the number of loops (e.g. Do While, For .. Next loops).
     
  • Experiment Advisor report.
    Check the experiment advisor report that is generated after running the task. Go to Edit Experiment Experiment Advisor to check which information is saved in the advisor report. You can also check the Advisor in the E-Studio workspace (if it is not visible, go to View and enable Advisor). See also: E-STUDIO: Experiment Advisor [22679].
     
  • Resolution.
    Setting a lower resolution in E-Prime will result in a faster drawing of the screen and less delays between objects.

Resources

Tags:
   
solo
XWiki 14.10.13
contact@xwiki.com