If your olfactometer is a commercial product, the manufacturer probably has the instructions/tools (or even MATLAB scripts) to control it. You should talk with them first. For serial devices, NIMH ML does not collect data automatically in the background. You should handle everything yourself, from initializing the olfactometer to reading and saving samples, by writing some code in the alert fuby Jaewon - Questions and Answers
You need to reduce the workload of your computer or get a faster computer. The current buffer size is already large enough. If your machine cannot keep up with the acquisition, a larger buffer will not help much.by Jaewon - Questions and Answers
You did not make a mistake. You can get a negative RT, when your subject predicts the timing of a stimulus and makes a preemptive response to a very close target. I will provide more detailed explanation later, but simply speaking, there is a gap between the scene start time and the time when a stimulus show up on the screen. If the subject makes a response during this gap, you get a negativeby Jaewon - Questions and Answers
I do not understand what you are asking about. You can just tell the user to type in something. Are you talking about something like this? https://monkeylogic.nimh.nih.gov/board/read.php?3,2050by Jaewon - Questions and Answers
* Changes in 2.2.52 (Jul 9, 2025) - Additional fix for the figure positioning with multimonitors - An option to display the touch cursor on the subject screenby Jaewon - News
Split the cable into two lines. Then feed one line to NIMH ML and the other to wherever you want.by Jaewon - Questions and Answers
It turned out that there were undeleted, old copies of NIMH ML on the disk and they were being executed inadvertently in this case.by Jaewon - Questions and Answers
If you have a data file from the interrupted session, can you send it to me?by Jaewon - Questions and Answers
If you could replicate the error within 30 minutes, there must be something in your test environment. Please explain how you tested. Were you running a real experiment or simulation?by Jaewon - Questions and Answers
"I tried using the general input, but it did not work." -> Please explain more details. "how can I integrate an external push button into MonkeyLogic?" -> Connect them to the NI board and assign to on the I/O menu.by Jaewon - Questions and Answers
Update your NIMH ML if you are not using the latest version.by Jaewon - Questions and Answers
You are trying to add a new variable to a static workspace. It does not work anywhere in MATLAB. You cannot insert a nested function dynamically, but you can define them all first and choose one dynamically. include('func1.m', 'func2.m', 'func3.m'); % each script must be a function. eval('func1'); I am glad to hear that NIMH ML is useful for you.by Jaewon - Questions and Answers
There was no issue. Somesh's problem was because he did not copy a necessary file to his new task. Later I incorporated the file into the ML package and removed it from the task attached above, so now you need to update your NIMH ML to run the above task.by Jaewon - Questions and Answers
Please be patient. I cannot just modify existing functions without considering how the changes will affect those who are already using them. Download the package again and try it. You need to add the following command to your timing file. https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#showtouch showtouch(true); % v1 touch_.showcursor(true); % v2by Jaewon - Questions and Answers
It seems that you programmed it as the touchscreen input, didn't you? Your device is a replacement of the mouse, not the touchscreen, so you should program it as such. The mouse input is supported only in Timing Script v2 (a.k.a., the scene framework). Use mouse_, instead of touch_. And do not forget to check on "Mouse / Key" in the .by Jaewon - Questions and Answers
You did not provide the datafile, but I think I can tell what happened during the trial. It seems that your subject is very good at guessing the duration of the initial central fixation. You said you expected an error in Scene5 for the premature saccade. However, it does not occur there when the subject breaks the fixation very near to the end of the fixation hold, because SingleTarget does noby Jaewon - Questions and Answers
It is natural that small circles get pixelated. In addition, CircleGraphic does not do anti-aliasing, for fast graphic updates (e.g., animation). The pixelation may occur only on the control screen. Your subject screen is probably larger and you may not see it there. You do not have to use CircleGraphic. You can create the stimuli as CRC TaskObjects, which do anti-aliasing, and present themby Jaewon - Questions and Answers
Okay. I thought you were talking about a Wacom display model. Are you running the task in the simulation mode, by any chance?by Jaewon - Questions and Answers
Wacom is basically another computer, like a tablet. For the subject screen, you need a monitor controlled by your MonkeyLogic computer.by Jaewon - Questions and Answers
Your TrialRecord.User.random_num_list is not defined unless the if statement is executed.by Jaewon - Questions and Answers
You are right. If you display something, it cannot be moved to the alert function.by Jaewon - Questions and Answers
There is no way to stop data acquisition in the middle of a trial. I do not know how you detect the entrance of the next subject, but you can put the related code in the 'trial_start' hook of the alert function, instead of the timing script, and hold the task there until the next subject is detected. Then, there is no need to worry about the data accumulation, since data is not acquiby Jaewon - Questions and Answers
If you update your NIMH ML to the latest version, you will at least be able to open the menu window. It is not tested though whether everything is functioning properly. I am aware of the issue and working on it, but the changes related to the UI are huge in the new release and I am busy with other things, so the final solution may take a few months. This new MATLAB desktop has been beta-tesby Jaewon - Questions and Answers
Use CircleGraphic. crc = CircleGraphic(null_); crc.List = { [1 0 0], [1 0 0], [0.5 0.5], [0 0]; ... [0.5 0.5 0.5], [0.5 0.5 0.5], [0.6 0.6], [0 0] }; tc = TimeCounter(crc); tc.Duration = 5000; scene = create_scene(tc); run_scene(scene);by Jaewon - Questions and Answers
With the partial code and a still image that you provided, I cannot figure out anything. Please show me the entire code and the data file. How often did you get the issue?by Jaewon - Questions and Answers
* Changes in 2.2.51 (Jun 12, 2025) - Fixed the problem that AnalogInputMonitor is occluded by other stimuli. - A quick fix for MATLAB's figure position issue with multiple monitors.by Jaewon - News
Use the key. https://monkeylogic.nimh.nih.gov/docs_RunningTask.html#ControlScreenby Jaewon - Questions and Answers
rot_angles should be a column vector.by Jaewon - Questions and Answers
You may think you explained something, but I have no idea what you are trying to do. You should explain what exactly you want to do, not how you want to do. Rather than "perform the rotation dynamically", for example, it is better to say like "present an image with 30-deg rotation in one scene and 60-deg rotation in the next scene" or "show a square rotating at 90 deg/s fby Jaewon - Questions and Answers
Sometimes an error occurs due to a simple typo. If you post only partial code, there’s not much I can tell. One clear mistake is "response = fth.Success;", since response will always be false. If this line is for reading out the scene result, it should be put after run_scene(). Adapter chains do nothing until they are executed with run_scene(). https://monkeylogic.nimh.nih.gov/docs_by Jaewon - Questions and Answers