Forum
Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 1 of 5      1   2   3   4   Next   »
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #1 
I have been working on the graphics of MonkeyLogic so that it can support more video resolutions and run on the latest MATLAB without the latency issue. If you have any of those issues, would you try out the package linked below and test if the problem is fixed? Detailed instructions are in the readme.txt file. I would appreciate any feedback.

Here is the result of MonkeyLogic Latency Test performed on my computer with R2016a 64-bit. The code is not optimized yet, but most of you probably have a better computer than mine, so I hope you all get better graphics performance that I intended.

Attached Images
jpeg MonkeyLogic_latency_test.jpg (126.71 KB, 47 views)

0
stremblay

Member
Registered:
Posts: 65
Reply with quote  #2 
Hi Jaewon,

I'm interested in using a USB-DAQ device with ML to control a reward system. I want the USB type to save money on the expensive PCIe cards and BOB. As far as I understood from the many forum discussions, the USB-DAQ will not work on Matlab 32-bit. Is this correct?

If this is the case, then I need to run ML on a 64-bit Matlab to use a USB-DAQ, which your toolbox allows. Am I correct? 

If so, then I would be glad to try out your new NIMH DAQ and give you some feedback on it. Beforehand, could you please confirm that a USB-DAQ would work with your toolbox?

p.s. I am not interested in precise timing for this specific machine. I am using a touchscreen with actual monkeys.

Thanks!


0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #3 
Hi stremblay,

1) USB-type DAQ devices will work fine on both 32-bit and 64-bit MATLAB.

2) MATLAB DAQ Toolbox does not provide so-called legacy interface on 64-bit MATLAB, which MonkeyLogic depends on. So, if you want to run MonkeyLogic on the latest 64-bit MATLAB, you have no choice but to use NIMH DAQ Toolbox.

3) NIIMH DAQ Toolbox is a replacement of MATLAB DAQ Toolbox. It works both on 32-bit and 64-bit MATLAB and faster. In my testing, NI USB-6008 successfully updated samples at 1 kHz speed with NIMH DAQ Toolbox. (But the speed of USB-type DAQ devices can drop under some conditions, like when you add many channels, which is why PCI or PCIe devices are better.)

4) You can download the current version of NIMH DAQ Toolbox in the following link, but it will be released just as a part of NIMH MonkeyLogic in the future.
0
stremblay

Member
Registered:
Posts: 65
Reply with quote  #4 
Thanks for the clarification Jaewon.

I will give a try to your DAQ toolbox and give you some feedback.

Best,
0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #5 
I wrote a new graphic library that can solve many problems of the Oct 2014 MonkeyLogic and am integrating it into NIMH MonkeyLogic. I would appreciate it If anyone interested in the following features would test NIMH MonkeyLogic and give me some feedback. Thanks.

  - Supports any screen resolution and any refresh rate, including the portrait orientation
  - What you see is what your monkey sees. The control screen displays the same scene as the subject screen.
  - No more multiple flickerings before starting a task
  - Supports sprites (bitmaps with transparent backgrounds that can be overlaid on other objects)
  - Supports low-latency audio output based on XAudio2.
  - Supports movie streaming. There is no limit in the duration of movies that can be played.

0
emadreza

Junior Member
Registered:
Posts: 15
Reply with quote  #6 
Hi
I have a problem using NIMH version.
when I want to calibrate eye signal after a whileoving the eye (30 second) the signal of x and y fall on each other that means when the eye make circle in in eyetraker panel in ml calibration panel the courser just move on diagonal line and in in matlab command this text is written

DataMissed event occurred for the object: advantechh0-AI.

Thanks
0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #7 
NIMH MonkeyLogic is built on NIMH DAQ Toolbox and NIMH DAQ does not support your board (Advantech 1711). Since I don't have any Advantech's product, I can't add it to the supported device list any time soon. You need to stick to the old version (Oct 2014) of MonkeyLogic.
0
emadreza

Junior Member
Registered:
Posts: 15
Reply with quote  #8 
Hi Jaewon,
I switched to NIMH monkeylogic in order to solve Multiple monitorr problem 
In old version I have that problem yet. 
 
0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #9 
You need to provide more detailed information about what you did. The part you have the problem with has not been changed in NIMH MonkeyLogic. So I have no clue. Since NIMH MonkeyLogic uses NIMH DAQ by default, your board should not even show up in the Input/Output panel.
0
emadreza

