Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
qizilbash

Avatar / Picture

Junior Member
Registered:
Posts: 16
Reply with quote  #1 
Hi,

I get Nick's error when I hit test button in video pane.
I tried changing default resolution to all other ones but nither in single monitor nor in multiple monitors conditions is hope.

I have 3 monitors which I want to clone 2nd in 3rd one. all of the monitors resolutions are 1920 * 1080 @ 60Hz.

Thanks in advance,
Mahdi




 
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #2 
Hi qizibash,

It is possible that your monitor's refresh rate is 59 Hz. Try to force it to be at 60 Hz in Advanced settings. If it doesn't work, you need to try other resolutions. It is the limitation of the graphic library that MonkeyLogic uses.

If nothing works, check back this thread a couple of weeks later. I will have a solution for you.

Jaewon
0
qizilbash

Avatar / Picture

Junior Member
Registered:
Posts: 16
Reply with quote  #3 
Dear Jaewon,

I don't know what do you mean by "force", but I changed my monitor's resolution and refresh rate from NVIDIA panel. 
I tested all combinations of resolutions and  refresh rates but no hope again.

I'll be grateful to know your solution!

Best,

0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #4 
What I meant was to choose the refresh rate manually, just as you did in NVIDIA panel. Have you tried other resolutions, too? Sometimes lowering the resolution solves the problem. You are welcome to wait for my solution though. It will be ready soon and will definitely work.
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #5 
Hi qizilbash,

I uploaded the solution that I promised. Please check my post below.

http://forums.monkeylogic.org/post/nimh-monkeylogic-8118700?pid=1292333810
0
qizilbash

Avatar / Picture

Junior Member
Registered:
Posts: 16
Reply with quote  #6 
Hi Jaewon,

Thanks for your update.

I'll try your solution ASAP and give my feedbacks and results then.

Best,
0
emadreza

Junior Member
Registered:
Posts: 15
Reply with quote  #7 
Hi Jaewon,

Thanks for your update. Similar to qizilbash, I tested the NIMH code. I have an error when i want to test video ( multi monitors). 


Out of memory. type HELP MEMORY for your options.

ERROR i mlmenu (line 1916)
                dist=sqrt ((x.^2)+ (y.^2));
Error while evaluating unicontrol Callback


Thanks
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #8 
What is the size of the screen you choose on the menu?
0
emadreza

Junior Member
Registered:
Posts: 15
Reply with quote  #9 

1920*1080

60Hz

0
emadreza

Junior Member
Registered:
Posts: 15
Reply with quote  #10 
Also, I should mention that the menu has a fixed option which is 1920 *1080 and I can not change it at all. 
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #11 
Try the following code and see if you get the same error. That is the code MonkeyLogic runs when you click the test button. The meshgrid() creates big matrices, so you may get the out-of-memory error if your computer or current MATLAB session does not have enough memory. If you get the error persistently even after restarting MATLAB, you have two options: 1) to decrease the resolution of the subject screen or 2) to install more memory and switch to 64-bit MATLAB.

To change the size of the subject screen, please use Windows's Screen Resolution. As explained in the readme.txt, NIMH MonkeyLogic simply shows the screen size you set in the Windows's Screen Resolution. And you may want to set the refresh rates of the subject and control screens identical, to make all new features of MGL work.

---------- Beginning of the code ----------
ScreenX = 1920;
ScreenY = 1080;
halfx = ScreenX/2;
halfy = ScreenY/2;
[x,y] = meshgrid(-halfx:halfx-1, -halfy:halfy-1);
dist = sqrt((x.^2) + (y.^2));
---------- End of the code ----------


0
emadreza

Junior Member
Registered:
Posts: 15
Reply with quote  #12 
Hi,
when I decreased the resolution to 1280*720 , that error disappeared but 
There is a message
Try loading a conditions file first.

I repeat it and load condition file several times but this does not work.

