Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 6 of 6     «   Prev   3   4   5   6
crado

Junior Member
Registered:
Posts: 5
Reply with quote  #126 
Hello,

Is there an option in ML2 GUI to add touchscreen values to the BHV data or it is done so by default? Should they be found in the BHV.AnalogData beside the MouseValues ? Thank you for your help!
0
Jaewon

Administrator
Registered:
Posts: 615
Reply with quote  #127 
If you turn on the "Touchscreen" option in the Non-DAQ device settings, the touch data will be stored in the AnalogData.MouseData field. MouseData has 4 columns, [x y button1 button2]. When the screen is touched, button1 becomes 1.
0
crado

Junior Member
Registered:
Posts: 5
Reply with quote  #128 
Thank you very much for your answer. Is there also a time information for the touch/mouse presses in each trial?
0
Jaewon

Administrator
Registered:
Posts: 615
Reply with quote  #129 
Data collection begins when the trial timer starts. So you can think of (the row number-1) * (1000 / AI_sample_rate) as the elapsed time in milliseconds.
0
Master_Ming

Junior Member
Registered:
Posts: 5
Reply with quote  #130 
Hi, ryklin and Jaewon:
I had some problems when I try to use your 'MonkeyLogic_stable-1.2.86' touchscreen task examples. When I load the condition file and start trail, the ML will close the condition window and return: no define functions or variables 'xgldevices'. And the matlab error codes are here:

error touch_forced_choice_runtime (line 1386)
numdev=xgldevices;

error run_trial (line 111)
runtime(MLConfig,TrialRecord,TaskObject,TrialData);

error monkeylogic/UIcallback (line 1120)
result = run_trial(MLConfig,datafile);

计算 UIControl Callback 时出错

The monkeylogic version was NIMH MonkeyLogic 2 (Apr 10, 2018 build 125). I didn't see it initialize xgldevice when I start monkeylogic[frown]notice display on matlab are here).It was I use the wrong version of ML or something else?
<<< MonkeyLogic >>> NIMH MonkeyLogic 2 (Apr 10, 2018 build 125)
<<< MonkeyLogic >>> Operating System: Windows_NT
<<< MonkeyLogic >>> Computer Name: DESKTOP-SRG6F84
<<< MonkeyLogic >>> Logged in as nhp
<<< MonkeyLogic >>> Detected 8 "AMD64" processors
<<< MonkeyLogic >>> Matlab version: 9.1.0.441655 (R2016b)
<<< MonkeyLogic >>> Found 2 video device(s)...
<<< MonkeyLogic >>> NIMH daqtoolbox (Jan 2, 2018 build 53)
<<< MonkeyLogic >>> Ross Bencina & Phil Burk PortAudio V19.5.0-devel, revision 1965M
<<< MonkeyLogic >>> Found 1 DAQ adaptor(s), 1 board(s)
<<< MonkeyLogic >>> New conditions loaded: touch_forced_choice.txt (C:\Users\nhp\Documents\MATLAB\Toolbox\MonkeyLogic_stable-1.2.86\MonkeyLogic\Tasks\touchscreen\)


Thank you
0
Jaewon

Administrator
Registered:
Posts: 615
Reply with quote  #131 
Delete all xgl functions and see if it works. FYI, the GitHub version is a different branch and I am not responsible for it.

%numdev = xgldevices;
%for devicenum = 1:numdev,
%    xglshowcursor(devicenum, 0);
%end

...

%numdev = xgldevices;
%for devicenum = 1:numdev,
%    xglshowcursor(devicenum, 1);
%end
0
Master_Ming

Junior Member
Registered:
Posts: 5
Reply with quote  #132 
Hi, Jaewon:
Thank you for your answer. I try to delete all xgl functions but it still cannot work(same error code on ML2 and Matlab) with the demo conditional files. I wonder if there is any way use your ML2 to get the touchscreen function? Do you have any examples or demos?
Thank you
0
Jaewon

Administrator
Registered:
Posts: 615
Reply with quote  #133 
I meant that you should delete xgl function calls in your timing script, the code that I commented out in the above answer. If you did so, you couldn't get the same error.

NIMH ML is the only version that correctly supports touchscreens. I didn't add any demo for touch, because you can run any eye task with touch, if you run NIMH ML in the simulation mode. But, to save the touch data, you need to turn on the touch option in the Non-DAQ devices settings.
0
Master_Ming

