NOTE: This article is the same content as article number 19048.
Configuring a Task Event is performed via the Task Events tab within the object Properties pages (on each object supporting Task Events). Within the experiment structure, select the object for which the Task Event is to be configured, and display the object’s property pages.
Watch the Task Events video for more information on configuring Task Events in E-Prime.
Add an Event
To set a Task Event, first select an Event for which the experiment should listen. This event will be used to trigger (i.e., “cause”) the beginning of a task. Within the Events group on the Task Events tab, click the Add… button. The Add Event dialog will be displayed, listing Events available to be used as a trigger.
The types of events included in the list will depend on the type of object for which the event is being selected (e.g., is an input mask enabled for the object), as well as the devices that are available via the Devices tab in the Experiment object (e.g., Keyboard, Chronos, etc.). Table 1 below indicates the types of events that are available based on the type of object, whether an input mask is enabled for the object, and the devices available for input.
Table 1. Events by Object Type/Input Mask/Input Device
RteObject (parent of all objects, including Slide, TextDisplay, ImageDisplay and SoundOut) | ||
|
StartTime |
Occurs when the RteObject begins execution of its Run method). See FinishTime for note concerning accurate timing of tasks. |
|
FinishTime |
Occurs when the RteObject finishes execution of its Run method. Note: When PreRelease is set to “(same as duration)” (i.e., default setting), FinishTime is not the actual end time of the object. It may be necessary to specify the StartTime or OnsetTime of the next occurring object as the Event. |
|
OnsetTime |
Occurs when the object begins its critical action (displaying text,displays an image, playing a sound file, etc.). See OffsetTime for note concerning accurate timing of tasks. |
|
ActionTime |
Occurs when the object finishes its critical action (e.g., display text or image, etc.). |
|
OffsetTime |
Occurs when the object ends its critical action (e.g., display text or image, playing a sound file, etc.). Note: When PreRelease is set to “(same as duration)” (i.e., default setting), OffsetTime is not the actual end time of the object. It may be necessary to specify the OnsetTime of the next occurring object as the Event. |
Input Mask | ||
|
Terminate |
Occurs upon termination of the input mask, regardless of the accuracy of the response or non-response. |
|
Disarm |
Occurs when the input mask is disarmed. |
|
Omission |
Occurs upon termination of the input mask (i.e., timeout) and the InputMask.History.Count is 0 (i.e., no response). |
|
Incorrect |
Occurs upon termination of the input mask (i.e., termination response or max count) and the response is incorrect(InputMask.ACC is zero). |
|
Correct |
Occurs upon termination of the input mask (i.e., termination response or max count) and the response is correct(InputMask.ACC is non-zero). |
|
MaxCountReached |
occurs once the MaxCount property for an Input Mask has been reached. |
|
TimeLimitReached |
Occurs once the TimeLimit property of an Input Mask has been reached. |
|
TerminationResponse |
Occurs once E-Prime registers that the Input Mask's Termination Response has been pressed. |
|
RESPChanged |
Occurs once E-Prime registers that a unique response has been made. This does not apply to the very first response to an object, but to every response after that. |
|
Release |
Occurs once E-Prime registers that an Input Mask response has been released. |
|
Press |
Occurs once E-Prime registers that an Input Mask response has been pressed. |
Input Devices (Joystick, Keyboard, Mouse, ParallelPort, Port, Serial Response Box, Chronos) | ||
|
Release |
Occurs when E-Prime registers a release from the specified input device. Note that the release event is unrelated to an Input Mask and is specific to the InputDevice. |
|
Press |
Occurs when E-Prime registers a press from the specified input device. Note that the press event is unrelated to an Input Mask and is specific to the InputDevice. |
Procedure | ||
|
ProcedureStart |
Occurs as the first event in a Procedure, prior to setup and preload of objects on the Procedure. |
|
TimelineStart |
Occurs after all objects in the Procedure have loaded (just prior to the first object’s execution of its Run Method). |
|
TimelineFinish |
Occurs after the last object on the procedure finishes execution of its Run method (i.e., the object completes), prior to logging to the Context. |
|
EndOfProcedure |
Occurs when all pending input masks have finished. |
|
ProcedureFinish |
Occurs after the Context has been logged. |
|
FeedbackStart |
Occurs just prior to the Feedback object’s execution of its Run method. |
|
FeedbackFinish |
Occurs after the Feedback object finishes execution of its Run method (i.e., the object completes). |
List | ||
|
BeforeInteractiveDialog |
Occurs prior to display of the graphical interface/interactive dialog (when the List Object is set to Interactive Order). |
|
AfterInteractiveDialog |
Occurs after display of the graphical interface/interactive dialog (when the List Object is set to Interactive Order). |
The image below further illustrates the relationship between the events associated with the Procedure object:
Example
To illustrate the addition of a Task Event, the images below show the events available for selection in relation to the Stimulus object within the BasicRT sample experiment. The available events relate to the timing of the Slide object presenting the stimulus (i.e., Stimulus), as well as to the device associated with the input mask that is defined on the Stimulus object (e.g., Keyboard events). The images below illustrate selection and addition of the OnsetTime event (i.e., to specify an action that will occur at the onset of the Stimulus object. To add an event, select it from the list, then click OK to add it to the Events window within the Task Events tab.
Define the Task
To define the action that will take place when the Event occurs, first select the device that will be responsible for the Task (i.e., the device that will carry out the “effect”) in response to the trigger Event. In the Task group on the Task Events tab, click the elipsesassociated with the Name field to display the Add Task dialog. The devices displayed within the dialog indicate those that support assigning an action for a Task Event.
NOTE: Supported devices appearing in the Add Task dialog may only be selected if they have been added to the experiment via the Devices tab in the Experiment Object Properties (see E-STUDIO: Experiment Object [22698] for information pertaining to adding Devices to an experiment). Devices that have not been added to the experiment will appear as disabled.
Select a device and click OK. Once added, the device type will appear in the Name field of the Task group.
In addition, selection of a device will enable the Delay and Action fields to complete the definition of the Task.
Delay
The value specified in the Delay field indicates the duration to delay the occurrence of the Task relative to the Event. The Delay value represents the minimum number of milliseconds to delay the scheduling of the Task when the Event occurs. For example, a frequent scenario would be to trigger the parallel port to set a bit high at the OnsetTime of an object and then bring the parallel port bit low after a brief delay (e.g., 50 ms later). Note: This would be achieved by configuring two separate Task Events, one with a 0 delay, and one with a 50 ms delay. Attribute references may be used to vary the Delay value by trial or condition.
Action
The Action field is used to define the action associated with the trigger event (i.e., the “effect” caused by the trigger). From the dropdown list associated with the Action field, select an available Action. The list of available/supported Actions is determined by the selected device. For example, the ParallelPort device supports the SetBit, ResetBit, ToggleBit and WriteByte actions, the Script device permits user-written script segments to be invoked, the Chronos device permits a variety of actions related to tactile, auditory, visual, and analog responses, etc.Attribute references may be used to vary the Action by trial or condition.
Once an Action is selected, the fields within the Parameter group are displayed to allow specification of the properties related to the data to be sent, if the specified Action requires additional information (i.e., a parameter).
Parameter
The Parameter group defines the information required by the selected Action (i.e., what information must be passed to the Action from the Event so that the defined device may perform the action). Note: If the Action specified does not require a parameter, the Parameter fields are not displayed.
Field Possible Values Description Source (custom), Timestamp, ACC, CRESP, RESP, RT, RTTime, Status, Tag, UserTag, Attribute references Data element provided to the Action. Custom option requires value assignment in Custom field. Custom User-entered value, Attribute references User-entered custom value for Source. Required when Source field is set to “ (custom).” Data Type Integer, Long, Byte, String, String (Hexadecimal), ParameterList, Color, Boolean, Logical, (none), Attribute references Data type associated with the Source parameter. Options vary based on selected Action. Enabled Yes, No, Attribute references Enables or disables selected task event without deleting it.
Source
The Source field indicates data that is provided to the action. This field must be set if the Action requires a parameter. The value assigned to the Source field may be data automatically provided by the system, or a custom piece of data defined by the user via the Custom field.
Click on the Source dropdown box to view a list of supported data items for the selected event. This list will vary depending on the data available from the Event specified. For example, the OnsetTime Event offers the Timestamp of the event, multiple values (accuracy, reaction time, actual response) are available related to an input mask event, etc. Alternatively, to send a customized value, set the Source field to “(custom).”
Custom
When specifying “(custom)” as the Source value, enter the desired value into the Custom field.
Data Type
Each Source parameter, either custom or one that the event supports, has a data type associated with it. Click on the Data Type dropdown box to view the data types for the specified parameter.
Enabled
The Enabled field allows the task event to be turned on or off without removing it from the experiment. This is useful in multiple situations; while developing and testing aspects of the experiment that are unrelated to the task event, when development and data collection occur on different machines, when the Task Event condition is not used for all trials, etc. Set the Enabled field to “Yes” to enable the task event (i.e., turn it on), or set the Enabled field to “No” to turn it off.
Next Article: E-STUDIO: E-Run Test Mode [22737]
Previous Article: E-STUDIO: Using Task Events [22862]
Comments
0 comments
Please sign in to leave a comment.