You can't keep monitoring serial ports all the time at the script level. NIMH ML supports TCP/IP, so try it instead if you are interested in digital signal transfer. https://monkeylogic.nimh.nih.gov/docs_TCPIPEyeTracker.htmlby Jaewon - Questions and Answers
You may want to check your AI ground configuration. Sometimes misconfigured ground causes a similar problem. https://monkeylogic.nimh.nih.gov/docs_NIMultifunctionIODevice.html#AIGroundConfiguration If you are 100% sure that it is a problem of your eye tracker, see the following post. You can do linear interpolation after removing [0 0] in your custom function or replace [0 0] with the last xyby Jaewon - Questions and Answers
The block change function is called "after" each trial, so, to determine the very first block, you should use the block selection function. https://monkeylogic.nimh.nih.gov/docs_TaskflowControl.html If I were you, I would use a userloop function. https://monkeylogic.nimh.nih.gov/docs_CreatingTask.html#Userloopby Jaewon - Questions and Answers
How sure are you that TrialRecord is not empty? Try printing out TrialRecord before Line 15. I can easily tell that TrialRecord is empty, even though I don't have your task files. I don't see how the "First block to run" option being "TBD" or not is related to the access to "Subject name" or "Data file". You can copy the subject name from MLConby Jaewon - Questions and Answers
I attach a complete version of the above code. Please run it on NIMH ML and let me know again which part you think I showed you.by Jaewon - Questions and Answers
What I don't understand is the part, "... but it can only last for 5 seconds". If the target and the cursor are both at [0 0] and the tracking type is 'acquiretarget', eyejoytrack ends as soon as you run it. How could it last for 5 s? From your description, I guess this is what you tried to do. = eyejoytrack('holdtarget', target, 4, 5000); % target is atby Jaewon - Questions and Answers
You didn't provide enough information. You should've shown at least the values of variables, the location of the target and the initial position of the cursor. By the way, the term, 'reaction time', has a very specific meaning in psychology and neuroscience. I would use a different name, like 'response period'.by Jaewon - Questions and Answers
Your touchscreen should be multitouch-enabled and you need to configure your NIMH ML to take at least 2 simultaneous touches.by Jaewon - Questions and Answers
* Changes in NIMH MonkeyLogic 2 (Aug 19, 2019) + Now the scale and angle of graphic TaskObjects can be manipulated. See the manual of rescale_object() and rotate_object(). https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#rescale_object https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#rotate_object + A range-type editable is available. You can use a slider contby Jaewon - News
Moved to https://monkeylogic.nimh.nih.gov/docs_CoordinateConversion.htmlby Jaewon - Tips
Create two circles (blue and green). Then, when the blue circle is chosen, turn it off and turn on the green one.by Jaewon - Questions and Answers
Have you checked the "task\runtime v1\8 customized calibration" example? For joystick, you can use JoyCal or Joy2Cal. new_origin = [3 3]; JoyCal.custom_calfunc(@translate_joy); ... ... ... function xy = translate_joy(xy) n = size(xy,1); xy = xy + repmat(new_origin,n,1); end I just wrote the above code off the top of my head, so compare it with the "8 customizby Jaewon - Questions and Answers
* Changes in NIMH MonkeyLogic 2 (Aug 6, 2019) + Digital input, like buttons, is also sampled at 1kHz and recorded to the data file during tasks written in timing script v1. This has been already supported in timing script v2. + A new adapter, Sequential, is added. See the manual for details. https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#Sequential - Fixed the pby Jaewon - News
The attached is an example task that I made based on your description. It requires the latest NIMH ML, so please update your ML first. As you know, ImageChanger starts from the first image again, when it is used in a new scene. So the entire period in which serial image presentation is necessary should be one scene (colored in blue below). To monitor other temporal and behavioral requirementsby Jaewon - Questions and Answers
It is your web browser. It just does not know what to do with the file of that extension. When it opens an HTML page of code, just save the page as NIMH_MonkeyLogic_2.mlappinstallby Jaewon - Questions and Answers
It is not clear to me when the image presentation should start. Is it when the fixation to the fixation point is acquired? Initially I thought you wanted to start the images with the fixation point and keep showing them until a saccade is made to the cue, but your later description is a little confusing. It would help if you could show me your script too.by Jaewon - Questions and Answers
* Changes in NIMH MonkeyLogic 2 (Jul 31, 2019) + A problem that ML crashes on some non-English versions of Windows is fixed. + All graphic functions and GUIs are rewritten for faster performance in recent versions of MATLAB. + Now all graphic adapters supports multiple object creation via the List property and you can adjust properties of each object independently. Pleaseby Jaewon - News
Try the new version (Build 193).by Jaewon - Questions and Answers
Click the buttons on the main menu or see the doc directory, to access offline manuals. They are exact copies of this website.by Jaewon - Tips
Moved to https://monkeylogic.nimh.nih.gov/docs_GettingStarted.html#ReactionTimeby Jaewon - Tips
Moved to https://monkeylogic.nimh.nih.gov/docs_ScreenObject.htmlby Jaewon - Tips
* Update on Jul 7, 2020 MGL now supports the z-order property, so you can change the order of graphic objects afterward in the timing script. An object with a zero z-order (default value) is shown in the back and the one with a higher z-order is presented in front of the others that have lower z-order numbers. If the z-order of two objects are the same, the one created earlier is drawn on tby Jaewon - Tips
Moved to https://monkeylogic.nimh.nih.gov/docs_GettingStarted.html#TrialRecordby Jaewon - Tips
We have a new website for NIMH MonkeyLogic! You need to register first to write on this forum. If you find any issue in using this board, please contact Jaewon Hwang (jaewon dot hwang at nih dot gov). Thank you!by Jaewon - News
Moved to https://monkeylogic.nimh.nih.gov/docs_AlertFunction.htmlby Jaewon - Tips