Welcome! Log In Create A New Profile

Advanced

mdqmex error occuring after version 2.2.21

Posted by bsc1 
mdqmex error occuring after version 2.2.21
March 29, 2023 03:23PM
Hi Jaewon,

I was starting to work again on some code I had written for version 2.2.21. Before I stated, I updated to 2.2.30. When I run the code I get error "One or more output arguments not assigned during call to "mdqmex". I updated to version 2.2.34 and get the same error. I then returned to version 2.2.21 and the code works again.

Do you have any suggestions to avoid this error so that I can use updated versions of MonkeyLogic?

Thanks
Attachments:
open | download - mdqmex error.zip (46.5 KB)
Re: mdqmex error occuring after version 2.2.21
March 29, 2023 05:37PM
First of all, using TaskObjects is a traditional way to create stimuli. TaskObjects are not mixed with stimuli created with adapters. In Timing Script v2, TaskObjects can be presented only with create_scene().
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#create_scene

In the following code of yours, a PIC TaskObject is assigned to ImageGraphic. ImageGraphic does not have such a usage. (You can assign an MGL object ID, which is undocumented, but that is not the same thing as the TaskObject number.) Although it does not cause an error in the previous ML version, it does not do anything, either. ImgFixPoint is inserted to the scene by create_scene(), not by ImageGraphic.
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#ImageGraphic
ImgFixPoint = 1;               % TaskObject#
img0a = ImageGraphic(null_);
img0a.List = { ImgFixPoint };  % Incorrect syntax! ImageGraphic does not accept TaskObject#.
tc0a = TimeCounter(img0a);
tc0a.Duration = 3000; 
showClearScene = create_scene(tc0a,ImgFixPoint);  % Correct! TaskObjects should be inserted by create_scene().
run_scene(showClearScene);

The code should be written like this.
ImgFixPoint = 1;
img0a = ImageGraphic(null_);
img0a.List = { ImgFixPoint };
tc0a = TimeCounter(null_);
tc0a.Duration = 3000; 
showClearScene = create_scene(tc0a,ImgFixPoint);
run_scene(showClearScene);

Alternatively, you can create the stimulus as an ImageGraphic, instead of a TaskObject. Then, you may want to remove the TaskObject definition ("pic(x,0,0)") from your conditions file, to avoid duplication.
img0a = ImageGraphic(null_);
img0a.List = { 'x.jpg', [0 0] };      % add the file extension (.jpg)
tc0a = TimeCounter(img0a);
tc0a.Duration = 3000; 
showClearScene = create_scene(tc0a);  % note that no TaskObject is added.
run_scene(showClearScene);

-----

The next version will show a clearer error message that it cannot accept TaskObjects.
Re: mdqmex error occuring after version 2.2.21
March 29, 2023 08:45PM
Hi Jaewon,

Thank you very much for your prompt response!
I will update my code and have a better understanding of how I should have been programming!

Dale

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.