Junior Member
Registered:
Posts: 15
Reply with quote  #10 
at start using NIMH ML  I have  a problem in Input/ OutPut panel. and my board did not recognized  and error on daqmex.mexw32 file showed.
After while I found the solution and I made change in monkey logic m file 
in line 62:
 % addpath(BaseDirectory,[BaseDirectory 'daqtoolbox'],[BaseDirectory 'mgl'],[BaseDirectory 'kbd'],[BaseDirectory 'prttoolbox'],RunTimeDirectory);
 addpath(BaseDirectory,[BaseDirectory 'mgl'],[BaseDirectory 'kbd'],[BaseDirectory 'prttoolbox'],RunTimeDirectory);
I removed daqtoolbox from directory.
That error disappeared and the board has been recognized by ML and show in Input/ output panel. I test in in this panel manually.
I had some error to assign input and out put like qizilbash  I solved them.
I have some memory problem, as we discussed in this page before. this error also exits some times and I have to restart matlab. 

I ran the DMS example task and it worked but the eye signals were not calibrated.
I tried to calibrate the eye , in caliration panel when I pressed the start but after 30 s this text were written in Matlab command window:
DataMissed event occurred for the object: advantechh0-AI.


when I move eye in a circle the cursor in calibration panel move on diagonal line ( It seems that X and Y data are similar)
I asked qizilbash, He has this error with this board and ML 2014 too, but he can not remember how it was solved .

then I think this problem is not related to NIMH version, 

Do you have any idea about that?
Let me know any part of this process which is not clear to discuss more.
 
0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #11 
From previous communication with you, it seems that you haven't actually used ML successfully. The problems that you reported were what the original ML already had, not something new in the NIMH version, which made me confused initially.

Now the issue with daqmex.mexw32 was from NIMH DAQ. You should have asked about it first rather than bypassed it by disabling NIMH DAQ. Then you would know why your system cannot run NIMH MonkeyLogic earlier. I think, it will save your time and effort if you just buy a new computer with lots of memory, 64-bit Windows and an NI board. Running an actual task requires much more memory, so, if you already have to restart MATLAB from time to time, it won't be able to run ML tasks properly.
0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #12 
NIMH MonkeyLogic is updated. Now it supports mouse/touchscreen input and alpha blending.

  - Supports any screen resolution and any refresh rate, including the portrait orientation
  - What you see is what your monkey sees. The control screen displays the same scene as the subject screen.
  - No more multiple flickerings before starting a task
  - Low-latency audio output based on XAudio2.
  - Movie streaming. There is no limit in the duration of movies that can be played.
  - Mouse/touchscreen input. You can also use mouse moves and clicks to emulate eye gaze position and screen touch during the simulation mode.
  - Alpha blending. The unfilled pixels of fix, crc and sqr objects are now transparent to the background. The same effect is also supported for image files that have alpha channel data.
  - Now stm objects can be triggered multiple times in one trial.
0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #13 
I found that the button images were not transparent and some test code was not removed in the previous package, so I uploaded a new one. Please download again, if you got it between yesterday and today. Sorry for the inconvenience.

0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #14 
A version-up due to the NIMH DAQ Toolbox update. Now you can run NIMH MonkeyLogic without an NI board and do experiment/testing just with mouse/touchscreen.
0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #15 
NIMH MonkeyLogic is updated. Thank you those who sent me your feedback!

  - Supports any screen resolution and any refresh rate, including the portrait orientation
  - What you see is what your monkey sees. The control screen displays the same scene as the subject screen.
  - No more multiple flickerings before starting a task
  - Low-latency audio output based on XAudio2.
  - Movie streaming. There is no limit in the duration of movies that can be played.
  - Mouse/touchscreen input. You can also use mouse moves and clicks to emulate eye gaze position and screen touch during the simulation mode.
  - Alpha blending. The unfilled pixels of fix, crc and sqr objects are now transparent to the background. The same effect is also supported for image files that have alpha channel data.
  - Now stm objects can be triggered multiple times in one trial.
  - Improved movie playback & lots of bug fixes.
  - No DAQ hardware, driver or setting required. You can run ML without DAQ, for touchscreen/USB joystick experiments or just for testing in the simulation mode.

