Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
hamed_neu

Junior Member
Registered:
Posts: 3
Reply with quote  #1 
hi
I want to use a touch panel to monitor the state of a primate. Touch panel output is 5 V when primate touch a bar and it is 0v otherwise. I want to use EYEJOYTRACK function and acquiretouch subfunction to monitor the touch panel output. I do not understand how to do this and how we can assign the touch bar output to DAQ ports. Please help me..[confused] 
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #2 
Here is what you can do:

You want to treat the touchpanel as a simple joystick or eyetracker.

First connect your touch panel output to the vertical input on the daq and then ground the horizontal. If you do not ground the horizontal the signal will be noisy.

Then in ML, you want to map the joystick X to the daq board channel 0 and joystick y to daq board channel 1.

Next, open the I/O test panel (click on the test button). Depending on which daq channel you have selected you can monitor the signal after starting the test. If you are using my github version you can monitor the vertical and horizontal channel by selecting 0 and 1. Then press and release the touchpanel to see the behavior. You should observe it jumping from top to bottom or bottom to top. Basically it will only move up and down. Once you have confirmed this is working go to the next step. You may need to calibrate, or not.

Design your task so that there is an object to track. The object can be hidden. Position the object so that its location appears centered exactly around the location where the touch or release of the touchpanel signal is located. Next add your eyejoytrack to respond accordingly. You can use the show_cursor function to help you during testing. 

There might be other ways of doing this, but this will certainly work fine.

Let us know.

Thanks!
0
hamed_neu

Junior Member
Registered:
Posts: 3
Reply with quote  #3 
Thank you very much. That works but I am afraid this can increase a delay causes by reading analog data. Is there any functions in Monkeylogic to monitor digital TTL inputs? The input in our experiment is TTL pulses with 1/3 duty cycle and we need to monitor this voltage to recognize the state of the touch panel. 

0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #4 
Yes there is such capability, but you need to review the documentation because I'm not certain about digital input monitoring. I believe you just use EyeJoyTrack and treat the signal like a button press using the 'acquiretouch" keyword.

http://www.brown.edu/Research/monkeylogic/timingscripts.html#eyejoytrack

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.