I tracked on the code
last part of code which had error passed but the next line of code  there are a problem.  

line 1918
try
mglcreatesubjectscreen(videodevice)

buffer=zeros(numcycles,1);

....

Catch 

mlmessage('***Error encountered during application of selected video settings***')
disp('***Try loading a condition file first)


in line  1931 
testpattern=(testpattern+1)/2;
break try and go to catch

0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #13 
Hi emadreza,

Although the error message is different, the cause is the same. You need more memory. The code that MonkeyLogic runs into after the one I showed above is like the following.

---------- Beginning of the code ----------
                    buffer = zeros(numcycles, 1);
                    mlmessage('Generating video frame data...');
                    for i = 1:numcycles,
                        rpat = cos(dist./i+2);
                        gpat = cos(dist./(i+5));
                        bpat = cos(dist./(i+8));
                        testpattern = cat(3, rpat, gpat, bpat);
                        testpattern = (testpattern + 1)/2;
                        testpattern = round(255*testpattern);
                        buffer(i) = mgladdbitmap(testpattern);
                    end
---------- End of the code ----------

rpat, gpat and bpat all have the same size as x,y or dist, and testpattern is 3 times bigger, so you need at least twice larger memory space in this code block than you already used. I think your subject screen needs to be a lot smaller. What was the size you used to use?

By the way, what I wrote is only the graphic library and its interfaces. This screen test code is just as written previously. The person who wrote it probably wanted to show a nice graphic effect but it uses too much memory. Have you checked your memory as the previous error message suggested? What do you get when you type 'memory' on the MATLAB command window? Mine looks like this.

---------- Beginning of the result of the memory command ----------
>> memory
Maximum possible array:     27172 MB (2.849e+10 bytes) *
Memory available for all arrays:     27172 MB (2.849e+10 bytes) *
Memory used by MATLAB:      1288 MB (1.351e+09 bytes)
Physical Memory (RAM):     16323 MB (1.712e+10 bytes)

*  Limited by System Memory (physical + swap file) available.
---------- End of the result ----------

See how much space is available for new arrays.

0
emadreza

Junior Member
Registered:
Posts: 15
Reply with quote  #14 
Hi Jaewon.

I tested with  1280*720  

it is working and by this resolution I can work.
As you said the problem is my PC. 
Because of my DAQ , I have to work with 32 bit windows and also 32bit version of matlab.
the available memory for array is  417 MB in mine.

Is it enough for working with monkey logic at all? 

I have another problem with assigning analog inputs.
for example 
I assign aI 0 to  Eye Signal X and ai 1 to eye Signal Y
 and I pressed the check button i ml main menu

there is an error

Warning: unable to set analog input  to transfer over DMA
Error using  daqdevice/subsasgn (line 100)
 Attempt to modify read-only property: 'Input type'
Error in initio>init_ai (line 426)
ai.InpuType=configIO.AI.InputType;

error initio(line  162)

[DAQ.analogInput DaqError]= innit_ai(IO.(sigame).constructor,configIO);

Error in lmenu (line 3187)
[DaqInfo DaqError]=initio(InputOutput);



Also  I should mention when I only assigned an analog output to Reward and press the check button there is no problem, but if I assign the behavioral Codes to Digital IIO the same problem is occurred.





0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #15 
What kind of DAQ board do you have? Do you know the name of the vendor or the model name of the board?
0
emadreza

Junior Member
Registered:
Posts: 15
Reply with quote  #16 
Hi Jaewon,

My DAq board is advatech 1711, this board does not  let to change InputType property because it is read only 
I solved the problem, 
I make a change in code and omit this line

lie 440
%ai.InputType= configIO.Inputype

The problem is  solved but the warning remained 

Warning: unable to set analog input  to transfer over DMA

Thanks yor guid.
Ehsan





0
emadreza

Junior Member
Registered:
Posts: 15
Reply with quote  #17 
more information:
I made that change in initio.m 
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.