0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #16 
- While running trials, the system does not go to sleep or turn off the screens.
- fixed an error that occurs when there is no audio device available.
- fixed an instability issue during movie playback

0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #17 
- fixed a bug in detecting analogoutput voltage ranges that occurs when the NI device supports multiple ranges.
- removed a warning dialog that pops up when NI-DAQmx is not detected.

0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #18 
- fixed a "missing field" error that occurred when setting DAQ from scratch
- fixed a bug that crashed MATLAB when bitmaps are added

ftp://helix.nih.gov/lsn/monkeylogic/NIMH_MonkeyLogic_(Aug-10-2016).zip
0
Levi2506

Junior Member
Registered:
Posts: 5
Reply with quote  #19 
Hi Jaewon,

Thanks for this new version of ML, which works fine.

However, I have a question regarding the trialholder.m code. The code is substantially changed with respect to the previous version of ML. Therefore, I can't really find whether the smoothed joystick cursor on screen display change that was incorporated in the version 2015-09-11 was also incorporated in this new version, and if it was, where. It seems the variable names we previously used are no longer relevant in this newer version, and the on screen cursor is still jittering substantially more than it had previously. 

Thank you in advance for any advice. We really appreciate your help!
0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #20 
I don't think any version was released on 2015-09-11. Why don't you send me your trialholder.m. Then I will try to find a way to incorporate it.
0
cognoman

Junior Member
Registered:
Posts: 29
Reply with quote  #21 
A minor bug in the new update: the mouse pointer gets stuck in the active display monitor and doesn't get back to the other control screen. This seems to happen even after quitting ML, until we open a different application other than Matlab! I'm not sure if anybody else is facing this issue.  
0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #22 
Can you describe the circumstances when it happens?

When the experimenter accidentally brings the mouse cursor to the control screen for a while and the subject takes it back by touching his screen, the cursor shows to the subject briefly until the subject window processes messages. To prevent it from happening, the cursor is confined within the subject screen during regular trials. It should be released when the trial stops or stay free for the whole time in the simulation mode.

If that happens again, you can release the cursor simply by dragging the mouse toward the control screen while pressing down the mouse button. Or type the following on the MATLAB command window.

>> mglsetcursorpos(-1)
0
cognoman

Junior Member
Registered:
Posts: 29
Reply with quote  #23 
Thanks! You were right. That helped.
We were sharing a mouse across systems, so that is not possible when ML is running. So, we went back to separate mouse setting.
0
emadreza

Junior Member
Registered:
Posts: 15
Reply with quote  #24 
Quote:
Originally Posted by Jaewon
From previous communication with you, it seems that you haven't actually used ML successfully. The problems that you reported were what the original ML already had, not something new in the NIMH version, which made me confused initially.

Now the issue with daqmex.mexw32 was from NIMH DAQ. You should have asked about it first rather than bypassed it by disabling NIMH DAQ. Then you would know why your system cannot run NIMH MonkeyLogic earlier. I think, it will save your time and effort if you just buy a new computer with lots of memory, 64-bit Windows and an NI board. Running an actual task requires much more memory, so, if you already have to restart MATLAB from time to time, it won't be able to run ML tasks properly.

Hi
I bought  two ni daq 6221. I have run ML. NIMHversion
there is a problem during eye calibration,
for more details, we use eye link1000 analog out put. when i press "start calibration" the cursor follows the eye signals I can set the positions.  when I press space to set there is no error. just I press the q button for saving there is errors per each space

which is showing  that daqmex problem. I will send the detail of error tomorrow.
We don't connect the pc to internet or usb devices avoiding virus. I should rewrite the error

0
emadreza

Junior Member
Registered:
Posts: 15
Reply with quote  #25 
Hi
the error is:


Error using  analgoinput/getsample  (lne 303)
Failure to find the requested AI task[biggrin]ev1 Task493038131


Error in xycalibrate (line 414)
data=get sample(DAQ.AnalogInput)
Error using pause
Error while evaluating UIControl Callback
Error using  analgoinput/getsample  (lne 303)
Failure to find the requested AI task[biggrin]ev1 Task493038128
Error in xycalibrate (line 414)
data=get sample(DAQ.AnalogInput)
Error using pause
Error while evaluating UIControl Callback
Error using  analgoinput/getsample  (lne 303)
Failure to find the requested AI task[biggrin]ev1 Task493038125


What should I do?


0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.