Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
niemeyej

Junior Member
Registered:
Posts: 18
Reply with quote  #1 
I have a confusing problem: my rig has an eyelink 1000 that sends analog output into monkeylogic.  I can calibrate eye position in monkeylogic without any problems.  Then, when I run a task, the eye position is not taken during the trial despite my proper use of eyejoytrack functions.  However, at the end of trials (during intertrial interval), the eye position from that trial is displayed on the control screen.  So, it seems like the eye data is going in to monkeylogic without problems, but that monkeylogic ignores this data during the actual task.

If anyone has seen something similar or has any idea of where I could begin troubleshooting then please let me know.  Thanks
0
ErikEmeric

Junior Member
Registered:
Posts: 25
Reply with quote  #2 
hi,
i had this exact same issue using the joystick input. not sure what the source of the problem is.
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #3 
What do you mean by "it's not taken"? The function eyejoytrack doesn't return true when ontarget?

Have you tested by using a different analog input device?

Have you debugged eyejoytrack some other way?

Have you set show cursor to on so that you can confirm your eye link signal is being tracked during the trial?

What version are you using?

Just because erikemeric says his joystick doesn't work, doesn't mean you both have the same cause.
0
ErikEmeric

Junior Member
Registered:
Posts: 25
Reply with quote  #4 
ryklin is correct in that it may not be the same cause. however, your description of the problem is eerily reminiscent of the problem i encountered.

see the following link to a post from this forum for more detail about the problem i encountered with the joystick.

http://forums.monkeylogic.org/post/joystick-calibration-7564955?pid=1288700446
0
niemeyej

Junior Member
Registered:
Posts: 18
Reply with quote  #5 
So I think I solved the issue, but am still a little confused about why it exists.  At some point recently, I had unintentionally swtiched my analog input signals from "Single ended" to "Differential" in the monkeylogic menu.  Today, I've found that by simply switching it back to "Single ended", I don't have the issue any longer.

What confuses me is that this signal was capable of being calibrated, and appears decently calibrated during the task as well (see .gif below), but was ignored during the actual trial.  The gif here shows several trials where a fixation point appears at screen center with a large radius around it.  Meanwhile, I'm looking at this fixation point after calibration was run on the "Differential" analog inputs from my eye tracker (I use a bite bar, fyi).  You can see that, during the trial, no eye position is registered even when I look at the fixation spot (in this little task the dot should disappear when I've fixated it).  However, after the trial, the eye position is shown.  It seems like monkeylogic just ignores the analog eye inputs until after the trial, when it shows the calibrated eye position in the control screen.

I'm glad to have solved the problem by switching back to "Single ended" analog input mode, though I don't fully understand the issue.  And thanks to you guys for your comments -- after your responses I decided to find an old task script that used a joystick during eye tracking and that's when I realized that the analog input info was different.  And yes, ErikEmeric, your problem looks identical, but I'm not sure that my solution will help.

clip_ML.gif
 

0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #6 
It may be an issue of duplicate boards. The eye trace you see at the end of a trial is continuously acquired A/D samples from one board, but 'eyejoytracker' checks eye positions by getting multiple single samples from the other board. So, if you are using two boards, one of the boards may not be getting eye signals.
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #7 
Now that you mention it, YES the single ended setting may just do the trick. I also can't explain why when in differential mode ML doesn't plot the eye position while trials are running, but it does during the ITI. I would need to dig into the code to answer this question -- I will keep it on the back of my mind.

In general, differential mode is for measuring a signal that has a positive and negative range such as -10V ... +10V, while single ended would be 0 - 20V. Notice that we have the same voltage range. 

Eye trackers would often use the +/- range, where a look to the left would be a negative voltage value on the horizontal channel, and a look to the right would be positive. However, eye tracker models can vary in the way they transmit their signals. Joysticks may do the same thing because they also track 2D space, and a center location of the joystick should correspond to 0 volts. However, in some instances, joysticks are used like levers, where a pull means YES and a release means NO, ie +1V and 0V. So again the signal depends on your instrument. All this being said, if ML were set to differential mode, and your instrument was output a voltage in single ended mode, you should ostensible see the positive values plotted. However, there's more to it than that. When the NIDAQ boards are configured by driver function calls, the hardware will expect that when in single ended mode the negative pin of your instrumented will be grounded, while in differential mode the negative pin will be connected to a signal (hope that makes sense). So this further adds to the confusion =).

