Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 14 of 14

Thread: eye tracking with media lab (case 19711)

  1. #1
    Join Date
    Feb 2006
    Posts
    4

    eye tracking with media lab (case 19711)

    how do i run an asl eye tracker with media lab?
    Last edited by jason_reed; 05-21-2015 at 01:00 PM.

  2. #2
    Join Date
    Nov 2005
    Posts
    294

    Eye Tracker

    OK - the goal here is to make your DirectRT / MediaLab computer communicate properly with your EyeTracker system. Since there are a plethora of different systems out there, my instructions here will be fairly general. However, they should get you pointed in the right direction. If you have any questions, feel free to reply to this message, or send me an email at 'sales AT empirisoft.com'

    - - -

    Most folks who do eye tracking actually have two computers set up. One runs MediaLab or DirectRT and the other runs the eyetracking software. It's probably possible to run both programs on the same computer, but it may cause more problems than it's worth.

    We're also assuming that you want to show a picture or question on the MediaLab computer and then begin to capture data on the eyetracker system.

    So all we need to do is tell the eyetracker system to start and stop recording at the appropriate times.

    I'm guessing that your general experiment looks something like this:

    1. Show a picture or question
    2. Send a 'start' signal through the parallel port
    3. Wait for your subject to respond or react
    4. Send a 'stop' signal to tell the eyetracker to end data collection
    5. Rinse and repeat

    Everything OK so far?

    Your eyetracker system probably comes with an external hardware box, which contains connections for your camera, the computer, etc. There should also be a port which can send and receive TTL logic signals. On the systems I'm most familiar with, this port has 25 pins and is D-shaped, similar to an old-style parallel printer port.

    You can check the documentation that comes with your eyetracker system for more details.

    Fortunately, both DirectRT and MediaLab can communicate with the outside world through your computer's parallel port. This port contains, among other things, 8 wires which can be toggled on and off.

    If one of these wires is connected between the MediaLab computer and the Eyetracker computer, we can send stop and go signals back and forth.

    Check your documentation for best results, but I *think* you can go to the campus bookstore and buy a regular 25 pin parallel cable (check the computer section) and be in business.

    Don't start connecting random cables between your eyetracker system and your MediaLab computer without first checking with the proper user's manuals. We're NOT responsible any explosion which may occur.

    Then, you'll need to program MediaLab or DirectRT to send out a TTL signal at the appropriate time.

    For MediaLab, see page 85 in the manual:

    <value:location:duration>

    For example, say you present an image item for 5 seconds and at its onset you want to send a signal of 255 to port 888 for 10ms. To present it for 5 seconds, you would use parameter value of (d5). To add the TTL signal at its onset, you would add: (d5,<255:888:10>)
    For DirectRT, see page 33 of the manual.

    * * *

    In any case, the parallel port is 8 bits wide, which means that it can have 256 possible values assigned to it.

    The bits are assigned like this:

    D7 D6 D5 D4 D3 D2 D1 D0
    which correspond to decimal values
    128 64 32 16 87 4 2 1

    If you want to activate only the DO line, you'd send the decimal value '1' to the parallel port.

    00000001

    If you want to activate D1, you'd send decimal '2'.

    00000010

    D4 corresponds to decimal 16

    00010000

    and D7 is 128

    10000000.

    You can also add bits together. 7 looks like this

    00000111.

    Etc.

    Remember, there 10 types of people in the world - those who understand binary and those who don't.

    Then, you just need to program your eyetracker software to start and stop recording when the proper TTL signals are received.

    So to follow the template given above, your experiment file could look something like this:

    1. Show a picture or question
    2. Send a 'start' signal through the parallel port. Program the eyetracker software to accept a 'start' signal on wire D0. This wire will normally 'live' at 0 volts, but will pulse to +5V for 10 mS before returning to zero.

    (d5,<1:888:10>)

    3. Wait for your subject to respond or react
    4. Send a 'stop' signal to tell the eyetracker to end data collection. Program the eyetracker to accept a stop signal on wire D1.

    (d5,<2:888:10>)

    5. Rinse and repeat



    Does this help at all?

    - John
    Last edited by JEC; 02-20-2006 at 10:30 AM.

  3. #3
    Join Date
    Nov 2005
    Posts
    294
    It turns out that at least one eyetracker system is set up to automatically start and pause recording when Pin 1 on the parallel port is toggled between 1 and 0.

    Pin 1 on the parallel port is the 'strobe' bit, according to

    http://www.beyondlogic.org/spp/parallel.htm

    The strobe bit is Bit 0 of the parallel printer's control register, which is found at the base address + 2. That is, if your printer is found at decimal 888, the control register is at 890.

    So using the IOTester utlity found with every installation of MediaLab, you can send a test signal and see if it's working.

    The proper MediaLab command would be

    (d5,<1:890:5000>)

    For a five second low-to-high pulse on the strobe line.

  4. #4
    Join Date
    Nov 2005
    Posts
    3,320
    For a sample MediaLab input file, see:

    http://www.empirisoft.com/support/showthread.php?t=152

  5. #5
    Join Date
    Nov 2005
    Posts
    3,320
    [edited from support email]
    I have a question about the timestamp function of MediaLab. We are trying to synchronize eye tracking data with video data. In order to do this, I need to know exactly when MediaLab is making the stamp. It says it does so at the onset of the stimulus; however, I'm not sure if this means during the "purple screen", where it is opening the file, or when the video actually starts playing. The latter would be ideal.

  6. #6
    Join Date
    Nov 2005
    Posts
    3,320
    Whether or not you using a MediaLab "timestamp" or a MediaLab TTL signal, the signal will be sent at the onset of the trial (as opposed to when anything happens during the trial like a video). In contrast, with DirectRT, a TTL signal can be sent in near perfect synch with the onset of any stimulus within a trial.

  7. #7
    Join Date
    Nov 2005
    Posts
    294

    Updates to Eye Tracker Interfacing

    UPDATE: The friendly folks at Applied Science Laboratories were kind enough to share some additional information on this topic.

    The material I've posted above is correct with the following qualifications:

    1. You cannot use a 25 pin cable from Radio Shack. Use the cable supplied by ASL.

    2. ASL Record bit is parallel (LPT) port bit 7 (not bit 1). Recording will be ON as long as this bit is high, and be paused during any time that the bit is low. If you only turn on bit 7, this is decimal 128, hex 80, binary 1000 0000. It won't matter whether other bits are on or not, they can be used for other things if desired. Turning all the bits on (decimal 255, hex FF, binary 1111 1111), as described in the second web link, will certainly start "auto record", but only bit 7 is actually needed.

    3. If desired, it is also possible to use parallel port bit 6 to open and close data files. If this option is selected, a file named with the current date and time will open when bit 6 goes high, and will remain open as long as bit 6 stays high. The file will close when bit 6 goes low. Remember that a file can start recording only if the file is opened. If the auto file open option is used turn on bit 6 to open a file; turn on bits 6 and 7 to start recording; turn of bit 7 but leave bit 6 on to stop recording without closing the file; turn off bit 6 to
    close the file.

  8. #8
    Join Date
    Jan 2010
    Posts
    2
    Hi,

    I've another question: is for sure that directRT send TTL signal by LPT port assigned like this: D7 D6 D5 D4 D3 D2 D1 D0 (I suppose this are pins from 1 to 8)? Should I ask someone to test this with an osciloscope?

    I've to connect PC's LPT output with a D-15 port from a powerlab recording equipment, so I have to build up a connector to do this and I don't want to be "responsible [for] any explosion which may occur".

    thanks a lot

  9. #9
    Join Date
    Nov 2005
    Posts
    294
    Quote Originally Posted by natxo View Post
    Hi,

    I've another question: is for sure that directRT send TTL signal by LPT port assigned like this: D7 D6 D5 D4 D3 D2 D1 D0 (I suppose this are pins from 1 to 8)? Should I ask someone to test this with an osciloscope?

    I've to connect PC's LPT output with a D-15 port from a powerlab recording equipment, so I have to build up a connector to do this and I don't want to be "responsible [for] any explosion which may occur".

    thanks a lot
    There's a pinout of the parallel port here:

    http://www.beyondlogic.org/spp/parallel.htm

    An oscilloscope (or even just a voltmeter) is always a helpful tool to have.

  10. #10
    Join Date
    Jan 2010
    Posts
    2
    What I understand is that pins 2 to 9 from the LPT1 connector are the ones which send data, I'm ok? Are this the pins which DirectRT uses to send information? Or this depends on which PC it is running?

    I need to build a connector so I need to know which 8 pins I should select

    thanks again

  11. #11
    Join Date
    Nov 2005
    Posts
    294
    Quote Originally Posted by natxo View Post
    What I understand is that pins 2 to 9 from the LPT1 connector are the ones which send data, I'm ok? Are this the pins which DirectRT uses to send information? Or this depends on which PC it is running?

    I need to build a connector so I need to know which 8 pins I should select

    thanks again
    Those 8 pins will be common to any PC containing a parallel port.

    If you only need a single trigger line, I'd select 'D0' for convenience.

    Then, by sending the value '1' or '0' to the PC's parallel port, you'll be able to control the state of that particular pin, either high or low.

  12. #12
    Join Date
    Dec 2009
    Posts
    3

    Port Number

    How do you find out the port number to use to communicate with the eyetracker?

    Thanks in advance!

  13. #13
    Join Date
    Dec 2009
    Posts
    3
    Nevermind, found the answer.
    Thanks!

  14. #14
    Has anyone done this with eye tribe's eye tracker?
    Thanks!

Similar Threads

  1. Tracking which documents participants look at
    By jarvis24 in forum MediaLab Older Versions: How Do I...
    Replies: 3
    Last Post: 10-19-2007, 03:08 AM
  2. Sample Script for an Eye-Tracking Interface
    By JEC in forum Hardware: How Do I...
    Replies: 1
    Last Post: 03-19-2007, 09:34 AM
  3. Can we install in a locked down lab?
    By jarvis24 in forum Pre-Sales and Licensing FAQ
    Replies: 2
    Last Post: 09-14-2006, 12:01 PM
  4. How Do I Interface With an Eye-Tracking System?
    By JEC in forum Hardware: How Do I...
    Replies: 1
    Last Post: 02-17-2006, 01:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •