Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 6 of 10     «   Prev   3   4   5   6   7   8   9   Next   »
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #126 
I thought you might be using the photodiode trigger and the video confirms that you are. Your code is fine. It is just ML2 that has changed. I made the change a month ago to keep the last scenes of movies during ITI, but I guess it was not a right decision.

If the photodiode trigger is used, ML2 flips the screen one more time at the end of a trial, in order to make it sure that the trigger color becomes black for the next trial. When this occurs, the last frame shown on the screen is switched with the second to the last frame hidden in the backscreen. ML2 used to clear and redraw this second to the last frame before swapping, but there are some cases that the redrawn frame is not the same as the last frame and therefore a unwanted scene is shown during ITI.

There are many possible scenario to consider, to decide which is better between clearing the second to the last frame and not clearing. But now I think keeping compatibility with the tasks like yours is more important, since the case I tried to address is unusual.

-----

I updated the package.
0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #127 
* Changes in NIMH MonkeyLogic 2 (Dec 1, 2017)

 - A typo in Line 70 of run_time.m that stopped the latency test & IO test is
   fixed. (Thanks to aboharbf from ML forum)

 + Functions that simulate Stimulation and TTL are included. They replace the
   output channels/ports during the simulation mode, but do not send out actual
   signals. May not work in all cases.
0
crponce

Junior Member
Registered:
Posts: 22
Reply with quote  #128 
That worked! Thanks, Jaewon. 
0
胡文娟

Junior Member
Registered:
Posts: 15
Reply with quote  #129 
Hi Jaewon,
I encounter a problem about touchscreen . During the trial,the touchscreen need to hold pressing all the time, and it detects the touchscreen position.If not, it detects the mouse position.
Is there a way to disable the mouse or the controlscreen during the trial?
I use the win10 and matlab r2011a.
0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #130 
Sorry, 胡文娟. I don't understand what the problem is. What are you trying to do? Can you explain the details?
0
胡文娟

Junior Member
Registered:
Posts: 15
Reply with quote  #131 
Hi Jaewon,
I used to run the ML2 ok on the win7 .But ,now I upgrade my operating system to win10,and encounter the problem.
If I want to use the " eyejoytrack('touchtarget', object_number, threshold, duration)" to detect the touchscreen(subjectscreen) touchpoint-position ,I must hold touching the touchscreen before the trial begining without releasing during the trial. Once I release the touchscreen the DAQ detect the mouse(controlscreen) position.And I touch the touchscreen again during the trial, it still detect the mouse position but not the touchscreen touchpoint-position.
0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #132 
Thanks for the information. Your description sounds a bit different, but I am aware of the problem.

For those touchscreens that use Windows's native touch driver, supporting touch input in ML2 became a nasty business. Somehow "tap-to-click" is disabled in Windows 10's native touch driver, possibly for the gesture support. For some touchscreens, the manufacturers provide their own drivers that can prevent this problem or my tip posted here helps.

The only way to fix this is to process Windows messages and get the touch status from there, according to my research. However, the Windows message loop is intentionally blocked in ML2 during trials, to ensure the accurate timing. I think maybe we can selectively enable the message loop only when users chooses to use the touch input, but this needs lots of tests.

All touchscreen models we have at where I work are 3M's products and they work fine with Windows 10, which is the reason I couldn't test this myself. But I recently got a Windows tablet that shows this symptom, so I will work on this when time permits.
0
胡文娟

Junior Member
Registered:
Posts: 15
Reply with quote  #133 
Thank you for your anwser. I got it.
0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #134 
* Changes in NIMH MonkeyLogic 2 (Dec 14, 2017)

 + Now ML2 supports Ethernet links for Arrington ViewPoint Eye Tracker & SR
   Research EyeLink series. To enable the Ethernet link, go to the "Non-DAQ
   Devices Settings" on the ML menu and choose one in the "TCP/IP Eye Tracker".
   Non-DAQ devices have priority over DAQ devices, when they both are set in
   the Input/Output menu.

nondaq.png   nondaq2.png   
 
 + Touchscreens that use Windows's native driver can be supported now. To
   enable this feature, go to the "Non-DAQ Devices Settings" on the ML menu and
   check on "Touchscreen". It will activate a side menu, "Run Message Loop".
   Then, check on that side menu, too. Although this will fix the previously
   reported problem, you should not turn on this "Run Message Loop" option, if
   your touchscreen works fine without it.
   
 - The problem that SingleTarget's Success becomes empty when there is no input
   data is fixed.

0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #135 
* Changes in NIMH MonkeyLogic 2 (Jan 4, 2018)

 + ML2 can record signals during inter-trial intervals now. A new checkbox
   option to activate this feature is added on the main menu. Extra analog
   samples acquired during ITI will be added to the beginning of the next
   trial's data segment. Also all the events of the next trial will be timed
   from the ITI start, as if the trial is delayed by the ITI. The AISampleRate
   will be fixed to 1000 Hz, when this option is turned on.

