Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 14 of 14     «   Prev   11   12   13   14
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #326 
Hi Daniel,

I figured out why it played the first waveform again. I gave an incorrect option to the stop command, so the adapter recreated the analogoutput object in the next scene, which reset the next waveform number to the default value, 1.

I will update the package soon, but, in the mean time, you can modify the set.WaveformNumber function of Stimulator like the following. Just add ",1" in the stop command.

function set.WaveformNumber(obj,val)
    if ~isobject(obj.AO), error('Set the other properties (Channel, Waveform and Frequency) first.'); end %#ok<*MCSUP>
    if issending(obj.AO), stop(obj.AO,1); end
    obj.AO.ManualTriggerNextWF = val;
end

I can see why calling start(obj.AO) works, but it works only when the regeneration mode is true and my solution above works faster.

Thanks for testing out the adapter.
0
DHaehnke

Member
Registered:
Posts: 32
Reply with quote  #327 
Great, thanks Jaewon!
0
DHaehnke

Member
Registered:
Posts: 32
Reply with quote  #328 
I want to show two gratings in the same scene and turn off one of them during the scene. Is that possible?
This code for example doesn't work as I would intend (with circles, but the issue is the same):

% turn on both circles at the same time, but turn off circle 1 after 500 ms
c1 = CircleGraphic(null_);
tc1 = TimeCounter(c1);
tc1.Duration = 500;
c2 = CircleGraphic(null_);
c2.Position = [5 0];
tc2 = TimeCounter(c2);
tc2.Duration = 1000;
aa = AndAdapter(tc2);
aa.add(tc1);
sc = create_scene(aa);

I need it to be in the same scene, so having separate scenes is not an option.