Junior Member
Registered:
Posts: 5
Reply with quote  #134 
Hi,Jaewon
Thank you for your kindly reply. The questions is how can I set the options in ML or ML control panel to make the touch signal input into ML(I'm not sure if I explain this well, I need input the touch signal but not eye track signal). And can I just use eyejoytrack function to work with touchscreen?(I set the touchscreen as monitor2).
Thank you
0
Jaewon

Administrator
Registered:
Posts: 615
Reply with quote  #135 
Again, check on the Touchscreen option in the Non-DAQ devices setting. There is nothing else you need to set up.

Yes, you can use eyejoytrack to work with touchscreeh. Just change the first argument per your purpose.

eyejoytrack ends,
'touchtarget' : when the inside of the window is touched
'releasetarget' : when the touch is released inside the window
'~touchtarget' : when the outside of the window is touched
0
Master_Ming

Junior Member
Registered:
Posts: 5
Reply with quote  #136 
Hi, Jaweon:
I check on the settings on ML control panel and in the 'Non DAQ devices(USB, TCP/IP, etc) settings I do selected the touchscreen and nothing else. But when I run your dms task demo, the Matlab return that:
<<< MonkeyLogic >>> No eye signals defined in I/O menu! (dms_runtime/eyejoytrack, Line 452)
错误使用 dms_runtime/eyejoytrack (line 452)
No eye signals defined in I/O menu!

error dms_runtime (line 1402)
ontarget=eyejoytrack('holdfix',fixation_point,fix_radius,initial_fix);

error run_trial (line 111)
runtime(MLConfig,TrialRecord,TaskObject,TrialData);

error monkeylogic/UIcallback (line 1120)
result = run_trial(MLConfig,datafile);

计算 UIControl Callback 时出错

Moreover, I try to use 'touchtarget' as the subfunction in eyejoytrack, Matlab still have these error codes.

In the input/output panel, I selected the signal type was 'EYE X'. So did I selected the wrong signal type?

Than you
0
Jaewon

Administrator
Registered:
Posts: 615
Reply with quote  #137 
The DMS task is an eye task. There are many eyejoytrack functions, but you modified only the first one. You need to change every single one of them. The error message says you used eyejoytrack with 'holdfix', which is an eye tracking option. Try the simple example attached below.

 
Attached Files
m dms.m (413 Bytes, 2 views)

0
Master_Ming

Junior Member
Registered:
Posts: 5
Reply with quote  #138 
Thank you very much for your example. It works!
BTW, sorry to send you the wrong error code. I changed aquirefix to touchtarget, holdfix to holdtarget like this:

toggleobject(fixation_point);
chosen_target = eyejoytrack('touchtarget', fixation_point, fix_radius, wait_for_fix);
if ~chosen_target,
trialerror(4); % no fixation
toggleobject(fixation_point);
return
end
chosen_target = eyejoytrack('holdtarget', fixation_point, fix_radius, initial_fix);
if ~chosen_target,
trialerror(3); toggleobject(fixation_point);
return
end

toggleobject(sample);

chosen_target = eyejoytrack('holdtarget', fixation_point, fix_radius, sample_time);
if ~chosen_target,
trialerror(3);
toggleobject([fixation_point sample]);
return
end
toggleobject(sample);

Then the error code are:
错误使用 dms_runtime/eyejoytrack (line 456)
No joystick defined in I/O menu!

error dms_runtime (line 1402)
chosen_target=eyejoytrack('holdtarget',fixation_point,fix_radius,initial_fix);

error run_trial (line 111)
runtime(MLConfig,TrialRecord,TaskObject,TrialData);

error monkeylogic/UIcallback (line 1120)
result = run_trial(MLConfig,datafile);

计算 UIControl Callback 时出错

So I wonder if I can not use the parameters like 'fixation point' or ' xxxfix' which are similar in eye task? And what is the function of 'dashboard' in your example?
Thank you~
0
Jaewon

Administrator
Registered:
Posts: 615
Reply with quote  #139 
You should read ML documents. 'holdtarget' is for joystick, as the error message says.

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

The dashboard function is in Slide 17 of doc\NIMH MonkeyLogic 2.pptx in the ML directory.

-----

Now NIMH ML packages come with the manuals that explain all of these. They can be brought up by clicking the help buttons on the main menu.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.