ITIrecording.png 

 + A new function, mlconcatenate, is added to read analog data as one long
   seamless array across all trials. This function also converts the timestamps
   of all events to absolute trial time measured from the task start. To read
   data files with mlconcatenate, the sample rate of the data must be 1000 Hz.
   ML2 uses the CPU clock to time events, while analog signals are digitized
   based on the NI board's clock. Typically there is a few nanosecond
   difference between those clocks, which results in a missing/extra sample
   every few minutes. To avoid this temporal error being accumulated,
   mlconcatenate takes the CPU clock as a base and fills the missing NI samples
   with the ones immediately preceding or discards the extra NI samples. If you
   are using a signal processing system, like Plexon or TDT, it is recommended
   to feed all your signals to the system and let them recorded there so that
   all samples are digitized based on the same clock.

 + NIMH daqtoolbox provides a couple of new methods to improve timing accuracy.
   For example, flushdata() is a function that removes previously collected
   samples. ML2 uses this function to mark the location of the very first
   recorded sample, by calling it when the trial clock starts. When multiple
   adapters are used, however, there is an inevitable time gap between flushing
   the first adapter and the last one, which can be longer than 1 ms if there
   are too many samples to delete or just because MATLAB is too slow. To reduce
   this gap, I added flushmarker(), a function that quickly scans adapters and
   just marks the positions to flush without removing samples yet. Since the
   function does not perform the time-consuming part itself, it can return
   within a millisecond even when it is called for the first time. Then, actual
   sample removal can be performed later by flushdata(), when the time accuracy
   is not critical.

  % old way, which still works
  start(DAQ);
  flushdata(DAQ);
  timestamp = toc(global_timer); % You want this timestamp to be close to the
                                 % moment of flushing the first adapter in DAQ
  % new way
  start(DAQ);
  flushmarker(DAQ);              % flushmarker() is faster so the gap with the
  timestamp = toc(global_timer); % timestamp is much shorter.
  flushdata(DAQ);                % Old samples collected before flushmarker()
                                 % are flushed here.

 - The problem that the calibration tools show a warning message at the space
   key press in the Dec 14, 2017 version is fixed.

0
aboharbf

Member
Registered:
Posts: 49
Reply with quote  #136 
Hey Jaewon,

I am trying to nail down some connections between what Monkeylogic is sending and Blackrock is receiving, and I noticed that any time I had a button assigned to a DigitalIO (in my case, Port 0, Line 1), it crashed the I/O test giving me the message "Index exceeds Matrix dimensions. (mlaq.get.Button, Line 273)"

Also, if possible in the I/O Test, being able to send Eventmarkers from this panel would be a nice addition.

Thanks for the help.

