So you want to clear the screen when you explicitly pause the task. Is this simple enough? % at the beginning of the timing script paused = false; hotkey('esc', 'escape_screen; paused = true;'); (put your task code here) % at the end of the timing script if paused, idle(0); endby Jaewon - Questions and Answers
What I asked is what is written in the txt file. Please post the conditionsfile.txt. Your screen may be too small to display the entire menu. If not, try clicking the expand-menu button. https://monkeylogic.nimh.nih.gov/docs_MainMenu.html#Logoby Jaewon - Questions and Answers
Show your code first, please. I am sure you made some mistake in the script. Clearing all stimuli is just one line code as shown in this post, so I do not understand how that is different from having a dedicated function.by Jaewon - Questions and Answers
It appears that you loaded a userloop function, not a conditions file. Did you open the text file and see what is written in it? https://monkeylogic.nimh.nih.gov/docs_RunningTask.html#LoadConditionsby Jaewon - Questions and Answers
That makes no sense. Your if statement calls idle() whether the condition is true or not and therefore is equivalent to a single idle().by Jaewon - Questions and Answers
Unless you turned on the option, saving a trial should not take that long. The delay must be the image loading time mostly. The option of preloading images is already there. You just need to learn some MGL functions, as well as how to use the userloop function. See the attached example. Update your NIMH ML first before running the example, since I modified ImageChanger slightly to present mulby Jaewon - Questions and Answers
See this post. You need to update your NIMH ML. Do not set the arduino variable as global in the alert function. https://monkeylogic.nimh.nih.gov/board/read.php?2,1474,1474#msg-1474 Now you can call goodmonkey() like the following and there is no need of your own goodmonkey function. goodmonkey(duration,'juiceline','D8'); Eye calibration tools have their own GUI menuby Jaewon - Questions and Answers
* Requirements MATLAB R2014a or later NIMH ML 2.2.32 & 2.0.253 (Jan 7, 2023) or later MATLAB Support Package for Arduino Hardware * Instructions 1. Install the MATLAB Support Package for Arduino Hardware from the following link, if it is not installed already. https://www.mathworks.com/matlabcentral/fileexchange/47522-matlab-support-package-for-arduino-hardware If a download errorby Jaewon - Tips
* Changes in 2.2.32 (Jan 7, 2023) + Triggering an Arduino digital pin via goodmonkey() is supported. See alert_function.Arduino.m, regarding to how to set the arduino object. Use the 'JuiceLine' option to specify the pin, as shown below. https://monkeylogic.nimh.nih.gov/board/read.php?2,1474,1474#msg-1474 goodmonkey(100,'juiceline','D2'); % use tby Jaewon - News
Of course, you added another argument because you needed it. However, it prevents NIMH ML from determining the initial conditions of scenes, so mlplayer will not work with the resulting data files. The recommended way to add more arguments to an adapter is to add more properties and copy necessary values from TrialRecord to the properties, rather than assign the whole structure as an argument.by Jaewon - Questions and Answers
I got the files. Thanks. In this case, the problem is not the file size, but the resolution of the movie. Because of the huge amount of data to transfer (roughly 1.5 GB per second), there is no way to present 4K 60-Hz videos seamlessly while doing all the things that NIMH ML does. The resolution of your videos need to be reduced. You can still present them in the same size as before, eitherby Jaewon - Questions and Answers
It appears that your reasoning is right. My concern about LEDOutput is still valid though. I guess you might have to modify the existing NIMH ML code, which could be avoided. I can take a look at it, if you want. I used one-minute-long movies to test your code, but did not see any problem. MovieGraphic is just like any other graphic adapters and does not have a component that slows down the exby Jaewon - Questions and Answers
Have you tested if a single LEDOutput + TimeCounter chain ends exactly after the Duration of the TimerCounter? I do not know how LEDOutput works but I can tell it is not written correctly. The constructor of an adapter can receive only one argument and it must be another adapter. NIMH ML would make an error about it, so I wonder how you could run the code. When I ran your code without LEDOutpuby Jaewon - Questions and Answers
I need you to show me how you control your Arduino. Are you using the MATLAB Support Package for Arduino Hardware? Please provide your code lines to initialize Arduino and turn it on/off.by Jaewon - Questions and Answers
Please show me your task code. From your description, I think it should have a structure like the following and I do not see any interruption between two Sequentials. t11 = TimeCounter(null_); t11.Duration = 300; t12 = TimeCounter(null_); t12.Duration = 300; t13 = TimeCounter(null_); t13.Duration = 300; t14 = TimeCounter(null_); t14.Duration = 300; t15 = TimeCounter(null_); t15.Durationby Jaewon - Questions and Answers
You should be concerned about the data transfer rate of your disk, since you are using uncompressed videos. I remember that one lab had a similar problem because their disk could not stream video contents at a necessary speed. NIMH ML does read videos into memory from the disk every trial. You know you use just the same two videos, because you wrote the conditions file, but not all the tasks aby Jaewon - Questions and Answers
No. Analog output channels cannot be individually controlled, unlike digital lines. It is not a slight modification.by Jaewon - Questions and Answers
You put the name of your timing script in the txt file, didn't you? There is no such usage in NIMH ML. The txt file must be a conditions file or contain the name of the userloop function. https://monkeylogic.nimh.nih.gov/docs_RunningTask.html#LoadConditionsby Jaewon - Questions and Answers
I am not familiar with the products. Do they have a website? If they support the voltage output option, you can just connect them to your NI board.by Jaewon - Questions and Answers
Select multiple ports before clicking the Assign button. https://monkeylogic.nimh.nih.gov/docs_MainMenu.html#DAQSettingsby Jaewon - Questions and Answers
Get a parallel port card. It costs just $20 to $30 and provides 12 digital output lines. https://monkeylogic.nimh.nih.gov/board/read.php?2,1004,1004#msg-1004 See this page about how to install the parallel port driver. https://monkeylogic.nimh.nih.gov/docs_GettingStarted.html#AdditionalLibrariesby Jaewon - Questions and Answers
Delete dms_cfg2.mat and restart.by Jaewon - Questions and Answers
It is an issue of Windows itself. Make the subject screen your main display in the Display settings and try again. https://monkeylogic.nimh.nih.gov/docs_MonitorSetup.htmlby Jaewon - Questions and Answers
set_iti() just specifies the duration of ITI. It does not initiate ITI. https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#set_iti ITI of NIMH ML starts when your timing script ends, but your definition of ITI does not have to be the same as NIMH ML's. For example, you can add idle(1000) at the beginning and end of the timing script and regard those periods as a part of ITI. I wby Jaewon - Questions and Answers
* Changes in 2.2.31 (Sep 26, 2022) + A new TCP/IP module for ViewPoint eye trackers that does not depend on the ViewPoint Client is added.by Jaewon - News
I do not think it has anything to do with NIMH ML. Please check if your task code doesn't do something with the subject name.by Jaewon - Questions and Answers
See the TrialRecord.User part in the userloop manual. https://monkeylogic.nimh.nih.gov/docs_CreatingTask.html#Userloopby Jaewon - Questions and Answers
20 mins still seem way too long. I tested with your conditions file and 11-kB BMP files that I made. It took 67 sec on my computer (i7-10700, 32 GB memory, 1TB SSD). The lines you assign to Behavioral Codes cannot be regrouped nor controlled individually, but you can send two different codes with a little trick. code1 = 10; % Line 1-25 code2 = 20; % Line 26-50 eventmarker(code1 + code2by Jaewon - Questions and Answers
Those keys just change the value of the 'reward_dur' variable (see the 'VariableChanges' field in the data file). The reward duration does not change, unless you actually use the variable to set the reward duration.by Jaewon - Questions and Answers
There are a couple of things that you can try. 1. Add the extension (.bmp) to the stimulus filenames in the conditions. 2. Download NIMH ML again. The new package includes an improvement to reduce the loading time when the same files are used in multiple conditions.by Jaewon - Questions and Answers