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: 547
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: 547
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: 2
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: 547
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: 2
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: 547
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
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.