0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #137 
* Changes in NIMH MonkeyLogic 2 (Jan 8, 2018)

 - The problem that trialholder_v2 shows an error ("Index exceeds Matrix
   dimensions. (mlaq.get.Button, Line 273)") when buttons are defined is fixed.
   (Thanks to aboharbf from ML forum)

0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #138 
Hi aboharbf,

Thanks for letting me know the issue.

For the eventmaker test, please use the "Strobe Test" button on the main menu.

strobe_test.png 

0
aboharbf

Member
Registered:
Posts: 49
Reply with quote  #139 
Hey Jaewon,

Thanks for the quick Patch! I'm having a hard time connecting what ML is putting out and what my Blackrock system is taking in. What exactly does the strobe test run, and if I have behavioral codes dependent on conditions, I imagine they won't be run themselves? Any details would be great. Thanks a ton.
0
crponce

Junior Member
Registered:
Posts: 22
Reply with quote  #140 
Hi aboharbf, we've set up strobed communication between ML2 and Blackrock a few times now, maybe we can help. PM me if you want

- Carlos
0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #141 
You can have behavioral codes dependent on conditions. Basically whatever number ML sends out, you should get the same number on the Blackrock side. For example,

eventmarker(10);  % ML sends 10 to BlackRock. You should get 10 there.

However, the maximum number you can send out depends on the number of lines you assigned to Behavioral Codes. If you assigned 15 lines, the biggest code you can send is 2^15 - 1 = 32767.
0
aboharbf

Member
Registered:
Posts: 49
Reply with quote  #142 
Quote:
Originally Posted by crponce
Hi aboharbf, we've set up strobed communication between ML2 and Blackrock a few times now, maybe we can help. PM me if you want

- Carlos


Hey Carlos - Definitely will follow up with that soon.

Quote:
Originally Posted by Jaewon
You can have behavioral codes dependent on conditions. Basically whatever number ML sends out, you should get the same number on the Blackrock side. For example,

eventmarker(10);  % ML sends 10 to BlackRock. You should get 10 there.

However, the maximum number you can send out depends on the number of lines you assigned to Behavioral Codes. If you assigned 15 lines, the biggest code you can send is 2^15 - 1 = 32767.


I find it not obvious how to send such eventmarkers outside of trials, and the trials themselves begin with 3 9's and end with 3 18's, so it has been hard to isolate ML signals and translate them to clear signals on the Blackrock. I've also been getting this odd readout of mostly 1's (the first 8 I'm guessing are the strobes) with only the last 2 digits varying between 1 and 0 ('1111111111111101','1111111111111100', etc)

Also on this topic - I have a NI PCIe-6321 X and I was thinking about setting up the entire PFI on the BNC-2090 as the Digital outputs for the Blackrock, with the P0.1 as the Strobe, but it occured to me that ML sees PFI as P1 and P2, and I can't assign Behavioral codes to lines across both. Is there a work around for this?
0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #143 
What do you mean by "outside of trials"? Where do you need to send eventcodes from?

What is your ML version? I made NIMH ML2 send just one 9 and one 18.

I don't understand what you need to isolate and translate. This is digital. There is nothing to isolate and translate.

'1111111111111101' is 65533 and '1111111111111100' is 65532. Are those not the numbers you sent? The strobe test sends out a series of eventcodes that set only one line as 1 at a time, like 1 (=0000000000000001), 2 (=0000000000000010), 4 (=0000000000000100), 8 (=0000000000001000) and so on.

PFI is just a different name referring to the same lines. Ignore PFI labels and think of them as regular ports.

PCIe-6321.png  behavioral_codes.png 

You can assign Behavioral codes across multiple ports. Just select all the ports you want to use on the ML menu as shown above (red circle) and click "Assign".

0
aboharbf

Member
Registered:
Posts: 49
Reply with quote  #144 

Hey Jaewon,

By outside of Trials, I mean how do I code an eventmarker to be sent outside of a timing file (Task.m), which can only be run once being loaded into ML2 as a Trail?

I'm using NIMH ML2, and was still going off of the info on the site - Thanks for the update.

I didn't realize I could shift click ports as well as the lines within them, so that is figured out - Thanks. 

I've made a longer post in an older thread of mine detailing my set up and the results of a strobe test - http://forums.monkeylogic.org/post/interfacing-with-blackrock-system-8422729?trail=#9

Perhaps we should continue over there for the sake of not hijacking the thread. Thanks a lot.

0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #145 
eventmarker() is a nested function, so you cannot call it from the MATLAB command window, if that is what you are asking. To send out digital signals from the MATLAB command window, you need to write your own function with the daqtoolbox.
0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #146 
* Changes in NIMH MonkeyLogic 2 (Jan 17, 2018)

 - The problem that trialholder_v2 shows an error ("Index exceeds Matrix
   dimensions. (mlaq.get.Button, Line 273)") when buttons are defined is fixed.
   (Thanks to aboharbf from ML forum)

 - An error that occurred when reading bitmap images with paletted colors is
   fixed.

 - A problem that movie playback stops when there is a missing frame in the
   video is fixed.


0
gianni

Junior Member
Registered:
Posts: 1
Reply with quote  #147 
Hi, 
I recently installed NIMH ML2 (version from 01/08/18) on a PC running windows 10 and matlab 2017b. The app version would not install (I could hit "yes" in pop-up window "would you like to install this app?" but Matlab would then freeze, without the ML icon appearing in the apps bar, and crash). I also could not install the app version using the "install new app" option on the apps bar. So instead, I used the .zip version. I added ML to matlab's path, as well as the daqtoolbox, and updated microsoft Visual C++ 2013 Redistributable & DirectX 9.0 as described in the documentation. As of now, NIMH ML2 will run the "dms" example task.... but my Control panel looks different than that in the documentation. For example, my main menu is missing the "control screen panel", in addition to the "stimulus pane", and others. A screenshot of my main menu is attached below. 

I wanted to know if this could be indicative of an incomplete/failed installation (and I should just remove ML entirely and reinstall) or there is some view options I am missing. I have tried poking around the main menu a bit to find the missing panes, but without any luck. 

Any help is greatly appreciated, thanks.
Geena 

Capture (1).png 

0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #148 
Hi Geena,

I accidentally deleted your account. Please register again. Sorry about the inconvenience.

Are you saying that you loaded the dms task and clicked the "RUN" button, but didn't see anything? The control screen panel shows up as a separate window, when you start the task.

I don't know why the app installation failed, but uncompressing the zip file and adding the ML directory to the Matlab path are all you need to do. So I think your installation is fine.
0
Geenaianni

Junior Member
Registered:
Posts: 27
Reply with quote  #149 
Hi Jaewon, 
no problem. I loaded the dms task, clicked RUN, and everything appeared to work fine. I meant that the Main menu of ML (see photo attached in previous post) appears to be missing panels, when I compare it to the Main Menu seen in ML documentation (like as seen here --https://www.nimh.nih.gov/labs-at-nimh/research-areas/clinics-and-labs/ln/shn/monkeylogic/main-menu.shtml). 

For example, I do not have a 'stimulus pane' on my ML main menu. I wanted to know if this is just a change to the menu, or if it could be indicative of an incomplete/failed installation. 

Is that more clear?
0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #150 
Thank you for the clarification.

Those screen shots are taken from the original ML and outdated. ryklin is working on the webpage and I think he copied the contents from the old website and didn't revise yet.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.