E Prime with ActiChamp

  • Recording PC: PC where the BrainVision Recorder is installed and the amplifier / BrainVision Recorder dongle are connected to.
  • Control PC: PC where E-Prime is installed on.

(1) Installation

Install the Remote Control on the Recording PC.

Remote Control:

  • Install the “Remote Control for BrainVision Recorder” by starting the “RemoteControlSetup.exe”
  • Start the “Remote Control for BrainVision Recorder”
  • Make sure, that BrainVision Recorder dongle is connected
  • Do not start BrainVision Recorder, it will be started automatically
  • The contents of the folder “E-Prime Packages\EP2” must be copied to the folder “C:\Program Files\PST\E-Prime 2.0\Program\Packages” (adjust or create the path if necessary). For E-Prime 2.0 Pro (EP2) – Version 2.0.8.74 or higher:
  • Add BrainVisionRecorderPackage in E-prime: “Edit” ->“Experiment” -> “Package”
  • The contents of the folder “E-Prime Packages\EP1” must be copied to the folder “C:\Program Files\PST\EPrime\Program\Packages” (adjust or create the path if necessary).

(2) Experiment settings

  • Before you can start working with the BrainVisionRecorderPackage in E-Prime you must set up a new socket device for the network connection to the Remote Control. To do this, choose “Edit” -> “Experiment” -> “Devices” -> “Add…” -> “Socket”. Click “Edit…” to modify: for E-Prime 2.0 Pro (EP2) – Version 2.0.8.74 or higher: Name: Recorder Server: IP address of recording PC or “localhost” if the recording PC and the control PC are the same Port: 6700 Connection Type: TCP Byte Ordering: LittleEndian

(3) “Compiler” switch

This must be defined in the “User” section of the program. To excess the “User” section, choose: “View” -> “Script”. Enable the “User” tab. #Const NOEEG = {TRUE|FALSE} If this switch is turned on (TRUE), communication with the Recorder (recording PC) is deactivated. This switch can also be useful for programming and testing the E-Prime experiments outside the lab. The triggers sent to the parallel port remain active.

DEBUGGING

This must be defined in the “User” section of the program. To excess the “User” section, choose: “View” -> “Script”. Enable the “User” tab. #Const DEBUGGING=True The Debugging switch facilitates the debugging of programs and can be customized as desired. Example: #If DEBUGGING Then If (GetAttrib(“Subject”) > 40) Then MsgBox “Caution: Subject_ID is too large” End If #End If

The Debug. enabled switch is also automatically activated/deactivated. This switch determines whether Debug.Print statements are executed. (1) Enable the “Script” view… (2) Open the “User” tab and edit…

(4) Functions

Recorder Remote Control (initialization)

If the E-prime is intended to take complete control of the experiment (e.g. starting and stopping recording of the EEG), which is the usual situation, 4 package calls must be executed at the start (in the correct sequence). The sample file Example\EP2\RemoteControlTestEP2-eng.es2 will also illustrate these components. BrainVisionRecorderPackage_INIT1LoadWorkspace (WPath As String ): Loads the workspace in the BrainVision Recorder on the recorder computer via the network interface.

IMPORTANT: The absolute pathname on the measurement computer including the filename extension, double backslashes and quotes must be specified (e.g. “C:\path\to\theFile.rwksp”) BrainVisionRecorderPackage_INIT2ExpNumber (ExpNumber As String): Passes the current experiment number to the measurement computer via the network interface. BrainVisionRecorderPackage_INIT3SubjectID (Subject_ID As String): Passes the current subject-number to the recorder computer via the network interface (can be queried automatically with Subject_ID = c.getAttrib(“Subject”)). BrainVisionRecorderPackage_INIT4RecorderInit: Starts and initializes the BrainVision Recorder with the parameters specified under 1-3.

Recorder Remote Control (functions)

If the Remote Control is running on the recorder computer, the measurement can be started and stopped automatically. A measurement can be stopped automatically, even if it was started manually. BrainVisionRecorderPackage_ImpedanceMode: Switches the BrainVision Recorder to impedance mode. BrainVisionRecorderPackage_MonitoringMode: Switches the BrainVision Recorder to monitoring mode in which the EEG can be seen and which must be started before recording. BrainVisionRecorderPackage_RecordingStart: Starts recording on the measurement computer via the network interface. BrainVisionRecorderPackage_RecordingPause: Pauses recording on the measurement computer via the network interface. BrainVisionRecorderPackage_RecordingContinue: Resumes recording on the measurement computer via the network interface. BrainVisionRecorderPackage_RecordingStop: Stops recording on the measurement computer via the network interface. BrainVisionRecorderPackage_RecorderQuit: Closes the Recorder, saves the data and flushes all variables from 1-3 in the Remote Control (important for the next experiment). BrainVisionRecorderPackage_DCReset: Performs a DC reset.

Checklist

BrainVisionRecorderPackage_CheckProc: Opens an ASCII file and works through the items it contains in the form of a checklist of the usual type for the lab.

Trigger

BrainVisionRecorderPackage_TriggerSend ( ATrigger As Integer ): Sends a trigger over the parallel interface to the recorder computer. Note that the port should be reset to zero after a certain period (see TriggerReset). A trigger must not be 0. Note that a 0 trigger will be sent first, the real trigger (defined by ATrigger value) will be sent 2 ms later. The time-delay must take into account during the data-evaluation. BrainVisionRecorderPackage_TriggerReset(ADelay As Integer): Waits for a short period (ADelay in milliseconds) and then resets the trigger port to zero. BrainVisionRecorderPackage_AssignTriggerToObjectOnset( AnObject As RteRunnableInputObject, ATrigger As Integer ): Assigns a trigger to an object (TextDisplay, ImageDisplay, etc.). This is sent to the amplifier via the parallel interface at the onset time. This function should be available according to the E-Prime documentation, but my experiences with it were not good. The trigger was simply not issued. BrainVisionRecorderPackage_AssignTriggerToObjectOffset( AnObject As RteRunnableInputObject, ATrigger As Integer ): Assigns a trigger to an object (TextDisplay, ImageDisplay, etc.). This is sent to the amplifier via the parallel interface at the offset time.

 

(5) How to start the sample E-Prime experiment?

E-Prime 2 Pro (EP2) – Version 2.0.8.74 or higher:

Recording PC

  • Install the “Remote Control for BrainVision Recorder”
  • Start the “Remote Control for BrainVision Recorder”
  • Make sure, that the BrainVision Recorder dongle is connected
  • Do not start the BrainVision Recorder, it will be started automatically

Control PC

  • Copy the content of the E-Prime Packages\EP2 into the E-Prime 2.0\Program Files\Packages\ folder, so the whole BrainVisionRecorderPackage folder has to be copied.
  • Start the E-Prime file Example\EP2\RemoteControlTestEP2-eng.es2
  • Add the new socket in Edit / Experiment / Devices. Name: Recorder Server: IP address of recording PC or “localhost” if recording PC and the control PC are the same Port: 6700 Connection Type: TCP Byte Ordering: LittleEndian
  • Add BrainVisionRecorderPackage in “Edit” -> “Experiment” -> “Package”
  • Set the name and the path of the BrainVision Recorder workspace (.rwksp file) in the INIT1LoadWorkspace (e.g. “C:\Vision\Workfiles\Standard Workspace.rwksp”). It must define a file, which really exists on the Recorder computer and compatible with the EEG system. Set the name and the path of the BrainVision Recorder workspace …
  • Run the RemoteControlTestEP2-eng sample experiment