Communicating with ASL eye tracker via parallel port
Posted: Wed Jul 08, 2009 5:57 pm
Hi everyone,
I've been using revolution for about a year for research and data collection. I love the flexibility that it gives me for experimental design. Recently my lab purchased an ASL Eye-Trac 6 and I'm interested in programming experiments in revolution that can communicate with the eye tracker control unit that is located on a separate computer. The reason I need to communicate with this control unit is so that I can tell the control unit when to start and stop recording (in addition to various other things).
I've already programmed experiments for this eye tracker using e-prime which is an experimental development studio that basically compiles visual basic script for you that runs the program. You can program in e-prime by simply knowing a limited amount of visual basic, which happens to be the case for me.
With e-prime you communicate with the eye tracker by sending values via the parallel port to the eye tracker control unit. For example if I want to tell the eye tracker to close a data file I use the following code:
writeport &H378, 0
The value 0 tells it to close a data file. Likewise, I can open a new data file by sending values 64 instead of 0. This is pretty easy way to communicate with the control unit with e-prime, but I tend to dislike e-prime as a whole and would rather use revolution to present my experiments because it gives me a greater degree of flexibility over what I can do in each experiment.
I've tried to compile script in revolution that would communicate with the eye tracker via the same method. Here is an example:
open file "LPT1:" for write
write 0 to file "LPT1:"
close file "LPT1:"
The above script did not work and it actually caused revolution to freeze up and crash. Does anyone know what I did wrong? I tried one alternative method to communicate via the parallel port using vb script, but this did not work either. Here is what I did:
put "writeport &H378, 0" into x
do x as vbscript
This script basically did nothing.
I'd love to hear any suggestions about how to send information via a parallel port. Or better yet, if anyone has already used revolution with an ASL eye tracker, I would be vary grateful to hear how you accomplished this. I'm still kind of a novice programmer, so any help is much appreciated.
Best,
Robert
I've been using revolution for about a year for research and data collection. I love the flexibility that it gives me for experimental design. Recently my lab purchased an ASL Eye-Trac 6 and I'm interested in programming experiments in revolution that can communicate with the eye tracker control unit that is located on a separate computer. The reason I need to communicate with this control unit is so that I can tell the control unit when to start and stop recording (in addition to various other things).
I've already programmed experiments for this eye tracker using e-prime which is an experimental development studio that basically compiles visual basic script for you that runs the program. You can program in e-prime by simply knowing a limited amount of visual basic, which happens to be the case for me.
With e-prime you communicate with the eye tracker by sending values via the parallel port to the eye tracker control unit. For example if I want to tell the eye tracker to close a data file I use the following code:
writeport &H378, 0
The value 0 tells it to close a data file. Likewise, I can open a new data file by sending values 64 instead of 0. This is pretty easy way to communicate with the control unit with e-prime, but I tend to dislike e-prime as a whole and would rather use revolution to present my experiments because it gives me a greater degree of flexibility over what I can do in each experiment.
I've tried to compile script in revolution that would communicate with the eye tracker via the same method. Here is an example:
open file "LPT1:" for write
write 0 to file "LPT1:"
close file "LPT1:"
The above script did not work and it actually caused revolution to freeze up and crash. Does anyone know what I did wrong? I tried one alternative method to communicate via the parallel port using vb script, but this did not work either. Here is what I did:
put "writeport &H378, 0" into x
do x as vbscript
This script basically did nothing.
I'd love to hear any suggestions about how to send information via a parallel port. Or better yet, if anyone has already used revolution with an ASL eye tracker, I would be vary grateful to hear how you accomplished this. I'm still kind of a novice programmer, so any help is much appreciated.
Best,
Robert