I tried to turn off a SineGrating in a custom TimeCounter adapter by setting obj.Adapter.Radius = 0 when obj.Success == true (i.e. when the TimeCounter's duration is over), but get an error if I set the radius to 0. Could you change the set.Radius function to allow a radius of 0? Or is there another way to achieve what I want?
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #329 
I don't understand why it cannot be done with two scenes. Please provide some explanation.
0
aboharbf

Member
Registered:
Posts: 97
Reply with quote  #330 
Quote:
Originally Posted by Jaewon
* Changes in NIMH MonkeyLogic 2 (May 21, 2019)

 + TCP/IP support for ISCAN DQW software (ver. 1.21E or later)

Visit https://monkeylogic.nimh.nih.gov/ for downloads.


The link to the app seems to not work. - https://monkeylogic.nimh.nih.gov/downloads/NIMH_MonkeyLogic_2.mlappinstall
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #331 
I don't see a problem. Why do you think it is not working?
0
aboharbf

Member
Registered:
Posts: 97
Reply with quote  #332 
I get the stuff below. I've tried in chrome, IE, with a VPN on, and in Incognito (in case some browser extension was interfering). In the case of IE, a download for the .zip initiates.
MKL2DL.png 

0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #333 
The web server may not have a correct MIME type for the file extension. Save the garbled page as a file and rename it.

Even so, the web browser should have saved it as a binary file. Ditch the dumb browsers and switch to Firefox. VPN and Incognito are not relevant.
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #334 
* Changes in NIMH MonkeyLogic 2 (Jun 7, 2019)

 + A new adapter, DragAndDrop. See the "task\runtime v2\22 drag and drop" task
   for an example.

 - Now the conditions file allows using decimals that are not 0-prefixed, like
   [.4 .4 .4]. (Thanks to Arjun Ramakrishnan)

 - Fixed that Stimulator reset analogoutput after the WaveformNumber was
   changed. (Thanks to Daniel Hahnke)

 - Fixed that CircleGraphic drew boxes, instead of circles, when parameters
   were given as List.

 - Audio routines in MGL are rewritten.

 - Fixed a broken chain in the AudioSound adapter

 - Fixed that SND TaskObjects were played at the beginning of the first trial.


Visit https://monkeylogic.nimh.nih.gov/ for downloads.
0
aboharbf

Member
Registered:
Posts: 97
Reply with quote  #335 
Quote:
Originally Posted by Jaewon
The web server may not have a correct MIME type for the file extension. Save the garbled page as a file and rename it.

Even so, the web browser should have saved it as a binary file. Ditch the dumb browsers and switch to Firefox. VPN and Incognito are not relevant.


Seems to have been the case. Right clicking and using 'Save As' seems to fix the problem.

Also in the case that there was some odd fire wall related behavior (my university blocks some sites for seemingly no reason), VPN may have helped, and given that I have chrome extensions that interfere with website tracking, its perfectly possible a .gov website behaves funny if the browser isn't acting as it expects. 
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #336 
This is a MIME problem. Your browser just doesn't know what to do with the file. Since the connection works fine, there is nothing that VPN (or the Incognito mode) can change.
0
DHaehnke

Member
Registered:
Posts: 32
Reply with quote  #337 
Quote:
Originally Posted by Jaewon
I don't understand why it cannot be done with two scenes. Please provide some explanation.

Sorry, I didn't provide enough background information. The two visual objects would be presented in a scene that contains a custom response adapter. The tracker would need to be monitored continuously both during the presentation of the two visual objects and the presentation of the single object. I know this could be done with two scenes, but I would prefer to only have one response scene.
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #338 
Hi Daniel,

I still don't understand the necessity, but the error message you saw was just from the input sanity checking. There is no actual reason that the radius cannot be zero. You can open the SineGrating adapter and change the set.Radius function so that it may not check if the radius is 0.
0
pinkkikukka

Junior Member
Registered:
Posts: 1
Reply with quote  #339 

I just updated my version of MonkeyLogic from 2017 to 2019 and any conditions file upload gives me this problem. I've run my exact code on other desktops and was able to run my code perfectly fine on the 2017 version.  I've also tried running green star and no matter what, I always get this error.  What can I do to fix this?

Capture.png




0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #340 
Please send me one of the *_cfg2.mat files and let me know the exact number of the 2017 version. A quick fix is to delete *_cfg2.mat and restart NIMH ML.

0
Liner

Junior Member
Registered:
Posts: 3
Reply with quote  #341 

Hi Jaewon,

This is a multi-part question:

(1) Just an update and request regarding the binocular tracking functionality. First of all, it works great! When running simulator mode, I believe we found that simulation only pretends to be tracking eye_ and not eye2_, can you update simulation mode to update both eyes to the position of the mouse? Thank you.

(2) Secondly, now we are getting into use the binocular tracker and during the experiments, and we've been wanting more functionality for using either eye.

     Is it possible to do & or | operations with the eye_ and eye2_ signals in their own separate respective windows? This could be an important behavioral control if you binocularly eye track for near targets or to track when the animals loses concentration and eyes wander.  

     Proposed code that would use binocular tracking utilizing an updated MultiTarget adapter for specialized 2 target condition would be:


mul = MultiTarget(eye_, eye2_); % adapter that uses both eye positions to work
mul.Target = 1:2; % TaskObject 1-2 where each target has it's own window coordinates
mul.Target_eye = [1 2]; % specifies eye_ to track first target and eye2_ to track second target
mul.Threshold = [3 3]; % windows for two objects
MultiTargetOp = 'and'; 
mul.Target_logic = [MultiTargetOp]; % other options could be for 'and' or 'or' for or operations. Where 'and' requires both eyes to be in their respective windows and 'or' only requires eye_ to be in Target 1 window OR eye2_ to be in Target 2 window.
mul.WaitTime = 5000; 
mul.HoldTime = 500; 
scene = create_scene(mul, 1:2); % TaskObject 1-2 
run_scene(scene); 
%
% Output example can be anything, but if wanted to be detailed, could report if it is 'and' or 'or' operation. Which eye(s) chose which targets to be counted as a success.
if mul.Success & length(mul.ChosenTarget) == 1
      dashboard(1, sprintf('TaskObject#%d chosen', mul.ChosenTarget)); 
elseif mul.Success & length(mul.ChosenTarget) == 2
      dashboard(1, sprintf('TaskObject#%d and %d chosen', mul.ChosenTarget)); 
else dashboard(1, ''); 
end idle(1000); 


(3) Finally is there a way to pass a condition specific variables/values to the timing file script in an elegant way? At the moment I'm doing it in a kind of dumb way where, I'll use an invisible task object (color 0,0,0) to pass it's two coordinates to the timing file, and the coordinates of the invisible task object can be used as two separate variables that I can utilize for that specific condition (for example used in a task logic or to turn one of multiple devices on or off).

Thank you!

Linus

0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #342 
I think you need to read through the manual. https://monkeylogic.nimh.nih.gov/docs.html

(1) Each system has only one mouse and I can't use the same device to emulate two independent inputs. There are 4 keys assigned for the second eye. See the following links.
https://monkeylogic.nimh.nih.gov/docs_GettingStarted.html#StartingNIMHMonkeyLogic

(2) You got MultiAdapter wrong. MultiAdapter is for one eye to choose among multiple options. If I understood correctly, each eye needs its own single target in your scenario.

eye1 = SingleTarget(eye_);
eye2 = SingleTarget(eye2_);
and = AndAdapter(eye1);  % or OrAdapter
and.add(eye2);           % Now 'and' is combined input of both eyes.

(3) If the values are tied to a particular condition, you can use the Info field of the conditions file.
https://monkeylogic.nimh.nih.gov/docs_CreatingTask.html#ConditionsFile

If you need to dynamically change the values of variables declared in the timing file, make them editable.
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#editable
Then you can edit them in the Pause menu ([V]: Edit timing file variables).
https://monkeylogic.nimh.nih.gov/docs_RunningTask.html#PauseMenu
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #343 
* Changes in NIMH MonkeyLogic 2 (Jun 22, 2019)

 + UDP support for Eye-Mind eye trackers


Visit https://monkeylogic.nimh.nih.gov/ for downloads.
0
Liner

Junior Member
Registered:
Posts: 3
Reply with quote  #344 
Thanks for all the suggestions and help Jaewon.

I wasn't aware of them, but the And and Or adapters work perfectly for our needs.

The info field was also very useful.
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #345 
You can also make more complex combinations with NotAdapter.

eye1 = SingleTarget(eye_);
eye2 = SingleTarget(eye2_);
not2 = NotAdapter(eye2);
and = AndAdapter(eye1);
and.add(not2);  % and.Success is true only when eye1 is fixated but eye2 is not
0
crponce

Junior Member
Registered:
Posts: 24
Reply with quote  #346 
Putting this here in case some unfortunate soul runs into the same issue in the future...

If anyone else works with ISCAN and ML2, I strongly recommend using Jaewon's new TCP/IP method to avoid A/D issues during eye calibration. However, first you may have to turn off your Windows firewall completely in both ISCAN and ML2 computers before the computers will communicate - making exceptions under the firewall didn't seem to work for us. Once comms were established, turning on the firewalls is fine to do. This problem only happened in one computer pair.

Good luck!


0
aboharbf

Member
Registered:
Posts: 97
Reply with quote  #347 
Quote:
Originally Posted by crponce
Putting this here in case some unfortunate soul runs into the same issue in the future...

If anyone else works with ISCAN and ML2, I strongly recommend using Jaewon's new TCP/IP method to avoid A/D issues during eye calibration. However, first you may have to turn off your Windows firewall completely in both ISCAN and ML2 computers before the computers will communicate - making exceptions under the firewall didn't seem to work for us. Once comms were established, turning on the firewalls is fine to do. This problem only happened in one computer pair.

Good luck!




can you elaborate on what you mean by A/D issues? I use Analog Outputs from ISCAN to the BNC-2090 to bring in eye signal and don't have any issues assuming I've set the window correctly on ISCAN.
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #348 
* 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. Please
   see the function manual for details.

    box = BoxGraphic(null_);
    box.List = { [0 0 1], [1 0 0], [2 2], [-5 0], 1, 0;  % edgecolor, facecolor, size, position, scale, angle
        [0 1 0], [0 0 1], [1 1], [5 0], 2, 45 };

    box.Position(2,😉 = [5 5];  % move the 2nd object to a new location
    box.Angle(1) = 45;  % rotate the 1st object by 45 degrees

 + All graphic adapters, including TextGraphic, ImageGraphic and MovieGraphic,
   have new properties, Scale and Angle, which controls the size and rotation
   of the graphic object(s).
   
 + SingleTarget is updated to respond more sensitively to touch input.

 + MultiTarget can use a different Threshold for each target now.

 + Task flow control options in the Task menu are disabled when a userloop
   function is loaded, to indicate that those options are not used with the
   userloop.

 + You can abort the task immediately in the userloop by assigning -1 to
   TrialRecord.NextBlock.

 + mp3 can be used for sound stimuli (R2012b or later).

 + STM objects can be created from WAV files.

 + mlplayer remembers directories previously searched for stimuli and custom
   adapters.

 - In the alert_function, 'task_end' doesn't occur after 'task_aborted' anymore.

Visit https://monkeylogic.nimh.nih.gov/ to download.
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #349 
Package updates will not be announced here any more. Please visit the official website. https://monkeylogic.nimh.nih.gov/
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.