Finally keep in mind, that ML may reset the differential/single ended setting when no configuration file is found! I don't remember the default value, but you should double check it!
0
niemeyej

Junior Member
Registered:
Posts: 18
Reply with quote  #8 
That's interesting..My eye tracker puts out +/-5V, and my reference lines are all shared on the AI GND pins on my terminal boards (based on that setup, I've always thought that there shouldn't be a difference between Single ended mode and Differential mode).  I've checked with a scope and am confident that these +/- voltages are entering the terminal boards without problems.

If what you're (ryklin) saying is true, then I'm very surprised that I can calibrate in Differential mode but then require Single ended mode for the task -- if there's an issue with how the signals are interpreted in matlab then I'd expect the issue to persist whether I'm calibrating or running the task.

Thanks for your thoughts.  I'm happy to have the problem solved
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #9 
on the terminal board, if you are in differential mode (+ and -) then then the wiring is as follows :

AI1: Horizontal +
AI2: Horizontal -
AI3: Vertical +
AI4: Vertical -

In Single Ended Mode:
AI1: Horizontal +
AI2: Vertical +

Connect the - of both horizontal and vertical signals to any GND reference on the terminal board.

As for as calibration working when in differential mode, I think that it actually wasn't working, even though it seemed to be. So, next thing I suggest trying is recalibrating in Single Ended Mode and see if you can observe any difference in behavior. I know for my joystick, I get a much more reliable signal!

0
ErikEmeric

Junior Member
Registered:
Posts: 25
Reply with quote  #10 
hi,
ryklin, are you using the penny and jiles joystick (jc 200) mentioned in the original monkeylogic methods paper?
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #11 
No, I do not have that joystick
0
neo3dot1415

Junior Member
Registered:
Posts: 29
Reply with quote  #12 

Hi -

On the EyeLink analog output, I'm getting ±5V for each X and Y over a single channel.
This analog output is provided by DT334 data acquisition card that has been installed on the Eyelink system with the following pin assignments:

#28: X signal (±5V)
#62: Y signal (±5V)

So, The output is on the differential mode in the term of MonkeyLogic, but in practice, I don't have the following arrangement:

AI1: Horizontal +
AI2: Horizontal -
AI3: Vertical +
AI4: Vertical -

If this is true, to fix this problem I should have build the Single Ended to Differential Ended conversion circuit with the cost of additional noise. 

Do you have any suggestion to solve this problem without adding an additional conversion circuit? Thanks.

0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #13 
You don't need any conversion circuit in any case.

First of all, you need to make it sure that it is the Differential mode that you want to use. (Which mode to use is simply your choice. You just need to set the mode in MonkeyLogic as you choose and do wiring correctly.) The Differential mode is most resistant to noise, but, because of difficulty in wiring, I haven't seen anyone who actually uses it, especially when you have to use BNC cables. What is appropriate in most cases is NonReferencedSingleEnded. Sometimes people choose SingleEnded mistakenly, but it is fine as long as it works.

Second of all, you need to find one more line in the DT334 of your EyeLink system, which is the analogoutput GND. No potential difference can exist on one single line. Probably X and Y are sharing the same GND.

Wiring can be like the following in each mode.

