Synchronization with External Equipment
There are numerous scenarios in which researchers need to communicate between an E-Prime experiment and another hardware device. Common examples include having E-Prime send a signal to another computer that is collecting biological monitoring data during key points in the trial sequence, such as when the stimulus is presented or when a response is made. In these scenarios, activities such as the starting a trial after receiving a “go” signal from another computer, or sending the onset of a stimulus to the other system from E-Prime, are common. E-Prime provides the ability to communicate with external equipment in several ways, which are described below.
Psychology Software Tools has partnered with several vendors who perform eye tracking, head motion tracking, and MRI data collection. See our Partners page on the PST web site for details.
Task Events are always the preferred communication route with external devices, because they are closely integrated within E-Prime’s runtime internals and will execute more precisely than script-only alternatives. TaskEvents offer a wide variety of options to take action when specific time critical events occur during an experiment. These capabilities, which were difficult to perform in previous editions of E-Prime, can now be achieved using the E-Studio interface relying less on complex design or advanced E-Basic scripting techniques.
For more details on Task Events, please see the following resources:
E-Prime supports communications via serial, parallel, and socket communications. Please see the following Knowledge Base Articles:
- INFO: General Serial Device Information 
- INFO: Serial Communication in E-Prime 
- INFO: Recommend Parallel Port Adapters for Machines without a Parallel Port 
- INFO: How do I notify external equipment at the exact time that an event occurs in E-Prime? 
- NEW FEATURE: Add a Socket object or device to support TCP/IP communications. 
Any time you correlate data from two different computers, you will need some way to accommodate clock drift E-Prime supports the use of an SNTP clock to address this issue. A full treatment of SNTP (Simple Network Time Protocol) is beyond the scope of this article, but in brief it is an internet standard protocol for synchronizing time across computers.
E-Prime can be set to use an SNTP clock rather than the default real-time clock. In switching to the SNTP clock, E-Prime runs as a client whose clock is constantly adjusting, or slewing, to synchronize with the server clock. The SNTP client looks at time information that is sent from the NTP server, compares this information with its local clock reads, and adjusts the results of the local clock read accordingly. Ideally, E-Prime is included on a closed network with no internet access and no other additional computers, although this is not always possible. In our experience, running on a LAN that utilizes switches rather than hubs results in acceptable performance.