Welcome! Log In Create A New Profile

Advanced

How to give multi stimulation simultaneously?

Posted by Ming 
How to give multi stimulation simultaneously?
July 19, 2021 04:23AM
I want to give stim1 and stim2 simultaneously, but I can only see the latter one on oscilloscope even though the monkeylogic screen shows that stim1 and stim2 are both given. How to make both stim1 and stim2 output simultaneously and successfully? Thank you!


Here is the relative code:
% y = repmat([5 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]', 4000, 1);
% fs = 5000;
% save('stim_waveform.mat','y','fs');

stim1 = Stimulator(null_);
stim1.Channel = 1;
stim1.Waveform = 'stim_waveform.mat';

stim2 = Stimulator(null_);
stim2.Channel = 2;
stim2.Waveform = [5,0,0,0,0]';
stim2.Frequency = 1000;

stim = Concurrent(stim1);
stim.add(stim2);

tc = TimeCounter(stim);
tc.Duration = 20000;
scene = create_scene(tc);
run_scene(scene, scene_start);
Re: How to give multi stimulation simultaneously?
July 19, 2021 05:11AM
Use one Stimulator only. Assign [1 2] to Channel. Waveform should be a n-by-2 matrix. Please read the manual carefully.
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#Stimulator

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.