* NonReferencedSingleEnded
X (#28) -> AI0
Y (#62) -> AI1
AO GND -> AI SENSE

* SingleEnded
X (#28) -> AI0
Y (#62) -> AI1
AO GND -> AI GND

* Differential
X (#28) -> AI0
Y (#62) -> AI1
AO GND -> AI8, AI9

ryklin's description above about the Differential mode is incorrect. In NI products, CH+ and CH- are 8 channels apart, so the GND of the X should go to AI8 and the GND of the Y, AI9, respectively. Again I am assuming X and Y are sharing the same GND.
0
neo3dot1415

Junior Member
Registered:
Posts: 29
Reply with quote  #14 
Thanks for the clarification about Ryklin's description. 

For sure no potential difference can exist on one single line. The analog inputs on the BNC breakout board have common ground across all the AIs, that's why we can read the differences in potentials even if not using any analogoutput GND on the DT334 (Please, correct me if I am wrong).

On the DT334 pin assignments there are only Digital Grounds available. So I re-wired my connection based on your suggestion but using DGND instead.

I've tried the calibration on the EyeLink simulation mode and here are my results and issue:

Origin and Gain: with gain=1 for both X and Y, I can cover less than 8 degree of visual angle (less than 4 to the right and less than 4 to the left), increasing the gain would fix the issue! 

2-D Spatial Trasnformation: I can not go further than 4 degree (actually less than 4 -  we can see on the grid plot) from 0 point to each side. Am I missing something here? I would appreciate your suggestions.
       
Configuration:

NonReferencedSingleEnded

Eye Signal X --> AI0
Eye Signal Y --> AI1

SE/DIFF switches : on the SE
RSE/NRSE switch: on the NRSE

Thanks.


         2D-Transformation_1.jpg    

0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #15 
Hi neo3dot1415,

It seems that you are getting signals from EyeLink now. Good. I just want to mention a couple of things for your information.

First, linking the ground pins of all analoginput BNC sockets doesn't make it as the common AI ground. It just creates a ground loop among the analogoutput devices connected. It may work, but not always because some devices still send out their output based on their own ground, not the voltage level of this new ground, which is why I recommend NonReferencedSingleEnded (so you are fine). You cannot assume that all the connected devices have the same ground even if they are plugged in the same wall outlet.

Second, one BNC cable has two lines in it, one for the signal and the other for GND. If the DT334 doesn't provide a separate AO GND, then you can use the ground wire of the BNC. I don't think using DGND is a good idea, for the same reason I mention above. As long as they are labeled differently, they don't have to be the same potential.

Regarding to the calibration, you cannot go any further than 8 deg because your raw signals are in the +-4V range. With the initial parameters, both 'Origin and Gain' and '2-D Transform' are the same as the raw signals. You need to find the right parameters, as you changed the gain, so that the voltage input matches with the physical visual space. That is what the calibration is needed for. For 2-D Transform, you need to register voltages (by pressing the space key) at least for 4 different points (people typically do 9 points) and repeat it a couple of times. (Your choice of the fixation points are not ideal, because 1, 3 and 4 are on the same line.) You don't need to calibrate with both methods. Just do it with the one you will actually use.
0
neo3dot1415

Junior Member
Registered:
Posts: 29
Reply with quote  #16 
Thanks Jaewon.

By doing short circuit test (using multimeter) on the AI BNCs, I realized that all the ground part of the BNCs are connecting together. 

About the calibration issue, if we are not going to change the gain on the "Origin and Gain" method, we will face a problem during experiment. Eye signal cannot cover the entire screen (Please, look at the below picture).

2D-Transformation_2.jpg 

The read dot (eye signal) here is in its maximum location and I cannot go further to reach the green circle. But, if I increase the gain during calibration, eye signal can cover the entire screen. 
It's the same issue in 2-D Spatial Transformation method as we are not able to play with the gain during calibration. So, if I wanna use 2-D Spatial Transfomration method, I won't be able to capture more than 8 degree saccades or stimulus.


0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #17 
I said you should change the gain. You just need to put a real subject in the room and match his gaze position (EyeLink voltage output) with the fixation point that he is looking at. As long as you play with fake signals, you won't be able to understand what you have to do.

Have you read this?

http://forums.monkeylogic.org/post/how-to-calibrate-eyejoystick-with-nimh-monkeylogic-8288828?pid=1293786408
0
neo3dot1415

Junior Member
Registered:
Posts: 29
Reply with quote  #18 
You're right Jaewon. It works fine and thanks.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.