Is 'gabor' a TaskObject? In the scene framework, the duration of a TaskObject is just the entire scene. You cannot turn it off in the middle of a scene. If it is an image file, delete it from the conditions file and create with ImageGraphic instead. fix2_gabor = ImageGraphic(null_); fix2_gabor.List = { 'gabor.bmp', [0 0] }; tc2 = TimeCounter(fix2_gabor); tc2.Duration =by Jaewon - Questions and Answers
I do not see any problem in your files and they work fine in my computer. It seems that the length of the string is not correctly returned on your system, but I have no clue at the moment why it happens. Maybe it is related to the locale of your Windows or MATLAB. The support for unicode has been very poor in MATLAB, so it may take time to find a workaround or a solution may not exist.by Jaewon - Questions and Answers
Please upload your timing file. There is nothing I can look into with the captured images. Did you type those letters in the MATLAB editor? What is the version of your MATLAB?by Jaewon - Questions and Answers
* Changes in 2.2.39 (Aug 27, 2023) + UTF-8 system encoding support https://monkeylogic.nimh.nih.gov/board/read.php?3,1713,1717#msg-1717by Jaewon - News
Download NIMH ML again and turn on UTF-8 system encoding like the following. To get to this menu in Windows 11, go to - - - and click on . In the resulting window, check on "Use Unicode UTF-8 for worldwide language support". There is no need to change the "Current system locale". Then click "OK" and reboot the computer.by Jaewon - Questions and Answers
NIMH ML currently runs on only little-endian processors and, unlike your assumption, BHV2 is explicitly set as such.by Jaewon - Questions and Answers
Thank you for reporting this. I have a different idea about the cause, though. The adapters are not designed to skip a scene of which length is less than a frame. And what happens at the end of a trial is a little difficult to tell because that is the time when the subject and control screens are programmed to display different things. I do not have time to look into this at the moment, but I wilby Jaewon - Questions and Answers
The output of voltage joysticks is also usually symmetrical, so I believe the issue is caused by the USB interface. The best thing is for the person who made the ADC to fix the problem. You can try removing the ADC and connecting the joystick to your NI board as well. If you do not want to touch the hardware, try the 2-D Spatial Transform again. I would use just 5 points, like center, top-righby Jaewon - Questions and Answers
Yours is an analog voltage joystick, not a digital one. Someone probably added a USB interface to it, so you can ask the person why the cursor is not centered when the stick is not moved. It sounds like the custom USB interface adds an offset to the digital output. Then adjust Origin X and Y (either to the positive or negative direction) so that the cursor comes to the center when the stick isby Jaewon - Questions and Answers
What the _cfg2.mat file has is the configuration that you saved last time, not the current configuration. There is nothing correct or incorrect here. If this is not the answer you wanted, I guess you can figure it out from the code. Unfortunately I do not have time to explain how my code works.by Jaewon - Questions and Answers
For a USB joystick, you can safely assume that its output changes evenly and symmetrically for the entire field, so you can just use the Origin & Gain method. If you do the 2-D Spatial Transformation, you will likely get distorted calibration because there is no guarantee that you push the stick to the correct direction and degree. On the main menu, choose the Origin & Gain method andby Jaewon - Questions and Answers
Although the specification is 1 kHz, the sample interval here is not exactly 1 ms on both sides. TCP/IP transmission is asynchronous and NIMH ML's reading is also based on a software timer, which is affected by the system performance. If NIMH ML reads again after 0.9 ms but the next sample from EyeLink arrives in 1.1 ms, for example, you get a repeated sample.by Jaewon - Questions and Answers
I fail to see why this is a problem. Can you elaborate? Did you disable Nagle's algorithm? https://monkeylogic.nimh.nih.gov/docs_TCPIPEyeTracker.htmlby Jaewon - Questions and Answers
Your file is corrupted. The end of Trial42 and the beginning of Trial43 are erased and filled with 0. It is likely due to a disk error. Overwrite your mlbhv2.m with the attached file. Then you will be able to read the rest of the file, skipping Trial 42 & 43. ----- The attached file is now included in the download packages.by Jaewon - Questions and Answers
I cannot tell without looking into the file. Please send it to me.by Jaewon - Questions and Answers
You should describe it better. It is at the end of a trial that you come to know whether the trial is a success or not. However, eventcodes are sent as soon as relevant commands are executed. Most of the time when an eventcode is sent, the success status of a trial is not determined yet. So what do you mean by the timestamps of wrong trials? What are the codes that you do not see? For example,by Jaewon - Questions and Answers
Your description of the problem is not sufficient. What are "the timestamps for incorrect trials"? Are you saying that you do not see the timestamps in BHV2 or neural data?by Jaewon - Questions and Answers
Does your recording system read eventcodes on the rising edge or falling edge of the triggers or by change detection? Did you set the Strobe option of NIMH ML accordingly? https://monkeylogic.nimh.nih.gov/docs_MainMenu.html#Strobeby Jaewon - Questions and Answers
See this post. Basically you need to change the z-order of the circles like the following. gaze_LED.Zorder = 1; % or any number larger than 0 LED1.Zorder = 1;by Jaewon - Questions and Answers
* Changes in 2.2.38 (Jul 20, 2023) + The TTLOutput adapter can send out pulses of variable lengths with variable delays. - Minor fixesby Jaewon - News
See this manual page. The conditions that you can choose in the current block is in TrialRecord.ConditionsThisBlock. https://monkeylogic.nimh.nih.gov/docs_TrialRecordStructure.htmlby Jaewon - Questions and Answers
Since you switched from Block1 to Block2, your conditions selector should have returned a number between 5 and 8, but it returned 1, which was not in Block2.by Jaewon - Questions and Answers
I have no idea what you are trying to do. If you are comparing the timestamp intervals, you can do diff(2nd column) and diff(3rd column) and compare the result.by Jaewon - Questions and Answers
If what you want is just the filename of the conditions file, you can retrieve it from MLConfig. cond_file = MLConfig.MLPath.ConditionsFile;by Jaewon - Questions and Answers
Use as a target and display the graphic separately, like Example 3 in the following link. https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#SingleTargetby Jaewon - Questions and Answers
It is the same way as presenting any other stimulus. Define a TTL TaskObject in the conditions file and turn it on/off with toggleobject(). https://monkeylogic.nimh.nih.gov/docs_TaskObjects.html https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#toggleobjectby Jaewon - Questions and Answers
The register function makes the digital line stand by so that the TTL can go off when the next frame is displayed. However, the putvalue function changes the line state immediately, so the duration of the signal may be a little shorter than you think. Calling register() multiple times is okay. Also try the new ML version. I made the start time and duration of TTLOutput adjustable. https://by Jaewon - Questions and Answers
No, it is not the right section. The Blackrock LED driver is for optogenetic stimulation. I am not an electronics engineer, but you can send out a TTL to turn on/off an LED. If the LED does not need a large amount of current, maybe it can be driven directly by the TTL. Otherwise, add a relay switch to the LED circuit and control the relay with the TTL.by Jaewon - Questions and Answers
I think using trial-unique identifiers or comparing the intervals between the timestamps would be easier, but it is up to you. First of all, ML timestamps are not referenced to the event 9 of that trial. See this manual page. https://monkeylogic.nimh.nih.gov/docs_GettingStarted.html#AlignTimestampsAndAnalogData All ML timestamps, including the events 9 and 18, are referenced to the Absolutby Jaewon - Questions and Answers
See this manual page for the block selection/change function. https://monkeylogic.nimh.nih.gov/docs_TaskflowControl.html You can also use the userloop function. https://monkeylogic.nimh.nih.gov/docs_CreatingTask.html#Userloopby Jaewon - Questions and Answers